diff options
author | José Fonseca <jrfonseca@tungstengraphics.com> | 2008-03-04 14:29:27 +0100 |
---|---|---|
committer | José Fonseca <jrfonseca@tungstengraphics.com> | 2008-03-05 11:39:11 +0100 |
commit | 5aa108214a21181406ec38a2fd5e82a279348f77 (patch) | |
tree | d903e6460226cd40b50725892fa44c85f7690ea7 /common.py | |
parent | 19cc2e363185b50d19e4f257dd3558896b9b49d3 (diff) |
scons: Preliminary code for quieting command lines.
Diffstat (limited to 'common.py')
-rw-r--r-- | common.py | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/common.py b/common.py index 1e5f7dad39b..b836a8b41db 100644 --- a/common.py +++ b/common.py @@ -47,6 +47,7 @@ def AddOptions(opts): from SCons.Options.BoolOption import BoolOption from SCons.Options.EnumOption import EnumOption opts.Add(BoolOption('debug', 'build debug version', 'no')) + #opts.Add(BoolOption('quiet', 'quiet command lines', 'no')) opts.Add(EnumOption('machine', 'use machine-specific assembly code', default_machine, allowed_values=('generic', 'x86', 'x86_64'))) opts.Add(EnumOption('platform', 'target platform', default_platform, @@ -56,6 +57,19 @@ def AddOptions(opts): ####################################################################### +# Quiet command lines +# +# See also http://www.scons.org/wiki/HidingCommandLinesInOutput + +def quietCommandLines(env): + env['CCCOMSTR'] = "Compiling $SOURCE ..." + env['CXXCOMSTR'] = "Compiling $SOURCE ..." + env['ARCOMSTR'] = "Archiving $TARGET ..." + env['RANLIBCOMSTR'] = "" + env['LINKCOMSTR'] = "Linking $TARGET ..." + + +####################################################################### # Convenience Library Builder # based on the stock StaticLibrary and SharedLibrary builders @@ -111,3 +125,16 @@ def make_build_dir(env): env.SConsignFile(os.path.join(build_dir, '.sconsign')) return build_dir + +####################################################################### +# Common environment generation code + +def generate(env): + # FIXME: this is already too late + #if env.get('quiet', False): + # quietCommandLines(env) + createConvenienceLibBuilder(env) + + # for debugging + #print env.Dump() + |