From 14fb42204b894f6c46a84f441e0bc1923f3ac9ac Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 11 Jul 2005 02:49:32 +0000 Subject: r8307: try to cope with flex and bison not being installed, in a similar fashion to yapp for pidl if they are installed, then we rebuild the generated files, otherwise we use the ones in svn (This used to be commit 6ab503b7cc902b8691dc80907bb44f1f705ab8ee) --- source4/heimdal_build/build_external.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'source4/heimdal_build/build_external.sh') diff --git a/source4/heimdal_build/build_external.sh b/source4/heimdal_build/build_external.sh index 24e5eb9bee..c56e9b09bd 100755 --- a/source4/heimdal_build/build_external.sh +++ b/source4/heimdal_build/build_external.sh @@ -42,8 +42,10 @@ build_lex() { file=`basename $f` base=`basename $f .l` echo Building $f - cd $dir && $FLEX $file - sed '/^#/ s|$base.yy\.c|$base.c|' $base.yy.c > $base.c + if cd $dir && $FLEX $file; then + sed '/^#/ s|$base.yy\.c|$base.c|' $base.yy.c > $base.c + rm -f $base.yy.c + fi cd $TOP || exit 1 } @@ -53,9 +55,11 @@ build_bison() { file=`basename $f` base=`basename $f .y` echo Building $f - cd $dir && $BISON -y -d $file - sed -e "/^#/!b" -e "s|y\.tab\.h|$base.h|" y.tab.h > $base.h - sed '/^#/ s|y\.tab\.c|$base.c|' y.tab.c > $base.c + if cd $dir && $BISON -y -d $file; then + sed -e "/^#/!b" -e "s|y\.tab\.h|$base.h|" y.tab.h > $base.h + sed '/^#/ s|y\.tab\.c|$base.c|' y.tab.c > $base.c + rm -f y.tab.c y.tab.h + fi cd $TOP || exit 1 } -- cgit