3 # rebuild our heimdal lex/yacc files. Run this manually if you update heimdal
5 lexfiles="heimdal/lib/asn1/lex.l heimdal/lib/hx509/sel-lex.l heimdal/lib/com_err/lex.l"
6 yaccfiles="heimdal/lib/asn1/asn1parse.y heimdal/lib/hx509/sel-gram.y heimdal/lib/com_err/parse.y"
18 echo "Calling $LEX on $lfile"
21 base=$(basename $lfile .l)
27 # --noline specified because line directives cause more bother than they solve (issues with lcov finding the source files)
28 $LEX --noline $lfile || exit 1
30 if [ -r lex.yy.c ]; then
31 echo "#include \"config.h\"" > $base.c
32 grep -v "^#line" lex.yy.c >> $base.c
34 elif [ -r $base.yy.c ]; then
35 echo "#include \"config.h\"" > $base.c
36 grep -v "^#line" $base.yy.c >> $base.c
38 elif [ -r $base.c ]; then
39 mv $base.c $base.c.tmp
40 echo "#include \"config.h\"" > $base.c
41 grep -v "^#line" $base.c.tmp >> $base.c
43 elif [ ! -r base.c ]; then
44 echo "$base.c nor $base.yy.c nor lex.yy.c generated."
54 echo "Calling $YACC on $yfile"
57 base=$(basename $yfile .y)
63 # -l specified because line directives cause more bother than they solve (issues with lcov finding the source files)
64 $YACC -l -d $yfile || exit 1
65 if [ -r y.tab.h -a -r y.tab.c ];then
69 elif [ ! -r $base.h -a ! -r $base.c]; then
70 echo "$base.h nor $base.c generated."
78 for lfile in $lexfiles; do
82 for yfile in $yaccfiles; do