Mesa (master): scons: User friendly message for code generated files

Jose Fonseca jrfonseca at kemper.freedesktop.org
Wed Feb 10 22:33:52 UTC 2010


Module: Mesa
Branch: master
Commit: 2311e2adf0db3c46a1054d94cdfcd2ec0badbfd3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2311e2adf0db3c46a1054d94cdfcd2ec0badbfd3

Author: José Fonseca <jfonseca at vmware.com>
Date:   Tue Feb  9 23:16:26 2010 +0000

scons: User friendly message for code generated files

---

 scons/custom.py                          |    4 +++-
 src/mesa/shader/slang/library/SConscript |    4 ++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/scons/custom.py b/scons/custom.py
index 572b963..364da29 100644
--- a/scons/custom.py
+++ b/scons/custom.py
@@ -56,6 +56,7 @@ def quietCommandLines(env):
     env['SHLINKCOMSTR'] = "  Linking $TARGET ..."
     env['LDMODULECOMSTR'] = "  Linking $TARGET ..."
     env['SWIGCOMSTR'] = "  Generating $TARGET ..."
+    env['CODEGENCOMSTR'] = "  Generating $TARGET ..."
 
 
 def createConvenienceLibBuilder(env):
@@ -125,7 +126,8 @@ def code_generate(env, script, target, source, command):
 
     # This command creates generated code *in the build directory*.
     command = command.replace('$SCRIPT', script_src.path)
-    code = env.Command(target, source, command)
+    action = SCons.Action.Action(command, "$CODEGENCOMSTR")
+    code = env.Command(target, source, action)
 
     # Explicitly mark that the generated code depends on the generator,
     # and on implicitly imported python modules
diff --git a/src/mesa/shader/slang/library/SConscript b/src/mesa/shader/slang/library/SConscript
index ef13114..0b25467 100644
--- a/src/mesa/shader/slang/library/SConscript
+++ b/src/mesa/shader/slang/library/SConscript
@@ -12,13 +12,13 @@ def glsl_compile_emitter(target, source, env):
 	return (target, source)
  
 bld_frag = Builder(
-	action = glsl_compile[0].abspath + ' fragment $SOURCE $TARGET',
+	action = Action(glsl_compile[0].abspath + ' fragment $SOURCE $TARGET', '$CODEGENCODESTR'),
 	emitter = glsl_compile_emitter,
 	suffix = '.gc',
 	src_suffix = '_gc.h')
 	
 bld_vert = Builder(
-	action = glsl_compile[0].abspath + ' vertex $SOURCE $TARGET',
+	action = Action(glsl_compile[0].abspath + ' vertex $SOURCE $TARGET', '$CODEGENCODESTR'),
 	emitter = glsl_compile_emitter,
 	suffix = '.gc',
 	src_suffix = '_gc.h')




More information about the mesa-commit mailing list