scons: Preliminary code for quieting command lines.
This commit is contained in:
@@ -55,9 +55,6 @@ env = Environment(
|
|||||||
ENV = os.environ)
|
ENV = os.environ)
|
||||||
Help(opts.GenerateHelpText(env))
|
Help(opts.GenerateHelpText(env))
|
||||||
|
|
||||||
# for debugging
|
|
||||||
#print env.Dump()
|
|
||||||
|
|
||||||
# replicate options values in local variables
|
# replicate options values in local variables
|
||||||
debug = env['debug']
|
debug = env['debug']
|
||||||
dri = env['dri']
|
dri = env['dri']
|
||||||
@@ -87,6 +84,7 @@ Export([
|
|||||||
# TODO: put the compiler specific settings in separate files
|
# TODO: put the compiler specific settings in separate files
|
||||||
# TODO: auto-detect as much as possible
|
# TODO: auto-detect as much as possible
|
||||||
|
|
||||||
|
common.generate(env)
|
||||||
|
|
||||||
if platform == 'winddk':
|
if platform == 'winddk':
|
||||||
env.Tool('winddk', ['.'])
|
env.Tool('winddk', ['.'])
|
||||||
@@ -219,9 +217,6 @@ if platform not in ('winddk',):
|
|||||||
'Xfixes',
|
'Xfixes',
|
||||||
])
|
])
|
||||||
|
|
||||||
# Convenience library support
|
|
||||||
common.createConvenienceLibBuilder(env)
|
|
||||||
|
|
||||||
Export('env')
|
Export('env')
|
||||||
|
|
||||||
|
|
||||||
|
27
common.py
27
common.py
@@ -47,6 +47,7 @@ def AddOptions(opts):
|
|||||||
from SCons.Options.BoolOption import BoolOption
|
from SCons.Options.BoolOption import BoolOption
|
||||||
from SCons.Options.EnumOption import EnumOption
|
from SCons.Options.EnumOption import EnumOption
|
||||||
opts.Add(BoolOption('debug', 'build debug version', 'no'))
|
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,
|
opts.Add(EnumOption('machine', 'use machine-specific assembly code', default_machine,
|
||||||
allowed_values=('generic', 'x86', 'x86_64')))
|
allowed_values=('generic', 'x86', 'x86_64')))
|
||||||
opts.Add(EnumOption('platform', 'target platform', default_platform,
|
opts.Add(EnumOption('platform', 'target platform', default_platform,
|
||||||
@@ -55,6 +56,19 @@ def AddOptions(opts):
|
|||||||
opts.Add(BoolOption('dri', 'build DRI drivers', default_dri))
|
opts.Add(BoolOption('dri', 'build DRI drivers', default_dri))
|
||||||
|
|
||||||
|
|
||||||
|
#######################################################################
|
||||||
|
# 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
|
# Convenience Library Builder
|
||||||
# based on the stock StaticLibrary and SharedLibrary builders
|
# 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'))
|
env.SConsignFile(os.path.join(build_dir, '.sconsign'))
|
||||||
return build_dir
|
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()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user