the "Wrote xxx" messages was printed, although the compiler appeared to
have been run on the .c file that was never claimed to have been
written, but got an error because it couldn't find the .h file (also
never claimed to have been written), and in one of the successes on the
same buildbot, they were both printed for the same file.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@41133
f5534014-38df-0310-8fa8-
9805f1628bb7
#
# OK, run it.
#
+echo "Running ${LEX}"
${LEX} -o"$outfile" $flags "$@"
#
#
# No. Exit with the failing exit status.
#
+ exitstatus=$?
+ echo "${LEX} failed: exit status $exitstatus"
exit $?
fi
# Get the name of the prefix; scan the source files for a %option prefix
# line. We use the last one.
#
+echo "Getting prefix"
prefix=`sed -n 's/%option[ ][ ]*prefix="\(.*\)".*/\1/p' "$@" | tail -1`
if [ ! -z "$prefix" ]
then
#
# Construct the name of the header file.
#
+echo "Getting header file name"
header_file=`dirname "$outfile"`/`basename "$outfile" .c`_lex.h
#
# Spew out the declaration.
#
+echo "Writing $header_file"
cat <<EOF >$header_file
/* This is generated by runlex.sh. Do not edit it. */
$prefixline