Commit 329af698 by Olli Etuaho

Make generate_parser.sh run from any working directory

The script used to have partial support for specifying complete paths to the files it referenced, but the patch command didn't work if the working directory wasn't src/compiler/translator. It's simplest to fix the script by just changing the working directory in the script. Change-Id: If3642cbe11436d8c7553cd1812ee0f6c19fe990b Reviewed-on: https://chromium-review.googlesource.com/320270Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Tested-by: 's avatarOlli Etuaho <oetuaho@nvidia.com>
parent 66641c61
......@@ -7,22 +7,23 @@
run_flex()
{
input_file=$script_dir/$1.l
output_source=$script_dir/$1_lex.cpp
input_file=./$1.l
output_source=./$1_lex.cpp
flex --noline --nounistd --outfile=$output_source $input_file
}
run_bison()
{
input_file=$script_dir/$1.y
output_header=$script_dir/$1_tab.h
output_source=$script_dir/$1_tab.cpp
input_file=./$1.y
output_header=./$1_tab.h
output_source=./$1_tab.cpp
bison --no-lines --skeleton=yacc.c --defines=$output_header --output=$output_source $input_file
}
script_dir=$(dirname $0)
# Generate Parser
cd $script_dir
run_flex glslang
run_bison glslang
patch --silent --forward < 64bit-lexer-safety.patch
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment