From 13d7fbb51aa04a6b5e1f241b74b2e271dbda81bb Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 25 Oct 2007 19:51:38 +0200 Subject: r25733: fix filename substitution and bail out if yacc output isn't generated metze (This used to be commit 43911e40170176db48ee696c06c92f5fe71f60b8) --- source4/script/yacc_compile.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'source4') 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 -- cgit