9 base=`basename $SRC .l`
10 if [ -z "$LEX" ]; then
11 # if $DEST is more recent than $SRC, we can just touch
12 # otherwise we touch but print out warnings
14 if [ x`find $SRC -newer $DEST -print` = x$SRC ]; then
15 echo "warning: lex not found - cannot generate $SRC => $DEST" >&2
16 echo "warning: lex not found - only updating the timestamp of $DEST" >&2
21 echo "error: lex not found - cannot generate $SRC => $DEST" >&2
24 # if $DEST is more recent than $SRC, we can just touch
26 if [ x`find $SRC -newer $DEST -print` != x$SRC ]; then
32 if cd $dir && $LEX $file; then
33 if [ -r $base.yy.c ];then
34 # we must guarantee that config.h comes first
35 echo "#include \"config.h\"" > $base.c
36 sed '/^#/ s|$base.yy\.c|$DEST|' $base.yy.c >> $base.c