diff options
author | Stefan Metzmacher <metze@samba.org> | 2008-08-01 11:16:14 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2008-08-01 16:10:59 +0200 |
commit | cf875a562173d5ae99080cea594e79c6a5555307 (patch) | |
tree | eaa105751bafb07878f79f9ebf1e21b67b6aaa44 | |
parent | d087545deb354f58431010253dc5170cef3e2bf3 (diff) | |
download | samba-cf875a562173d5ae99080cea594e79c6a5555307.tar.gz samba-cf875a562173d5ae99080cea594e79c6a5555307.tar.bz2 samba-cf875a562173d5ae99080cea594e79c6a5555307.zip |
build: allow flex-2.34 together with bison-2.3
metze
(This used to be commit 8bd30a7b4392642ef5184f959d801716d2db20b2)
-rwxr-xr-x | source4/build/make/lex_compile.sh | 13 | ||||
-rwxr-xr-x | source4/build/make/yacc_compile.sh | 4 | ||||
-rw-r--r-- | source4/heimdal_build/internal.m4 | 1 |
3 files changed, 15 insertions, 3 deletions
diff --git a/source4/build/make/lex_compile.sh b/source4/build/make/lex_compile.sh index 9bba7257b1..d05056d100 100755 --- a/source4/build/make/lex_compile.sh +++ b/source4/build/make/lex_compile.sh @@ -31,20 +31,29 @@ if [ -r $DEST ]; then fi fi TOP=`pwd` +echo "info: running $LEX $ARGS $file" if cd $dir && $LEX $ARGS $file; then - if [ -r $base.yy.c ];then + if [ -r lex.yy.c ];then # we must guarantee that config.h comes first + echo "info: move lex.yy.c to $base.c" + echo "#include \"config.h\"" > $base.c + sed -e "s|lex\.yy\.c|$DEST|" lex.yy.c >> $base.c + rm -f $base.yy.c + elif [ -r $base.yy.c ];then + # we must guarantee that config.h comes first + echo "info: move $base.yy.c to $base.c" 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 + echo "info: add #include \"config.h\" to $base.c" 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." + echo "$base.c nor $base.yy.c nor lex.yy.c generated." exit 1 fi fi diff --git a/source4/build/make/yacc_compile.sh b/source4/build/make/yacc_compile.sh index a56a51da0a..ac4afea3f6 100755 --- a/source4/build/make/yacc_compile.sh +++ b/source4/build/make/yacc_compile.sh @@ -29,10 +29,12 @@ if [ -r $DEST ]; then fi fi TOP=`pwd` +echo "info: running $YACC -d $file" if cd $dir && $YACC -d $file; then if [ -r y.tab.h -a -r y.tab.c ];then - #echo "info: move files" + echo "info: move y.tab.h to $base.h" sed -e "/^#/!b" -e "s|y\.tab\.h|$SRC|" -e "s|\"$base.y|\"$SRC|" y.tab.h > $base.h + echo "info: move y.tab.c to $base.c" 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 diff --git a/source4/heimdal_build/internal.m4 b/source4/heimdal_build/internal.m4 index 18ecbb75cd..e1e495d69b 100644 --- a/source4/heimdal_build/internal.m4 +++ b/source4/heimdal_build/internal.m4 @@ -186,6 +186,7 @@ SMB_ENABLE(compile_et, NO) # LEX_YACC_COMBINATIONS="" LEX_YACC_COMBINATIONS="$LEX_YACC_COMBINATIONS flex-2.5.33:bison-2.3" +LEX_YACC_COMBINATIONS="$LEX_YACC_COMBINATIONS flex-2.5.34:bison-2.3" AC_PROG_LEX LEX_BASENAME=`basename "$LEX"` |