diff options
author | Andrew Bartlett <abartlet@samba.org> | 2012-02-10 08:49:05 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2012-02-10 15:20:33 +1100 |
commit | 11c530149113c50a24079ec58c2d99299b7df295 (patch) | |
tree | c136c56875709064503acb480ce155cf7bc99613 /source4/heimdal_build | |
parent | c38ba53677ada7892ac29e43464580e0645debd5 (diff) | |
download | samba-11c530149113c50a24079ec58c2d99299b7df295.tar.gz samba-11c530149113c50a24079ec58c2d99299b7df295.tar.bz2 samba-11c530149113c50a24079ec58c2d99299b7df295.zip |
heimdal_build: omit #line statments
This restores and finishes my original commit
80e23c68d83a7c9989f87d5a88a78bb76d222afc, reverted in
68c61a829b8487104483b23052b54c532fecb6ce
heimdal_build omit #line statments to allow valgrind to work again
This time however, the reason to omit line statements is that it
causes more trouble with the lcov code coverage system than the (nil)
value that these statements bring. Otherwise, we have to have a
special case to remove the .gcno and .gcda files for these generated
files.
Andrew Bartlett
Diffstat (limited to 'source4/heimdal_build')
-rwxr-xr-x | source4/heimdal_build/lexyacc.sh | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/source4/heimdal_build/lexyacc.sh b/source4/heimdal_build/lexyacc.sh index eb6314ad96..00fe7a4bdd 100755 --- a/source4/heimdal_build/lexyacc.sh +++ b/source4/heimdal_build/lexyacc.sh @@ -24,20 +24,21 @@ call_lex() { cd $dir - $LEX $lfile || exit 1 + # --noline specified because line directives cause more bother than they solve (issues with lcov finding the source files) + $LEX --noline $lfile || exit 1 if [ -r lex.yy.c ]; then echo "#include \"config.h\"" > $base.c - sed -e "s|lex\.yy\.c|$cfile|" lex.yy.c >> $base.c + grep -v "^#line" lex.yy.c >> $base.c rm -f $base.yy.c elif [ -r $base.yy.c ]; then echo "#include \"config.h\"" > $base.c - sed -e "s|$base\.yy\.c|$cfile|" $base.yy.c >> $base.c + grep -v "^#line" $base.yy.c >> $base.c rm -f $base.yy.c elif [ -r $base.c ]; then mv $base.c $base.c.tmp echo "#include \"config.h\"" > $base.c - sed -e "s|$base\.yy\.c|$cfile|" $base.c.tmp >> $base.c + grep -v "^#line" $base.c.tmp >> $base.c rm -f $base.c.tmp elif [ ! -r base.c ]; then echo "$base.c nor $base.yy.c nor lex.yy.c generated." @@ -59,10 +60,11 @@ call_yacc() { cd $dir - $YACC -d $yfile || exit 1 + # -l specified because line directives cause more bother than they solve (issues with lcov finding the source files) + $YACC -l -d $yfile || exit 1 if [ -r y.tab.h -a -r y.tab.c ];then - sed -e "/^#/!b" -e "s|y\.tab\.h|$cfile|" -e "s|\"$base.y|\"$cfile|" y.tab.h > $base.h - sed -e "s|y\.tab\.c|$cfile|" -e "s|\"$base.y|\"$cfile|" y.tab.c > $base.c + cat y.tab.h > $base.h + cat 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." |