diff options
author | sgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-06 21:33:46 +0000 |
---|---|---|
committer | sgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-06 21:33:46 +0000 |
commit | 40c3f52941c7aeb960fda325c952874951eadf7d (patch) | |
tree | 4c423a17fc25e4410ac5615411b27e1eb12e36b0 /webkit | |
parent | dc7588ee74d08438c6475cc0202516a7f2a51b0e (diff) | |
download | chromium_src-40c3f52941c7aeb960fda325c952874951eadf7d.zip chromium_src-40c3f52941c7aeb960fda325c952874951eadf7d.tar.gz chromium_src-40c3f52941c7aeb960fda325c952874951eadf7d.tar.bz2 |
Build test_shell and test_shell_tests on Linux from gyp-generated scons files:
* Catch up to recent changes:
* Rename RenderThemeChromiumGtk.cpp to RenderThemeChromiumLinux.cpp.
* Fix spelling of V*NPObject.{cpp,h}
* Explicitly include varions WebCore *Gtk.cpp and *Linux.cpp files that
are excluded by the general regular expression.
* Add webinput_event_util.cc.
* Exclude glue/plugins/plugin_stubs.cc.
* Add a Linux test_shell_resources target to build
test_shell_resources.{h,pak}.
* Add an explicit test_shell action to repack resources into test_shell.pak.
* Use -Wno-multichar when building libtest_shell_common.a.
* Use -DWTF_USE_PTHREADS when building libwtf.a, and when dependent
targets compile against it.
* Use tools/test_shell/test_shell_main{,_GYP}.scons as the main
entry point for GYP-based builds of webkit.
* Add base/gfx/gtk_util.cc to the base build.
Review URL: http://codereview.chromium.org/39219
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11160 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/tools/test_shell/test_shell.gyp | 73 | ||||
-rw-r--r-- | webkit/webkit.gyp | 40 |
2 files changed, 102 insertions, 11 deletions
diff --git a/webkit/tools/test_shell/test_shell.gyp b/webkit/tools/test_shell/test_shell.gyp index 1770e5b..9f3de86 100644 --- a/webkit/tools/test_shell/test_shell.gyp +++ b/webkit/tools/test_shell/test_shell.gyp @@ -81,7 +81,17 @@ '../../webkit.gyp:webkit', ], 'conditions': [ - ['OS!="linux"', {'sources/': [['exclude', '_gtk\\.cc$']]}], + ['OS=="linux"', { + 'dependencies': [ + 'test_shell_resources', + ], + # for: test_shell_gtk.cc + 'cflags': ['-Wno-multichar'], + }, { # else: OS!=linux + 'sources/': [ + ['exclude', '_gtk\\.cc$'] + ], + }], ['OS=="mac"', { 'sources': [ # Windows/Linux use this code normally when constructing events, so @@ -144,6 +154,32 @@ 'INFOPLIST_FILE': 'mac/Info.plist', }, 'conditions': [ + ['OS=="linux"', { + 'dependencies': [ + '../../../net/net.gyp:net_resources', + '../../webkit.gyp:glue', # for webkit_{resources,strings_en-US}.pak + 'test_shell_resources', + ], + 'actions': [ + { + 'action_name': 'test_shell_repack', + 'inputs': [ + '<(SHARED_INTERMEDIATE_DIR)/grit_derived_sources/net_resources.pak', + '<(SHARED_INTERMEDIATE_DIR)/grit_derived_sources/test_shell_resources.pak', + '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources.pak', + '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_strings_en-US.pak', + ], + 'outputs': [ + '<(PRODUCT_DIR)/test_shell.pak', + ], + 'action': ['python', '../tools/data_pack/repack.py', '<@(_outputs)', '<@(_inputs)'], + }, + ], + 'scons_depends': [ + ['<(PRODUCT_DIR)/test_shell'], + ['<(PRODUCT_DIR)/test_shell.pak'], + ], + }], ['OS=="mac"', { 'product_name': 'TestShell', 'variables': { @@ -235,4 +271,39 @@ ], }, ], + 'conditions': [ + ['OS=="linux"', { + 'targets': [ + { + 'target_name': 'test_shell_resources', + 'type': 'none', + 'sources': [ + 'test_shell_resources.grd', + ], + # This was orignally in grit_resources.rules + # NOTE: this version doesn't mimic the Properties specified there. + 'rules': [ + { + 'rule_name': 'grit', + 'extension': 'grd', + 'inputs': [ + '../../../tools/grit/grit.py', + ], + 'outputs': [ + '<(SHARED_INTERMEDIATE_DIR)/grit_derived_sources/grit/<(RULE_INPUT_ROOT).h', + '<(SHARED_INTERMEDIATE_DIR)/grit_derived_sources/<(RULE_INPUT_ROOT).pak', + ], + 'action': + ['python', '../tools/grit/grit.py', '-i', '<(RULE_INPUT_PATH)', 'build', '-o', '<(SHARED_INTERMEDIATE_DIR)/grit_derived_sources'], + }, + ], + 'direct_dependent_settings': { + 'include_dirs': [ + '<(SHARED_INTERMEDIATE_DIR)/grit_derived_sources', + ], + }, + }, + ], + }], + ], } diff --git a/webkit/webkit.gyp b/webkit/webkit.gyp index 98d2dae..a258baa 100644 --- a/webkit/webkit.gyp +++ b/webkit/webkit.gyp @@ -349,6 +349,12 @@ '<(SHARED_INTERMEDIATE_DIR)/webkit', ], }], + ['OS=="linux"', { + 'defines': ['WTF_USE_PTHREADS=1'], + 'direct_dependent_settings': { + 'defines': ['WTF_USE_PTHREADS=1'], + }, + }], ], }, { @@ -1068,8 +1074,8 @@ 'port/bindings/v8/v8_nodefilter.h', 'port/bindings/v8/V8NPUtils.cpp', 'port/bindings/v8/V8NPUtils.h', - 'port/bindings/v8/V8NPobject.cpp', - 'port/bindings/v8/V8NPobject.h', + 'port/bindings/v8/V8NPObject.cpp', + 'port/bindings/v8/V8NPObject.h', 'port/bindings/v8/v8_proxy.cpp', 'port/bindings/v8/v8_proxy.h', 'port/bindings/v8/v8_utility.h', @@ -3175,8 +3181,8 @@ '../third_party/WebKit/WebCore/rendering/RenderTextFragment.h', '../third_party/WebKit/WebCore/rendering/RenderTheme.cpp', '../third_party/WebKit/WebCore/rendering/RenderTheme.h', - '../third_party/WebKit/WebCore/rendering/RenderThemeChromiumGtk.cpp', - '../third_party/WebKit/WebCore/rendering/RenderThemeChromiumGtk.h', + '../third_party/WebKit/WebCore/rendering/RenderThemeChromiumLinux.cpp', + '../third_party/WebKit/WebCore/rendering/RenderThemeChromiumLinux.h', '../third_party/WebKit/WebCore/rendering/RenderThemeChromiumMac.h', '../third_party/WebKit/WebCore/rendering/RenderThemeChromiumMac.mm', '../third_party/WebKit/WebCore/rendering/RenderThemeChromiumWin.cpp', @@ -3913,13 +3919,21 @@ # Not yet ported to Linux. '../third_party/WebKit/WebCore/platform/graphics/chromium/FontCustomPlatformData.cpp', ], - 'defines': ['WTF_USE_PTHREADS=1'], + 'sources/': [ + # Cherry-pick files excluded by the broader regular expressions above. + ['include', 'third_party/WebKit/WebCore/platform/chromium/KeyCodeConversionGtk\\.cpp$'], + ['include', 'third_party/WebKit/WebCore/platform/graphics/chromium/FontCacheLinux\\.cpp$'], + ['include', 'third_party/WebKit/WebCore/platform/graphics/chromium/FontLinux\\.cpp$'], + ['include', 'third_party/WebKit/WebCore/platform/graphics/chromium/FontPlatformDataLinux\\.cpp$'], + ['include', 'third_party/WebKit/WebCore/platform/graphics/chromium/GlyphPageTreeNodeLinux\\.cpp$'], + ['include', 'third_party/WebKit/WebCore/platform/graphics/chromium/SimpleFontDataLinux\\.cpp$'], + ], # for: # .../WebCore/platform/image-decoders/bmp/BMPImageDecoder.cpp 'cflags': ['-Wno-multichar'], - # TODO(sgk): unnecessary once common.gypi gets Linux settings - # necessary to avoid build failure due to warnings generated by: - # ../third_party/WebKit/WebCore/dom/Document.cpp + # TODO(sgk): unnecessary once common.gypi gets Linux settings + # necessary to avoid build failure due to warnings generated by: + # ../third_party/WebKit/WebCore/dom/Document.cpp 'scons_remove' : {'CXXFLAGS' : ['-Werror']}, }], ['OS=="mac"', { @@ -4289,6 +4303,8 @@ 'glue/webinputevent.h', 'glue/webinputevent_linux.cc', 'glue/webinputevent_mac.mm', + 'glue/webinputevent_util.cc', + 'glue/webinputevent_util.h', 'glue/webinputevent_win.cc', 'glue/webkit_glue.cc', 'glue/webkit_glue.h', @@ -4338,8 +4354,12 @@ 'webcore', ], 'conditions': [ - ['OS!="linux"', { - 'sources/': [['exclude', '_(linux|gtk)(_data)?\\.cc$']] + ['OS=="linux"', { + 'sources!': [ + 'glue/plugins/plugin_stubs.cc', + ], + }, { # else: OS!="linux" + 'sources/': [['exclude', '_(linux|gtk)(_data)?\\.cc$']], }], ['OS!="mac"', { 'sources/': [['exclude', '_mac\\.(cc|mm)$']] |