diff options
author | bradnelson@chromium.org <bradnelson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-04 19:35:47 +0000 |
---|---|---|
committer | bradnelson@chromium.org <bradnelson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-04 19:35:47 +0000 |
commit | 5a17959168f700202c3ee498e88cca7bcfa43a97 (patch) | |
tree | f0c8d497ded5551516310cebec76c3395880c19c /site_scons/site_tools/component_setup.py | |
parent | aedd85af7d7d0c90ed343ece4c66660db00841ec (diff) | |
download | chromium_src-5a17959168f700202c3ee498e88cca7bcfa43a97.zip chromium_src-5a17959168f700202c3ee498e88cca7bcfa43a97.tar.gz chromium_src-5a17959168f700202c3ee498e88cca7bcfa43a97.tar.bz2 |
Pulling in hammer changes.
Review URL: http://codereview.chromium.org/13134
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6370 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'site_scons/site_tools/component_setup.py')
-rw-r--r-- | site_scons/site_tools/component_setup.py | 46 |
1 files changed, 44 insertions, 2 deletions
diff --git a/site_scons/site_tools/component_setup.py b/site_scons/site_tools/component_setup.py index a9ec5c0..7155655 100644 --- a/site_scons/site_tools/component_setup.py +++ b/site_scons/site_tools/component_setup.py @@ -70,9 +70,11 @@ def PreEvaluateVariables(env): Args: env: Environment for the current build mode. """ - # Convert directory variables to strings + # Convert directory variables to strings. Must use .abspath not str(), since + # otherwise $OBJ_ROOT is converted to a relative path, which evaluates + # improperly in SConscripts not in $MAIN_DIR. for var in env.SubstList2('$PRE_EVALUATE_DIRS'): - env[var] = str(env.Dir('$' + var)) + env[var] = env.Dir('$' + var).abspath #------------------------------------------------------------------------------ @@ -195,6 +197,46 @@ def generate(env): # default to do so after including the component_setup tool. env.Default('$DESTINATION_ROOT') + # Use brief command line strings if necessary + SCons.Script.Help("""\ + --verbose Print verbose output while building, including + the full command lines for all commands. + --brief Print brief output while building (the default). + This and --verbose are opposites. Use --silent + to turn off all output. +""") + SCons.Script.AddOption( + '--brief', + dest='brief_comstr', + default=True, + action='store_true', + help='brief command line output') + SCons.Script.AddOption( + '--verbose', + dest='brief_comstr', + default=True, + action='store_false', + help='verbose command line output') + if env.GetOption('brief_comstr'): + env.SetDefault( + ARCOMSTR='________Creating library $TARGET', + ASCOMSTR='________Assembling $TARGET', + CCCOMSTR='________Compiling $TARGET', + CONCAT_SOURCE_COMSTR='________ConcatSource $TARGET', + CXXCOMSTR='________Compiling $TARGET', + LDMODULECOMSTR='________Building loadable module $TARGET', + LINKCOMSTR='________Linking $TARGET', + MANIFEST_COMSTR='________Updating manifest for $TARGET', + MIDLCOMSTR='________Compiling IDL $TARGET', + PCHCOMSTR='________Precompiling $TARGET', + RANLIBCOMSTR='________Indexing $TARGET', + RCCOMSTR='________Compiling resource $TARGET', + SHCCCOMSTR='________Compiling $TARGET', + SHCXXCOMSTR='________Compiling $TARGET', + SHLINKCOMSTR='________Linking $TARGET', + SHMANIFEST_COMSTR='________Updating manifest for $TARGET', + ) + # Add other default tools from our toolkit # TODO(rspangler): Currently this needs to be before SOURCE_ROOT in case a # tool needs to redefine it. Need a better way to handle order-dependency |