summaryrefslogtreecommitdiff
path: root/source4/script
diff options
context:
space:
mode:
Diffstat (limited to 'source4/script')
-rwxr-xr-xsource4/script/lex_compile.sh6
-rwxr-xr-xsource4/script/yacc_compile.sh9
2 files changed, 10 insertions, 5 deletions
diff --git a/source4/script/lex_compile.sh b/source4/script/lex_compile.sh
index 09f8253af7..f33a7f0fba 100755
--- a/source4/script/lex_compile.sh
+++ b/source4/script/lex_compile.sh
@@ -18,7 +18,9 @@ if [ -r $DEST ]; then
fi
TOP=`pwd`
if cd $dir && $LEX $file; then
- sed '/^#/ s|$base.yy\.c|$DEST|' $base.yy.c > $base.c
- rm -f $base.yy.c
+ if [ -r $base.yy.c ];then
+ sed '/^#/ s|$base.yy\.c|$DEST|' $base.yy.c > $base.c
+ rm -f $base.yy.c
+ fi
fi
cd $TOP
diff --git a/source4/script/yacc_compile.sh b/source4/script/yacc_compile.sh
index 4c87b7c4b7..77b5efb06f 100755
--- a/source4/script/yacc_compile.sh
+++ b/source4/script/yacc_compile.sh
@@ -18,8 +18,11 @@ if [ -r $DEST ]; then
fi
TOP=`pwd`
if cd $dir && $YACC -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
+ if [ -r y.tab.h -a -r y.tab.c ];then
+ echo "move files"
+ 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
fi
cd $TOP