diff options
Diffstat (limited to 'source4')
-rwxr-xr-x | source4/script/yacc_compile.sh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source4/script/yacc_compile.sh b/source4/script/yacc_compile.sh index c82ef6d686..a56a51da0a 100755 --- a/source4/script/yacc_compile.sh +++ b/source4/script/yacc_compile.sh @@ -32,9 +32,12 @@ 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 + 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 |