summaryrefslogtreecommitdiff
path: root/source4/script
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-05-23 16:24:07 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-05-23 16:24:07 +0200
commitcceac63aaab26a72e2f3fd150dd1e4e83a0e5279 (patch)
tree6203cca724fc5f17f068e3fd4d0b403fdff3f8f9 /source4/script
parent7c7880695b02df4cbe0faab959846c63d0cc0536 (diff)
parent72fce654072b2d7317ff21c95558bd365701d5dd (diff)
downloadsamba-cceac63aaab26a72e2f3fd150dd1e4e83a0e5279.tar.gz
samba-cceac63aaab26a72e2f3fd150dd1e4e83a0e5279.tar.bz2
samba-cceac63aaab26a72e2f3fd150dd1e4e83a0e5279.zip
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-wsgi
Conflicts: source/scripting/python/samba/provision.py (This used to be commit d27de633656f8a699222df77c4c58326890889a2)
Diffstat (limited to 'source4/script')
-rwxr-xr-xsource4/script/build_idl.sh36
-rwxr-xr-xsource4/script/harness2subunit.pl6
-rwxr-xr-xsource4/script/installheader.pl2
-rwxr-xr-xsource4/script/lex_compile.sh51
-rwxr-xr-xsource4/script/yacc_compile.sh43
5 files changed, 7 insertions, 131 deletions
diff --git a/source4/script/build_idl.sh b/source4/script/build_idl.sh
deleted file mode 100755
index ea0cb78b0e..0000000000
--- a/source4/script/build_idl.sh
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/sh
-
-FULLBUILD=$1
-shift 1
-PIDL_EXTRA_ARGS="$*"
-
-[ -d librpc/gen_ndr ] || mkdir -p librpc/gen_ndr || exit 1
-
-PIDL="$PERL $srcdir/pidl/pidl --outputdir librpc/gen_ndr --header --ndr-parser --server --client --swig --ejs --python $PIDL_EXTRA_ARGS"
-
-if [ x$FULLBUILD = xFULL ]; then
- echo Rebuilding all idl files in librpc/idl
- $PIDL $srcdir/librpc/idl/*.idl || exit 1
- exit 0
-fi
-
-list=""
-
-for f in $srcdir/librpc/idl/*.idl ; do
- basename=`basename $f .idl`
- ndr="librpc/gen_ndr/ndr_$basename.c"
- # blergh - most shells don't have the -nt function
- if [ -f $ndr ]; then
- if [ x`find $f -newer $ndr -print` = x$f ]; then
- list="$list $f"
- fi
- else
- list="$list $f"
- fi
-done
-
-if [ "x$list" != x ]; then
- $PIDL $list || exit 1
-fi
-
-exit 0
diff --git a/source4/script/harness2subunit.pl b/source4/script/harness2subunit.pl
index c14e4730e0..9f2391ad6c 100755
--- a/source4/script/harness2subunit.pl
+++ b/source4/script/harness2subunit.pl
@@ -1,7 +1,7 @@
#!/usr/bin/perl
my $firstline = 1;
-
+my $error = 0;
while(<STDIN>) {
if ($firstline) {
$firstline = 0;
@@ -10,6 +10,7 @@ while(<STDIN>) {
if (/^not ok (\d+) - (.*)$/) {
print "test: $2\n";
print "failure: $2\n";
+ $error = 1;
} elsif (/^ok (\d+) - (.*)$/) {
print "test: $2\n";
print "success: $2\n";
@@ -22,7 +23,10 @@ while(<STDIN>) {
} elsif (/^not ok (\d+)$/) {
print "test: $1\n";
print "failure: $1\n";
+ $error = 1;
} else {
print;
}
}
+exit $error;
+
diff --git a/source4/script/installheader.pl b/source4/script/installheader.pl
index d1f96b2592..6b10bde65f 100755
--- a/source4/script/installheader.pl
+++ b/source4/script/installheader.pl
@@ -60,6 +60,8 @@ sub install_header($$)
while (<IN>) {
$lineno++;
+ die("Will not install autogenerated header $src") if (/This file was automatically generated by mkproto.pl. DO NOT EDIT/);
+
if (/^#include \"(.*)\"/) {
print OUT "#include <" . rewrite_include("$src:$lineno", $1) . ">\n";
} else {
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/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