Browse Source

Merge topic 'update-regenerate-lexers'

a3025e2f9b Utilities/Scripts: Update regenerate-lexers.bash

Acked-by: Kitware Robot <[email protected]>
Merge-request: !5316
Brad King 5 years ago
parent
commit
b1898bf975
1 changed files with 4 additions and 1 deletions
  1. 4 1
      Utilities/Scripts/regenerate-lexers.bash

+ 4 - 1
Utilities/Scripts/regenerate-lexers.bash

@@ -9,6 +9,8 @@ fi
 
 
 pushd "${BASH_SOURCE%/*}/../../Source/LexerParser" > /dev/null
 pushd "${BASH_SOURCE%/*}/../../Source/LexerParser" > /dev/null
 
 
+extra_args_CommandArgument="--never-interactive --batch"
+
 for lexer in            \
 for lexer in            \
     CommandArgument     \
     CommandArgument     \
     CTestResourceGroups \
     CTestResourceGroups \
@@ -22,8 +24,9 @@ do
     in_file=cm${lexer}Lexer.in.l
     in_file=cm${lexer}Lexer.in.l
 
 
     if [[ (${in_file} -nt ${cxx_file}) || (${in_file} -nt ${h_file}) || (${forced} -gt 0) ]]; then
     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}"
     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 's/\s*$//'                       ${h_file} ${cxx_file}   # remove trailing whitespaces
         sed -i '${/^$/d;}'                      ${h_file} ${cxx_file}   # remove blank line at the end
         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
         sed -i '1i#include "cmStandardLexer.h"' ${cxx_file}             # add cmStandardLexer.h include