glsl/Makefile: Remove builtin_function.cpp if generation fails.
authorArkadiusz Miskiewicz <arekm@maven.pl>
Sat, 26 Feb 2011 18:26:09 +0000 (10:26 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Sat, 26 Feb 2011 18:28:00 +0000 (10:28 -0800)
Fixes bug #34346.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
src/glsl/Makefile

index 876f0dfc2a5ef68e68401d499a8761b888105d79..df031d2d548965cbbb050fad6285ced5bbea2b01 100644 (file)
@@ -208,6 +208,6 @@ builtin_compiler: $(GLSL2_OBJECTS) $(OBJECTS) builtin_stubs.o
 
 builtin_function.cpp: builtins/profiles/* builtins/ir/* builtins/tools/generate_builtins.py builtins/tools/texture_builtins.py builtin_compiler
        @echo Regenerating builtin_function.cpp...
-       $(PYTHON2) $(PYTHON_FLAGS) builtins/tools/generate_builtins.py ./builtin_compiler > builtin_function.cpp
+       $(PYTHON2) $(PYTHON_FLAGS) builtins/tools/generate_builtins.py ./builtin_compiler > builtin_function.cpp || rm -f builtin_function.cpp
 
 -include depend