summaryrefslogtreecommitdiff
path: root/Utilities/Scripts
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2020-10-02 14:22:46 -0400
committerKyle Edwards <kyle.edwards@kitware.com>2020-10-02 14:25:56 -0400
commita3025e2f9bbe07a172a20d1034deb53fa6d40e00 (patch)
treed721cf2444fa1f01453ed7c35081d9792d3bdbb2 /Utilities/Scripts
parent3ec0f9d6209117e768e3d5c02e5d3cc0dc001a16 (diff)
downloadcmake-a3025e2f9bbe07a172a20d1034deb53fa6d40e00.tar.gz
Utilities/Scripts: Update regenerate-lexers.bash
62d7acc6 added arguments to Flex when regenerating cmCommandArgumentLexer, but this was not reflected in Utilities/Scripts/regenerate-lexers.bash. Update the script with the proper arguments.
Diffstat (limited to 'Utilities/Scripts')
-rwxr-xr-xUtilities/Scripts/regenerate-lexers.bash5
1 files changed, 4 insertions, 1 deletions
diff --git a/Utilities/Scripts/regenerate-lexers.bash b/Utilities/Scripts/regenerate-lexers.bash
index 186802a854..4bf767f88a 100755
--- a/Utilities/Scripts/regenerate-lexers.bash
+++ b/Utilities/Scripts/regenerate-lexers.bash
@@ -9,6 +9,8 @@ fi
pushd "${BASH_SOURCE%/*}/../../Source/LexerParser" > /dev/null
+extra_args_CommandArgument="--never-interactive --batch"
+
for lexer in \
CommandArgument \
CTestResourceGroups \
@@ -22,8 +24,9 @@ do
in_file=cm${lexer}Lexer.in.l
if [[ (${in_file} -nt ${cxx_file}) || (${in_file} -nt ${h_file}) || (${forced} -gt 0) ]]; then
+ extra_args=`eval echo \\${extra_args_\${lexer}}`
echo "Generating Lexer ${lexer}"
- flex --nounistd -DFLEXINT_H --noline --header-file=${h_file} -o${cxx_file} ${in_file}
+ flex --nounistd ${extra_args} -DFLEXINT_H --noline --header-file=${h_file} -o${cxx_file} ${in_file}
sed -i 's/\s*$//' ${h_file} ${cxx_file} # remove trailing whitespaces
sed -i '${/^$/d;}' ${h_file} ${cxx_file} # remove blank line at the end
sed -i '1i#include "cmStandardLexer.h"' ${cxx_file} # add cmStandardLexer.h include