diff options
author | sgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-18 23:26:29 +0000 |
---|---|---|
committer | sgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-18 23:26:29 +0000 |
commit | b96fc5dc177d311db220dc4039e74a9c0d871558 (patch) | |
tree | 9bbc6ea3af7c0da75d4b6025d4b475dd62eec0b2 /webkit/tools | |
parent | db8635032b1f83436a072be14e425076a7bd8164 (diff) | |
download | chromium_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 'webkit/tools')
-rw-r--r-- | webkit/tools/npapi_layout_test_plugin/SConscript | 2 | ||||
-rw-r--r-- | webkit/tools/test_shell/SConscript | 20 |
2 files changed, 11 insertions, 11 deletions
diff --git a/webkit/tools/npapi_layout_test_plugin/SConscript b/webkit/tools/npapi_layout_test_plugin/SConscript index b4568b8..339643d 100644 --- a/webkit/tools/npapi_layout_test_plugin/SConscript +++ b/webkit/tools/npapi_layout_test_plugin/SConscript @@ -13,7 +13,7 @@ input_files = [ 'TestObject.cpp' ] -if env['PLATFORM'] == 'win32': +if env.Bit('windows'): input_files.extend([ env_res.RES('npapi_layout_test_plugin.rc'), 'npapi_layout_test_plugin.def' diff --git a/webkit/tools/test_shell/SConscript b/webkit/tools/test_shell/SConscript index 85ffe48..f335a46 100644 --- a/webkit/tools/test_shell/SConscript +++ b/webkit/tools/test_shell/SConscript @@ -13,7 +13,7 @@ env.SConscript([ '$CHROME_SRC_DIR/build/using_v8.scons', ], {'env':env}) -if env['PLATFORM'] == 'win32': +if env.Bit('windows'): env_res.Append( CPPPATH = [ '.', @@ -58,7 +58,7 @@ env.Append( ], ) -if env['PLATFORM'] == 'win32': +if env.Bit('windows'): # TODO(port): put portable libs in above declaration. env.Append( LIBS = [ @@ -67,7 +67,7 @@ if env['PLATFORM'] == 'win32': ] ) -if env['PLATFORM'] == 'win32': +if env.Bit('windows'): env.Append( LIBS = [ 'comctl32.lib', @@ -90,14 +90,14 @@ if env['PLATFORM'] == 'win32': '/nxcompat', ], ) -elif env['PLATFORM'] in ('posix', 'darwin'): +elif env.Bit('posix'): env.Append( LIBS = [ 'event', ] ) -if env['PLATFORM'] == 'darwin': +if env.Bit('mac'): env.Append( CPPPATH = [ '$THIRD_PARTY_DIR/WebKit/WebKit/mac/WebCoreSupport', @@ -115,7 +115,7 @@ input_files = [ 'test_webview_delegate.cc', 'text_input_controller.cc', ] -if env['PLATFORM'] == 'win32': +if env.Bit('windows'): # TODO(port): Consider porting drag_delegate.cc and drop_delecate.cc. input_files.extend([ 'drag_delegate.cc', @@ -125,7 +125,7 @@ if env['PLATFORM'] == 'win32': 'webview_host_win.cc', 'webwidget_host_win.cc', ]) -elif env['PLATFORM'] == 'posix': +elif env.Bit('linux'): input_files.extend([ 'webview_host_gtk.cc', 'webwidget_host_gtk.cc', @@ -140,7 +140,7 @@ exe_input_files = [ 'test_shell_main.cc', ] -if env['PLATFORM'] == 'win32': +if env.Bit('windows'): # TODO(port): figure out what to do with resources. resources = [ env_res.RES('resources/test_shell.rc'), @@ -157,7 +157,7 @@ test_shell = env.ChromeProgram('test_shell', resources + exe_input_files) i = env.Install('$TARGET_ROOT', test_shell) env.Alias('webkit', i) -if env['PLATFORM'] == 'win32': +if env.Bit('windows'): env.Depends(test_shell, '$V8_DIR/vc80.pdb') test_files = [ @@ -189,7 +189,7 @@ test_files = [ '$V8_DIR/snapshot-empty$OBJSUFFIX', ] -if env['PLATFORM'] == 'win32': +if env.Bit('windows'): # TODO(port): put portable files in above test_files declaration. test_files.extend([ 'plugin_tests.cc', |