glsl2/Makefile: Add a 'make builtins' target.
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 14 Aug 2010 00:46:25 +0000 (17:46 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Sat, 14 Aug 2010 02:09:36 +0000 (19:09 -0700)
This copies over a dummy builtin_functions.cpp and rebuilds a
bootstrapped version of the compiler, then uses that to generate the
proper list of builtins.  Finally, it rebuilds the compiler with the new
list.

Unfortunately, it's no longer automatic, but at least it works.

src/glsl/Makefile

index b13a612591b039617c68398830cf9ba50c16f8b2..1d200b47b40b3458d01e34422fd2a1161829f2a7 100644 (file)
@@ -164,8 +164,13 @@ glcpp/glcpp-lex.c: glcpp/glcpp-lex.l
 glcpp/glcpp-parse.c: glcpp/glcpp-parse.y
        bison -v -o "$@" --defines=glcpp/glcpp-parse.h $<
 
-builtin_function.cpp: builtins/profiles/* builtins/ir/* builtins/tools/generate_builtins.py builtins/tools/texture_builtins.py
+builtins: builtin_function.cpp builtins/profiles/* builtins/ir/* builtins/tools/generate_builtins.py builtins/tools/texture_builtins.py
+       @echo Bootstrapping the compiler...
        cp builtins/tools/builtin_function.cpp .
+       make glsl_compiler
+       @echo Regenerating builtin_function.cpp...
        ./builtins/tools/generate_builtins.py > builtin_function.cpp
+       @echo Rebuilding the real compiler...
+       make glsl_compiler
 
 -include depend