path: root/src/glsl/
diff options
authorJon TURNEY <>2012-07-13 22:29:03 +0100
committerJon TURNEY <>2012-07-15 15:27:26 +0100
commit81de0431d6f52084e01874163657e141e6beffdf (patch)
tree660cb75e7ecd20ba484d117f29f92e17084010a6 /src/glsl/
parentbc6bff79475ab0996923a105fa699a19fb65455e (diff)
Fix building glsl when using automake-1.12 after 68e04cc6
Commit 68e04cc6 was tested using automake-1.11. Unfortunately, automake-1.12 made a "slightly backward-incompatible change" in the use of yacc with C++, and for a .yy file, the generated header file is now named .hh, not .h To work with both, write our own rule for running yacc, which generates a header file named .h, rather than using automake's rule. Also, remove things from BUILD_SOURCES which don't need to be there Also, update EXCLUDE rules in doxygen/glsl.doxy, for change of generated files from .cpp -> .cc, and glsl_lexer.h has never existed. Signed-off-by: Jon TURNEY <>
Diffstat (limited to 'src/glsl/')
1 files changed, 10 insertions, 4 deletions
diff --git a/src/glsl/ b/src/glsl/
index 2b9ca2cbaf9..d86153c48bb 100644
--- a/src/glsl/
+++ b/src/glsl/
@@ -37,7 +37,6 @@ AM_CFLAGS = \
-AM_YFLAGS = -v -d -p "_mesa_glsl_"
AM_LFLAGS = --nounistd -o$(LEX_OUTPUT_ROOT).c
@@ -49,7 +48,7 @@ noinst_PROGRAMS = glsl_compiler glsl_test builtin_compiler
# common sources for builtin_compiler and libglsl
libglslcommon_la_SOURCES = \
glsl_lexer.ll \
- glsl_parser.yy \
+ \
@@ -87,8 +86,15 @@ builtin_compiler_SOURCES = \
builtin_compiler_LDADD =
-BUILT_SOURCES = glsl_parser.h builtin_function.cpp
+# automake <=1.11 and automake >=1.12 have different conventions for naming C++ header files
+# made by yacc. To work with both, we write our own rule rather than using automake's.
+# When (if) we require automake >=1.12 in, this can be removed, and we can use
+# the automake rule. glsl_parser.h: glsl_parser.yy
+ $(AM_V_GEN) $(YACC) -v -o -p "_mesa_glsl_" --defines=glsl_parser.h $<
+BUILT_SOURCES = glsl_parser.h builtin_function.cpp
builtin_function.cpp: builtins/profiles/* builtins/ir/* builtins/glsl/* builtins/tools/ builtins/tools/ builtin_compiler$(EXEEXT)
$(AM_V_GEN) $(PYTHON2) $(PYTHON_FLAGS) builtins/tools/ ./builtin_compiler > builtin_function.cpp || rm -f builtin_function.cpp