svn commit: samba r25297 - in branches/SAMBA_4_0/source/script: .
metze at samba.org
metze at samba.org
Sat Sep 22 09:42:39 GMT 2007
Author: metze
Date: 2007-09-22 09:42:38 +0000 (Sat, 22 Sep 2007)
New Revision: 25297
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25297
Log:
- fix sed arguments to make the replacement work
- always add #include "config.h" in the first line
metze
Modified:
branches/SAMBA_4_0/source/script/lex_compile.sh
Changeset:
Modified: branches/SAMBA_4_0/source/script/lex_compile.sh
===================================================================
--- branches/SAMBA_4_0/source/script/lex_compile.sh 2007-09-22 09:22:58 UTC (rev 25296)
+++ branches/SAMBA_4_0/source/script/lex_compile.sh 2007-09-22 09:42:38 UTC (rev 25297)
@@ -35,8 +35,14 @@
if [ -r $base.yy.c ];then
# we must guarantee that config.h comes first
echo "#include \"config.h\"" > $base.c
- sed '/^#/ s|$base.yy\.c|$DEST|' $base.yy.c >> $base.c
+ sed -e "s|$base\.yy\.c|$DEST|" $base.yy.c >> $base.c
rm -f $base.yy.c
+ elif [ -r $base.c ];then
+ # we must guarantee that config.h comes first
+ mv $base.c $base.c.tmp
+ echo "#include \"config.h\"" > $base.c
+ sed -e "s|$base\.yy\.c|$DEST|" $base.c.tmp >> $base.c
+ rm -f $base.c.tmp
elif [ ! -r base.c ]; then
echo "$base.c nor $base.yy.c generated."
exit 1
More information about the samba-cvs
mailing list