summaryrefslogtreecommitdiff
path: root/source4/heimdal_build
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-07-11 02:49:32 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:20:04 -0500
commit14fb42204b894f6c46a84f441e0bc1923f3ac9ac (patch)
treeb31166dbf94b3707dd8b233cf9e76c1698ac97a8 /source4/heimdal_build
parent76478d7eb145880e213ed8a399ce2171f43e18a4 (diff)
downloadsamba-14fb42204b894f6c46a84f441e0bc1923f3ac9ac.tar.gz
samba-14fb42204b894f6c46a84f441e0bc1923f3ac9ac.tar.bz2
samba-14fb42204b894f6c46a84f441e0bc1923f3ac9ac.zip
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)
Diffstat (limited to 'source4/heimdal_build')
-rwxr-xr-xsource4/heimdal_build/build_external.sh14
1 files changed, 9 insertions, 5 deletions
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
}