OSDN Git Service

scons: Output nice summary messages instead of long command lines.
authorJosé Fonseca <jfonseca@vmware.com>
Wed, 3 Jun 2009 01:23:12 +0000 (18:23 -0700)
committerJosé Fonseca <jfonseca@vmware.com>
Wed, 3 Jun 2009 01:23:12 +0000 (18:23 -0700)
You can still get the old behavior by passing the option quiet=no to scons.

common.py
scons/gallium.py

index e57429e..a687efc 100644 (file)
--- a/common.py
+++ b/common.py
@@ -55,7 +55,7 @@ def AddOptions(opts):
                from SCons.Options.EnumOption import EnumOption
        opts.Add(BoolOption('debug', 'debug build', 'no'))
        opts.Add(BoolOption('profile', 'profile build', 'no'))
-       #opts.Add(BoolOption('quiet', 'quiet command lines', 'no'))
+       opts.Add(BoolOption('quiet', 'quiet command lines', 'yes'))
        opts.Add(EnumOption('machine', 'use machine-specific assembly code', default_machine,
                                                                                         allowed_values=('generic', 'ppc', 'x86', 'x86_64')))
        opts.Add(EnumOption('platform', 'target platform', default_platform,
index c7e74d7..5e59636 100644 (file)
@@ -42,11 +42,17 @@ import SCons.Scanner
 def quietCommandLines(env):
     # Quiet command lines
     # See also http://www.scons.org/wiki/HidingCommandLinesInOutput
+    env['ASCOMSTR'] = "Assembling $SOURCE ..."
     env['CCCOMSTR'] = "Compiling $SOURCE ..."
+    env['SHCCCOMSTR'] = "Compiling $SOURCE ..."
     env['CXXCOMSTR'] = "Compiling $SOURCE ..."
+    env['SHCXXCOMSTR'] = "Compiling $SOURCE ..."
     env['ARCOMSTR'] = "Archiving $TARGET ..."
-    env['RANLIBCOMSTR'] = ""
+    env['RANLIBCOMSTR'] = "Indexing $TARGET ..."
     env['LINKCOMSTR'] = "Linking $TARGET ..."
+    env['SHLINKCOMSTR'] = "Linking $TARGET ..."
+    env['LDMODULECOMSTR'] = "Linking $TARGET ..."
+    env['SWIGCOMSTR'] = "Generating $TARGET ..."
 
 
 def createConvenienceLibBuilder(env):
@@ -185,9 +191,8 @@ def num_jobs():
 def generate(env):
     """Common environment generation code"""
 
-    # FIXME: this is already too late
-    #if env.get('quiet', False):
-    #    quietCommandLines(env)
+    if env.get('quiet', True):
+        quietCommandLines(env)
 
     # Toolchain
     platform = env['platform']