summaryrefslogtreecommitdiffstats
path: root/src/compiler/Makefile.glsl.am
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2015-04-15 16:59:43 -0700
committerIan Romanick <[email protected]>2016-08-30 16:28:00 -0700
commit7d6af9e59935959689ac9611f17abc06c6837f16 (patch)
treeb918953b0f8e936ae0bb9bc42111179fa110df92 /src/compiler/Makefile.glsl.am
parent10f9901bcef7724cb72fb2fe7e3dd8d6660d2f34 (diff)
glsl: Generate ir_expression_operation.h from Python
There are differences in where end-of-line comments are placed, but 'diff -wud' is clean. v2: Massive rebase. v3: With much help from José Fonseca, fix SCons build. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]> Acked-by: Dylan Baker <[email protected]>
Diffstat (limited to 'src/compiler/Makefile.glsl.am')
-rw-r--r--src/compiler/Makefile.glsl.am8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/compiler/Makefile.glsl.am b/src/compiler/Makefile.glsl.am
index bfb31613f33..0dba6189c63 100644
--- a/src/compiler/Makefile.glsl.am
+++ b/src/compiler/Makefile.glsl.am
@@ -25,6 +25,7 @@ EXTRA_DIST += glsl/tests glsl/glcpp/tests glsl/README \
glsl/TODO glsl/glcpp/README \
glsl/glsl_lexer.ll \
glsl/glsl_parser.yy \
+ glsl/ir_expression_operation.py \
glsl/glcpp/glcpp-lex.l \
glsl/glcpp/glcpp-parse.y \
SConscript.glsl
@@ -178,6 +179,7 @@ am__v_YACC_1 =
YACC_GEN = $(AM_V_YACC)$(YACC) $(YFLAGS)
LEX_GEN = $(AM_V_LEX)$(LEX) $(LFLAGS)
+PYTHON_GEN = $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS)
glsl/glsl_parser.cpp glsl/glsl_parser.h: glsl/glsl_parser.yy
$(MKDIR_GEN)
@@ -195,6 +197,10 @@ glsl/glcpp/glcpp-lex.c: glsl/glcpp/glcpp-lex.l
$(MKDIR_GEN)
$(LEX_GEN) -o $@ $(srcdir)/glsl/glcpp/glcpp-lex.l
+glsl/ir_expression_operation.h: glsl/ir_expression_operation.py
+ $(MKDIR_GEN)
+ $(PYTHON_GEN) $(srcdir)/glsl/ir_expression_operation.py > $@ || ($(RM) $@; false)
+
# Only the parsers (specifically the header files generated at the same time)
# need to be in BUILT_SOURCES. Though if we list the parser headers YACC is
# called for the .c/.cpp file and the .h files. By listing the .c/.cpp files
@@ -204,6 +210,7 @@ glsl/glcpp/glcpp-lex.c: glsl/glcpp/glcpp-lex.l
BUILT_SOURCES += \
glsl/glsl_parser.cpp \
glsl/glsl_lexer.cpp \
+ glsl/ir_expression_operation.h \
glsl/glcpp/glcpp-parse.c \
glsl/glcpp/glcpp-lex.c
CLEANFILES += \
@@ -211,6 +218,7 @@ CLEANFILES += \
glsl/glsl_parser.h \
glsl/glsl_parser.cpp \
glsl/glsl_lexer.cpp \
+ glsl/ir_expression_operation.h \
glsl/glcpp/glcpp-parse.c \
glsl/glcpp/glcpp-lex.c