diff options
author | José Fonseca <[email protected]> | 2011-03-03 16:57:38 +0000 |
---|---|---|
committer | José Fonseca <[email protected]> | 2011-03-03 16:57:38 +0000 |
commit | 5d0e8beaa2051c28a7ac941e8aaad286e39e1267 (patch) | |
tree | 7dd94807f04c54e730d73b9a51a5e019a402236e /src/glsl | |
parent | dbfbb8cf6da472e9000481ebd6a2a6b4e4845560 (diff) |
scons: More tweaks to fix MinGW build.
Diffstat (limited to 'src/glsl')
-rw-r--r-- | src/glsl/SConscript | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/src/glsl/SConscript b/src/glsl/SConscript index c2e5d45ebad..bb02a87c790 100644 --- a/src/glsl/SConscript +++ b/src/glsl/SConscript @@ -14,19 +14,22 @@ env.Prepend(CPPPATH = [ '#src/glsl/glcpp', ]) +# Make glcpp/glcpp-parse.h and glsl_parser.h reacheable from the include path +env.Append(CPPPATH = [Dir('.').abspath]) + env.Append(YACCFLAGS = '-d') -parser_env = env.Clone(); -parser_env.Append(YACCFLAGS = ['--defines=src/glsl/glsl_parser.h', '-p', '_mesa_glsl_']) +parser_env = env.Clone() +parser_env.Append(YACCFLAGS = [ + '--defines=%s' % File('glsl_parser.h').abspath, + '-p', '_mesa_glsl_', +]) 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') -# Make glcpp/glcpp-parse.h reacheable from the include path -env.Append(CPPPATH = [glcpp_parser[0].dir.up()]) - sources = [ glcpp_lexer, glcpp_parser[0], @@ -110,6 +113,10 @@ else: '#src/mesa/program/symbol_table.c'], ) + # SCons builtin dependency scanner doesn't detect that glsl_lexer.ll + # depends on glsl_parser.h + env.Depends(builtin_compiler, glsl_parser) + builtin_glsl_function = env.CodeGenerate( target = 'builtin_function.cpp', script = 'builtins/tools/generate_builtins.py', @@ -132,6 +139,10 @@ glsl = env.ConvenienceLibrary( source = sources, ) +# SCons builtin dependency scanner doesn't detect that glsl_lexer.ll depends on +# glsl_parser.h +env.Depends(glsl, glsl_parser) + Export('glsl') # FIXME: We can't build the programs because there's a cyclic dependency between tis directory and src/mesa |