diff options
Diffstat (limited to 'source4/script')
-rwxr-xr-x | source4/script/cflags.pl | 42 | ||||
-rwxr-xr-x | source4/script/lex_compile.sh | 51 | ||||
-rwxr-xr-x | source4/script/mkproto.pl | 4 | ||||
-rwxr-xr-x | source4/script/yacc_compile.sh | 43 |
4 files changed, 3 insertions, 137 deletions
diff --git a/source4/script/cflags.pl b/source4/script/cflags.pl deleted file mode 100755 index 37b5aa7e71..0000000000 --- a/source4/script/cflags.pl +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env perl - -# This is a hack to allow per target cflags. It isn't very elegant, but it -# is the most portable idea we have come up with yet -# tridge@samba.org, July 2005 -# jelmer@samba.org, March 2006 -use strict; - -my $target = shift; - -my $vars = {}; - -sub check_flags($$); -sub check_flags($$) -{ - my ($path, $name)=@_; - open (IN, $path); - foreach my $line (<IN>) { - if ($line =~ /^include (.*)$/) { - check_flags($1, $name); - } elsif ($line =~ /^([A-Za-z0-9_]+) =(.*)$/) { - $vars->{$1} = $2; - } elsif ($line =~ /^([^:]+): (.*)$/) { - next unless (grep(/^$target$/, (split / /, $1))); - my $data = $2; - $data =~ s/^CFLAGS\+=//; - foreach my $key (keys %$vars) { - my $val = $vars->{$key}; - $data =~ s/\$\($key\)/$val/g; - } - # Remove undefined variables - $data =~ s/\$\([A-Za-z0-9_]+\)//g; - print "$data "; - } - } - close(IN); -} - -check_flags("extra_cflags.txt", $target); -print "\n"; - -exit 0; diff --git a/source4/script/lex_compile.sh b/source4/script/lex_compile.sh deleted file mode 100755 index 9bba7257b1..0000000000 --- a/source4/script/lex_compile.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh - -LEX="$1" -SRC="$2" -DEST="$3" -shift 3 -ARGS="$*" - -dir=`dirname $SRC` -file=`basename $SRC` -base=`basename $SRC .l` -if [ -z "$LEX" ]; then - # if $DEST is more recent than $SRC, we can just touch - # otherwise we touch but print out warnings - if [ -r $DEST ]; then - if [ x`find $SRC -newer $DEST -print` = x$SRC ]; then - echo "warning: lex not found - cannot generate $SRC => $DEST" >&2 - echo "warning: lex not found - only updating the timestamp of $DEST" >&2 - fi - touch $DEST; - exit; - fi - echo "error: lex not found - cannot generate $SRC => $DEST" >&2 - exit 1; -fi -# if $DEST is more recent than $SRC, we can just touch -if [ -r $DEST ]; then - if [ x`find $SRC -newer $DEST -print` != x$SRC ]; then - touch $DEST; - exit; - fi -fi -TOP=`pwd` -if cd $dir && $LEX $ARGS $file; then - if [ -r $base.yy.c ];then - # we must guarantee that config.h comes first - echo "#include \"config.h\"" > $base.c - sed -e "s|$base\.yy\.c|$DEST|" $base.yy.c >> $base.c - rm -f $base.yy.c - elif [ -r $base.c ];then - # we must guarantee that config.h comes first - mv $base.c $base.c.tmp - echo "#include \"config.h\"" > $base.c - sed -e "s|$base\.yy\.c|$DEST|" $base.c.tmp >> $base.c - rm -f $base.c.tmp - elif [ ! -r base.c ]; then - echo "$base.c nor $base.yy.c generated." - exit 1 - fi -fi -cd $TOP diff --git a/source4/script/mkproto.pl b/source4/script/mkproto.pl index 5aeece7155..87a68e33fa 100755 --- a/source4/script/mkproto.pl +++ b/source4/script/mkproto.pl @@ -157,7 +157,9 @@ sub process_file($$$) $filename =~ s/\.o$/\.c/g; - if (!open(FH, "< $builddir/$filename")) { + if ($filename =~ /^\//) { + open(FH, "<$filename") or die("Failed to open $filename"); + } elsif (!open(FH, "< $builddir/$filename")) { open(FH, "< $srcdir/$filename") || die "Failed to open $filename"; } diff --git a/source4/script/yacc_compile.sh b/source4/script/yacc_compile.sh deleted file mode 100755 index a56a51da0a..0000000000 --- a/source4/script/yacc_compile.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh - -YACC="$1" -SRC="$2" -DEST="$3" - -dir=`dirname $SRC` -file=`basename $SRC` -base=`basename $SRC .y` -if [ -z "$YACC" ]; then - # if $DEST is more recent than $SRC, we can just touch - # otherwise we touch but print out warnings - if [ -r $DEST ]; then - if [ x`find $SRC -newer $DEST -print` = x$SRC ]; then - echo "warning: yacc not found - cannot generate $SRC => $DEST" >&2 - echo "warning: yacc not found - only updating the timestamp of $DEST" >&2 - fi - touch $DEST; - exit; - fi - echo "error: yacc not found - cannot generate $SRC => $DEST" >&2 - exit 1; -fi -# if $DEST is more recent than $SRC, we can just touch -if [ -r $DEST ]; then - if [ x`find $SRC -newer $DEST -print` != x$SRC ]; then - touch $DEST; - exit; - fi -fi -TOP=`pwd` -if cd $dir && $YACC -d $file; then - if [ -r y.tab.h -a -r y.tab.c ];then - #echo "info: move files" - sed -e "/^#/!b" -e "s|y\.tab\.h|$SRC|" -e "s|\"$base.y|\"$SRC|" y.tab.h > $base.h - sed -e "s|y\.tab\.c|$SRC|" -e "s|\"$base.y|\"$SRC|" y.tab.c > $base.c - rm -f y.tab.c y.tab.h - elif [ ! -r $base.h -a ! -r $base.c]; then - echo "$base.h nor $base.c generated." - exit 1 - fi -fi -cd $TOP |