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 <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Acked-by: Dylan Baker <dylan@pnwbakers.com>
diff --git a/src/compiler/SConscript.glsl b/src/compiler/SConscript.glsl
index 31d8f6d..3d28d99 100644
--- a/src/compiler/SConscript.glsl
+++ b/src/compiler/SConscript.glsl
@@ -116,6 +116,15 @@
compiler_objs += env.StaticObject("glsl/main.cpp")
+# GLSL generated sources
+
+env.CodeGenerate(
+ target = 'glsl/ir_expression_operation.h',
+ script = 'glsl/ir_expression_operation.py',
+ source = [],
+ command = python_cmd + ' $SCRIPT > $TARGET'
+)
+
glsl_compiler = env.Program(
target = 'glsl_compiler',
source = compiler_objs,