diff options
Diffstat (limited to 'tools/runlex.sh')
-rwxr-xr-x | tools/runlex.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/runlex.sh b/tools/runlex.sh index f38759c9be..9f075f397c 100755 --- a/tools/runlex.sh +++ b/tools/runlex.sh @@ -85,6 +85,7 @@ done # # OK, run it. # +echo "Running ${LEX}" ${LEX} -o"$outfile" $flags "$@" # @@ -95,6 +96,8 @@ then # # No. Exit with the failing exit status. # + exitstatus=$? + echo "${LEX} failed: exit status $exitstatus" exit $? fi @@ -137,6 +140,7 @@ echo "Wrote $outfile" # 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 @@ -146,11 +150,13 @@ fi # # 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 |