summaryrefslogtreecommitdiffstats
path: root/chrome/SConscript
diff options
context:
space:
mode:
authorsgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-18 23:26:29 +0000
committersgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-18 23:26:29 +0000
commitb96fc5dc177d311db220dc4039e74a9c0d871558 (patch)
tree9bbc6ea3af7c0da75d4b6025d4b475dd62eec0b2 /chrome/SConscript
parentdb8635032b1f83436a072be14e425076a7bd8164 (diff)
downloadchromium_src-b96fc5dc177d311db220dc4039e74a9c0d871558.zip
chromium_src-b96fc5dc177d311db220dc4039e74a9c0d871558.tar.gz
chromium_src-b96fc5dc177d311db220dc4039e74a9c0d871558.tar.bz2
Convert from using env['PLATFORM'] directly to using the more flexible
and better-thought-out Hammer env.Bits() idioms: * env['PLATFORM'] == 'win32' => env.Bit('windows') * env['PLATFORM'] == 'posix' => env.Bit('linux') * env['PLATFORM'] == 'darwin' => env.Bit('mac') New idioms: * env.Bit('posix') => really does mean "any POSIX platform" * env.AnyBits('mac', 'linux') => specifically mac or linux, excluding other POSIX platforms Where we were using compound conditionals (e.g., "env['PLATFORM'] in ('posix', 'darwin')") I tried to take my best shot at translating the intent (i.e., "env.Bits('posix')" for something POSIX, "not env.Bits('mac')" for something not yet ported to Mac, etc.) Review URL: http://codereview.chromium.org/15051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7270 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/SConscript')
-rw-r--r--chrome/SConscript18
1 files changed, 9 insertions, 9 deletions
diff --git a/chrome/SConscript b/chrome/SConscript
index 4942449..b9bbb33 100644
--- a/chrome/SConscript
+++ b/chrome/SConscript
@@ -23,7 +23,7 @@ env.Prepend(
# TODO(port)
-if env_res['PLATFORM'] == 'win32':
+if env_res.Bit('windows'):
env_res.Append(
CPPPATH = [
'.',
@@ -139,7 +139,7 @@ env_dll.Append(
],
)
-if env_dll['PLATFORM'] == 'win32':
+if env_dll.Bit('windows'):
env_dll.Append(
LIBS = [
# TODO(sgk): to be ported to Mac and Linux
@@ -190,7 +190,7 @@ if env_dll['PLATFORM'] == 'win32':
input_files = []
-if env_dll['PLATFORM'] == 'win32':
+if env_dll.Bit('windows'):
input_files.extend([
'app/chrome_dll_main.cc',
'$V8_DIR/snapshot-empty$OBJSUFFIX',
@@ -226,7 +226,7 @@ grit_files.extend(google_chrome)
# TODO(port)
-if env_dll['PLATFORM'] == 'win32':
+if env_dll.Bit('windows'):
dll_targets = env_dll.ChromeSharedLibrary('chrome_dll/chrome',
dll_resources + input_files,
PDB='chrome_dll.pdb')
@@ -300,7 +300,7 @@ env_exe.Append(
)
# TODO(port)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
chrome_exe = env_exe.ChromeProgram(
'chrome_exe/chrome',
[
@@ -366,7 +366,7 @@ flats = [
]
# TODO(port)
-if env_flat['PLATFORM'] == 'win32':
+if env_flat.Bit('windows'):
flats_out = []
for i in flats:
flats_out.extend(env_flat.FlatHtml(i))
@@ -383,7 +383,7 @@ if not env.WantSystemLib('sqlite'):
sconscript_files.append('$THIRD_PARTY_DIR/sqlite/SConscript')
# TODO(port)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
sconscript_files.extend([
'app/resources/SConscript',
'app/theme/SConscript',
@@ -394,7 +394,7 @@ if env['PLATFORM'] == 'win32':
env.SConscript(sconscript_files, exports=['env', 'env_res', 'env_test'])
# TODO(port)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.InstallAs('$LIBS_DIR/${LIBPREFIX}jscre${LIBSUFFIX}',
'$WEBKIT_DIR/JavaScriptCore_pcre.lib')
@@ -408,7 +408,7 @@ gears_plugins = [
]
# TODO(port)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Install('$DESTINATION_ROOT/plugins/gears', gears_plugins)
env.Command('$DESTINATION_ROOT/resources/inspector',