diff options
author | Jose Fonseca <[email protected]> | 2015-03-19 13:35:18 +0000 |
---|---|---|
committer | Jose Fonseca <[email protected]> | 2015-03-22 08:23:24 +0000 |
commit | 31e47a59ad542c72a56f1eee1b402b23d42e4475 (patch) | |
tree | afe1df86261c94023c35bb16f7ad79a3d9b6e07c /src | |
parent | 9c1c657e19ff373315b517ca58f87227b336f3b7 (diff) |
scons: Cleanup flex/bison settings specification.
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/glsl/SConscript | 20 | ||||
-rw-r--r-- | src/mesa/SConscript | 2 |
2 files changed, 13 insertions, 9 deletions
diff --git a/src/glsl/SConscript b/src/glsl/SConscript index 26de455f074..284b375844f 100644 --- a/src/glsl/SConscript +++ b/src/glsl/SConscript @@ -24,22 +24,26 @@ env.Prepend(LIBS = [mesautil]) # Make glcpp-parse.h and glsl_parser.h reachable from the include path. env.Append(CPPPATH = [Dir('.').abspath, Dir('glcpp').abspath]) -env.Append(YACCFLAGS = '-d -p "glcpp_parser_"') +glcpp_env = env.Clone() +glcpp_env.Append(YACCFLAGS = [ + '-d', + '-p', 'glcpp_parser_' +]) -parser_env = env.Clone() -parser_env.Append(YACCFLAGS = [ +glsl_env = env.Clone() +glsl_env.Append(YACCFLAGS = [ '--defines=%s' % File('glsl_parser.h').abspath, '-p', '_mesa_glsl_', ]) # without this line scons will expect "glsl_parser.hpp" instead of # "glsl_parser.h", causing glsl_parser.cpp to be regenerated every time -parser_env['YACCHXXFILESUFFIX'] = '.h' +glsl_env['YACCHXXFILESUFFIX'] = '.h' -glcpp_lexer = env.CFile('glcpp/glcpp-lex.c', 'glcpp/glcpp-lex.l') -glcpp_parser = env.CFile('glcpp/glcpp-parse.c', 'glcpp/glcpp-parse.y') -glsl_lexer = parser_env.CXXFile('glsl_lexer.cpp', 'glsl_lexer.ll') -glsl_parser = parser_env.CXXFile('glsl_parser.cpp', 'glsl_parser.yy') +glcpp_lexer = glcpp_env.CFile('glcpp/glcpp-lex.c', 'glcpp/glcpp-lex.l') +glcpp_parser = glcpp_env.CFile('glcpp/glcpp-parse.c', 'glcpp/glcpp-parse.y') +glsl_lexer = glsl_env.CXXFile('glsl_lexer.cpp', 'glsl_lexer.ll') +glsl_parser = glsl_env.CXXFile('glsl_parser.cpp', 'glsl_parser.yy') # common generated sources glsl_sources = [ diff --git a/src/mesa/SConscript b/src/mesa/SConscript index 72d98117378..a563fd2ff01 100644 --- a/src/mesa/SConscript +++ b/src/mesa/SConscript @@ -39,7 +39,7 @@ else: # parse Makefile.sources source_lists = env.ParseSourceList('Makefile.sources') -env.Append(YACCFLAGS = '-d -p "_mesa_program_"') +env.Append(YACCFLAGS = ['-d', '-p', '_mesa_program_']) env.CFile('program/lex.yy.c', 'program/program_lexer.l') env.CFile('program/program_parse.tab.c', 'program/program_parse.y') |