glsl: Generate ir_expression_operation_strings.h from Python
'diff -ud' is clean.
v2: Massive rebase.
v3: With much help from José Fonseca, fix the 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 3d28d99..b1b4169 100644
--- a/src/compiler/SConscript.glsl
+++ b/src/compiler/SConscript.glsl
@@ -122,7 +122,14 @@
target = 'glsl/ir_expression_operation.h',
script = 'glsl/ir_expression_operation.py',
source = [],
- command = python_cmd + ' $SCRIPT > $TARGET'
+ command = python_cmd + ' $SCRIPT enum > $TARGET'
+)
+
+env.CodeGenerate(
+ target = 'glsl/ir_expression_operation_strings.h',
+ script = 'glsl/ir_expression_operation.py',
+ source = [],
+ command = python_cmd + ' $SCRIPT strings > $TARGET'
)
glsl_compiler = env.Program(