summaryrefslogtreecommitdiffstats
path: root/build/SConscript.main
diff options
context:
space:
mode:
authorsgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-03 20:08:12 +0000
committersgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-03 20:08:12 +0000
commite6430507f70668ac76560d532ed9515525bd41ae (patch)
treed38518fac757a080196f455db65c2ce9eaff0938 /build/SConscript.main
parentb0cca784f266411d95923589109f84eb6edaa763 (diff)
downloadchromium_src-e6430507f70668ac76560d532ed9515525bd41ae.zip
chromium_src-e6430507f70668ac76560d532ed9515525bd41ae.tar.gz
chromium_src-e6430507f70668ac76560d532ed9515525bd41ae.tar.bz2
Parameterize the "Hammer" subdirectory name in which we build as
$BUILD_TARGET_DIR, so it can be set to "Debug" or "Release' to mimic Visual Studio, or whatever other subdirectory the user prefers. Fix PROGRESS= on Linux so the messages go to /dev/tty. Remove the now-unnecessary in-SCons support for --clobber. Review URL: http://codereview.chromium.org/13087 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6301 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/SConscript.main')
-rw-r--r--build/SConscript.main29
1 files changed, 15 insertions, 14 deletions
diff --git a/build/SConscript.main b/build/SConscript.main
index 146f897..52ad42e 100644
--- a/build/SConscript.main
+++ b/build/SConscript.main
@@ -7,11 +7,15 @@ import shutil
import sys
+if sys.platform == 'win32':
+ console = 'con'
+else:
+ console = '/dev/tty'
p = ARGUMENTS.get('PROGRESS')
if p == 'spinner':
- Progress(['/\r', '|\r', '\\\r', '-\r'], interval=5, file=open('con', 'w'))
+ Progress(['/\r', '|\r', '\\\r', '-\r'], interval=5, file=open(console, 'w'))
elif p == 'name':
- Progress('$TARGET\r', overwrite=True, file=open('con', 'w'))
+ Progress('$TARGET\r', overwrite=True, file=open(console, 'w'))
default_warnings = ['no-missing-sconscript', 'no-no-parallel-support']
@@ -25,6 +29,13 @@ SetOption('warn', default_warnings + GetOption('warn'))
# or in the external environment when executing SCons, with the
# command line overriding any environment setting.
#
+# BUILD_TARGET_DIR
+# Specifies the target subdirectory name in which we'll
+# build everything. This is intended to mimic the Visual
+# Visual Studio "Debug\" and "Release\" subdirectories.
+# The default value is "Hammer."
+#
+#
# CHROME_BUILD_TYPE
# When set, applies settings from the file
# build\internal\release_impl${CHROME_BUILD_TYPE}.scons
@@ -45,6 +56,7 @@ SetOption('warn', default_warnings + GetOption('warn'))
#
clvars = Variables('scons.opts', ARGUMENTS)
clvars.AddVariables(
+ ('BUILD_TARGET_DIR', '', 'Hammer'),
('CHROME_BUILD_TYPE', '', os.environ.get('CHROME_BUILD_TYPE', '')),
('CHROMIUM_BUILD', '', os.environ.get('CHROMIUM_BUILD', '')),
BoolVariable('INCREMENTAL', '', os.environ.get('INCREMENTAL')),
@@ -64,7 +76,7 @@ root_env = Environment(
all_system_libs = [],
CHROME_SRC_DIR = '$MAIN_DIR/..',
- DESTINATION_ROOT = '$MAIN_DIR/Hammer',
+ DESTINATION_ROOT = '$MAIN_DIR/$BUILD_TARGET_DIR',
# Where ComponentTestProgram() will build test executables.
TESTS_DIR = '$DESTINATION_ROOT',
@@ -588,17 +600,6 @@ mac_env.Append(
)
-# Add --clobber (for the buildbot).
-# NOTE: seems to be crucial to do this before any builders are invoked.
-AddOption('--clobber', action='store_true', dest='clobber', default=False,
- help='Delete build directory before building.')
-if GetOption('clobber'):
- shutil.rmtree(root_env.Dir('$DESTINATION_ROOT').abspath, True)
- # sconsign file gets put here at the moment.
- shutil.rmtree(root_env.Dir('$MAIN_DIR/scons-out').abspath, True)
-
-
-
# -------------------------------------------------------------------------