r21618: an attempt to fix the problem with lcov and yacc generated C code
authorAndrew Tridgell <tridge@samba.org>
Thu, 1 Mar 2007 03:32:46 +0000 (03:32 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:49:03 +0000 (14:49 -0500)
(This used to be commit e9d17b5ba0846fbe47b5e4001f5f6394884961d1)

source4/script/yacc_compile.sh

index 77b5efb06f88e8a269be04bee6c6b45eae35a1a8..87d9807fc6ab1a66de642f4759854b678e9c27fa 100755 (executable)
@@ -20,8 +20,8 @@ TOP=`pwd`
 if cd $dir && $YACC -d $file; then
        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
+               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
        fi
 fi