svn commit: samba r25733 - in branches/SAMBA_4_0/source/script: .

metze at samba.org metze at samba.org
Thu Oct 25 19:51:39 GMT 2007


Author: metze
Date: 2007-10-25 19:51:38 +0000 (Thu, 25 Oct 2007)
New Revision: 25733

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25733

Log:
fix filename substitution and bail out if yacc output isn't generated

metze

Modified:
   branches/SAMBA_4_0/source/script/yacc_compile.sh


Changeset:
Modified: branches/SAMBA_4_0/source/script/yacc_compile.sh
===================================================================
--- branches/SAMBA_4_0/source/script/yacc_compile.sh	2007-10-25 19:50:34 UTC (rev 25732)
+++ branches/SAMBA_4_0/source/script/yacc_compile.sh	2007-10-25 19:51:38 UTC (rev 25733)
@@ -32,9 +32,12 @@
 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



More information about the samba-cvs mailing list