From 2b859529c112c8f5dd3a3a855c477521f957c8f5 Mon Sep 17 00:00:00 2001 From: "sgk@google.com" Date: Mon, 3 Nov 2008 18:44:12 +0000 Subject: Convert chrome/common to new SCons naming: * Rename chrome/common/SConscript to chrome/common/common.scons. * Use the new using_*.scons files for settings. * Split build of ipc_tests.exe into chrome/common/ipc_tests.scons. Review URL: http://codereview.chromium.org/9253 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4466 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/SConscript | 1 - chrome/chrome.scons | 2 + chrome/common/SConscript | 184 ------------------------------------------ chrome/common/common.scons | 117 +++++++++++++++++++++++++++ chrome/common/ipc_tests.scons | 83 +++++++++++++++++++ 5 files changed, 202 insertions(+), 185 deletions(-) delete mode 100644 chrome/common/SConscript create mode 100644 chrome/common/common.scons create mode 100644 chrome/common/ipc_tests.scons diff --git a/chrome/SConscript b/chrome/SConscript index 2c271c1..042d25d 100644 --- a/chrome/SConscript +++ b/chrome/SConscript @@ -399,7 +399,6 @@ if env['PLATFORM'] == 'win32': env.SConscript(test_sconscript_files, exports=['env_test']) sconscript_files = [ - 'common/SConscript', 'plugin/SConscript', 'renderer/SConscript', 'test/chrome_plugin/SConscript', diff --git a/chrome/chrome.scons b/chrome/chrome.scons index b94e8f0..60f6e0c 100644 --- a/chrome/chrome.scons +++ b/chrome/chrome.scons @@ -13,6 +13,8 @@ sconscript_files = [ 'browser/browser.scons', 'test/unit/unit_tests.scons', + 'common/common.scons', + 'common/ipc_tests.scons', ] SConscript(sconscript_files, exports=['env']) diff --git a/chrome/common/SConscript b/chrome/common/SConscript deleted file mode 100644 index 52c9e0e..0000000 --- a/chrome/common/SConscript +++ /dev/null @@ -1,184 +0,0 @@ -# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -Import('env', 'env_test') - -env = env.Clone() - -env.Prepend( - CPPPATH = [ - '$CHROME_DIR/app/resources', - '/chrome/tools/build/win', - '$CHROME_SRC_DIR', - ], - CPPDEFINES = [ - 'U_STATIC_IMPLEMENTATION', - ], -) - -if env['PLATFORM'] == 'win32': - env.Prepend( - CCFLAGS = [ - '/TP', - ], - ) - -env.Append( - CPPPATH = [ - 'third_party/wtl/include', - '$NPAPI_DIR', - '$LIBXML_DIR/DerivedSources/include', - '$LIBXML_DIR/include', - - 'app', - '$WEBKIT_DIR/build/localized_strings', - - '$SKIA_DIR/include', - '$SKIA_DIR/include/corecg', - '$SKIA_DIR/platform', - '$LIBPNG_DIR', - '$ZLIB_DIR', - '$BREAKPAD_DIR/src', - '$LIBJPEG_DIR', - '$ICU38_DIR/public/common', - '$ICU38_DIR/public/i18n', - ], -) - -input_files = [] - -if env['PLATFORM'] in ('posix', 'win32'): - # TODO(port): Port to Mac. - input_files.extend([ - 'animation.cc', - 'chrome_constants.cc', - 'chrome_counters.cc', - 'chrome_switches.cc', - 'debug_flags.cc', - 'env_vars.cc', - 'gfx/color_utils.cc', - 'ipc_message.cc', - 'jpeg_codec.cc', - 'json_value_serializer.cc', - 'libxml_utils.cc', - 'net/cookie_monster_sqlite.cc', - 'notification_service.cc', - 'pref_member.cc', - 'pref_names.cc', - 'slide_animation.cc', - 'sqlite_compiled_statement.cc', - 'sqlite_utils.cc', - 'task_queue.cc', - 'throb_animation.cc', - 'thumbnail_score.cc', - 'visitedlink_common.cc', - ]) - -if env['PLATFORM'] == 'win32': - # TODO(port): Port these. - input_files.extend([ - 'child_process.cc', - 'chrome_paths.cc', - 'chrome_plugin_lib.cc', - 'chrome_plugin_util.cc', - 'chrome_process_filter.cc', - 'classfactory.cc', - 'clipboard_service.cc', - 'common_glue.cc', - 'drag_drop_types.cc', - 'gfx/chrome_canvas.cc', - 'gfx/chrome_font.cc', - 'gfx/emf.cc', - 'gfx/icon_util.cc', - 'gfx/path.cc', - 'gfx/url_elider.cc', - 'ipc_channel.cc', - 'ipc_channel_proxy.cc', - 'ipc_logging.cc', - 'ipc_message_utils.cc', - 'ipc_sync_channel.cc', - 'ipc_sync_message.cc', - 'jstemplate_builder.cc', - 'l10n_util.cc', - 'logging_chrome.cc', - 'message_router.cc', - 'net/url_request_intercept_job.cc', - 'notification_registrar.cc', - 'os_exchange_data.cc', - 'plugin_messages.cc', - 'pref_service.cc', - 'process_watcher.cc', - 'render_messages.cc', - 'resource_bundle.cc', - 'resource_dispatcher.cc', - 'security_filter_peer.cc', - 'time_format.cc', - 'win_safe_util.cc', - 'win_util.cc', - 'worker_thread_ticker.cc', - ]) - -if env['PLATFORM'] in ('posix', 'win32'): - # TODO(port): This should be enabled for all platforms. - env.ChromeStaticLibrary('common', input_files) - - -env_test = env_test.Clone() - -env_test.Append( - CPPPATH = [ - '$SKIA_DIR/include', - '$SKIA_DIR/include/corecg', - '$SKIA_DIR/platform', - '$CHROME_SRC_DIR', - '$GTEST_DIR/include', - ], - LIBS = [ - 'base', - 'gtest', - env_test['ICU_LIBS'], # TODO(sgk): '$ICU_LIBS' when scons is fixed - ], -) - -if env_test['PLATFORM'] == 'win32': - env_test.Append( - LINKFLAGS = [ - '/INCREMENTAL', - - '/safeseh', - '/dynamicbase', - '/ignore:4199', - '/nxcompat', - - '/DELAYLOAD:"dwmapi.dll"', - '/DELAYLOAD:"uxtheme.dll"', - - '/DEBUG', - '/MACHINE:X86', - '/FIXED:No', - ], - LIBS = [ - 'rpcrt4.lib', - 'shlwapi.lib', - 'winmm.lib', - ], - ) - -if env_test['PLATFORM'] == 'win32': - # TODO(port): Port this. - ipc_tests_files = [ - '$BASE_DIR/perftimer$OBJSUFFIX', - 'ipc_fuzzing_tests.cc', - 'ipc_tests.cc', - ] - - libs = [ - 'common.lib', - ] - - ipc_tests = env_test.ChromeTestProgram('ipc_tests', ipc_tests_files + libs) - - i = env_test.Install('$TARGET_ROOT', ipc_tests) - Alias('chrome', i) - diff --git a/chrome/common/common.scons b/chrome/common/common.scons new file mode 100644 index 0000000..b4d8e98 --- /dev/null +++ b/chrome/common/common.scons @@ -0,0 +1,117 @@ +# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +Import('env') + +env = env.Clone() + +env.SConscript([ + '$BREAKPAD_DIR/using_breakpad.scons', + '$CHROME_DIR/third_party/wtl/using_wtl.scons', + '$ICU38_DIR/using_icu38.scons', + '$LIBJPEG_DIR/using_libjpeg.scons', + '$LIBPNG_DIR/using_libpng.scons', + '$LIBXML_DIR/using_libxml.scons', + '$NPAPI_DIR/using_npapi.scons', + '$SKIA_DIR/using_skia.scons', + '$ZLIB_DIR/using_zlib.scons', +], {'env':env}) + +env.Prepend( + CPPPATH = [ + '$CHROME_DIR/app/resources', + '$CHROME_DIR/app', + '$CHROME_SRC_DIR', + ], +) + +env.Append( + CPPPATH = [ + '$WEBKIT_DIR/build/localized_strings', + ], +) + +if env['PLATFORM'] == 'win32': + env.Prepend( + CPPPATH = [ + '$CHROME_DIR/tools/build/win', + ], + ) + +input_files = [] + +if env['PLATFORM'] in ('posix', 'win32'): + # TODO(port): Port to Mac. + input_files.extend([ + 'animation.cc', + 'chrome_constants.cc', + 'chrome_counters.cc', + 'chrome_switches.cc', + 'debug_flags.cc', + 'env_vars.cc', + 'gfx/color_utils.cc', + 'ipc_message.cc', + 'jpeg_codec.cc', + 'json_value_serializer.cc', + 'libxml_utils.cc', + 'net/cookie_monster_sqlite.cc', + 'notification_service.cc', + 'pref_member.cc', + 'pref_names.cc', + 'slide_animation.cc', + 'sqlite_compiled_statement.cc', + 'sqlite_utils.cc', + 'task_queue.cc', + 'throb_animation.cc', + 'thumbnail_score.cc', + 'visitedlink_common.cc', + ]) + +if env['PLATFORM'] == 'win32': + # TODO(port): Port these. + input_files.extend([ + 'child_process.cc', + 'chrome_paths.cc', + 'chrome_plugin_lib.cc', + 'chrome_plugin_util.cc', + 'chrome_process_filter.cc', + 'classfactory.cc', + 'clipboard_service.cc', + 'common_glue.cc', + 'drag_drop_types.cc', + 'gfx/chrome_canvas.cc', + 'gfx/chrome_font.cc', + 'gfx/emf.cc', + 'gfx/icon_util.cc', + 'gfx/path.cc', + 'gfx/url_elider.cc', + 'ipc_channel.cc', + 'ipc_channel_proxy.cc', + 'ipc_logging.cc', + 'ipc_message_utils.cc', + 'ipc_sync_channel.cc', + 'ipc_sync_message.cc', + 'jstemplate_builder.cc', + 'l10n_util.cc', + 'logging_chrome.cc', + 'message_router.cc', + 'net/url_request_intercept_job.cc', + 'notification_registrar.cc', + 'os_exchange_data.cc', + 'plugin_messages.cc', + 'pref_service.cc', + 'process_watcher.cc', + 'render_messages.cc', + 'resource_bundle.cc', + 'resource_dispatcher.cc', + 'security_filter_peer.cc', + 'time_format.cc', + 'win_safe_util.cc', + 'win_util.cc', + 'worker_thread_ticker.cc', + ]) + +if env['PLATFORM'] in ('posix', 'win32'): + # TODO(port): This should be enabled for all platforms. + env.ChromeStaticLibrary('common', input_files) diff --git a/chrome/common/ipc_tests.scons b/chrome/common/ipc_tests.scons new file mode 100644 index 0000000..91c8363 --- /dev/null +++ b/chrome/common/ipc_tests.scons @@ -0,0 +1,83 @@ +# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +Import('env', 'env') + +env = env.Clone() + +env.SConscript([ + '$BASE_DIR/using_base.scons', + '$BREAKPAD_DIR/using_breakpad.scons', + '$CHROME_DIR/third_party/wtl/using_wtl.scons', + '$GTEST_DIR/../using_gtest.scons', + '$ICU38_DIR/using_icu38.scons', + '$LIBJPEG_DIR/using_libjpeg.scons', + '$LIBPNG_DIR/using_libpng.scons', + '$LIBXML_DIR/using_libxml.scons', + '$NPAPI_DIR/using_npapi.scons', + '$SKIA_DIR/using_skia.scons', + '$ZLIB_DIR/using_zlib.scons', +], {'env':env}) + +# TODO(sgk): convert into a using_*.scons pattern when we update WebKit. +env.Append( + CPPPATH = [ + '$WEBKIT_DIR/build/localized_strings', + ], +) + +env.Prepend( + CPPPATH = [ + '$CHROME_DIR/app/resources', + '$CHROME_DIR/app', + '$CHROME_SRC_DIR', + ], + LIBS = [ + 'common', + ] +) + +if env['PLATFORM'] == 'win32': + env.Prepend( + CPPPATH = [ + '$CHROME_DIR/tools/build/win', + ], + ) + +if env['PLATFORM'] == 'win32': + env.Append( + LINKFLAGS = [ + '/INCREMENTAL', + + '/safeseh', + '/dynamicbase', + '/ignore:4199', + '/nxcompat', + + '/DELAYLOAD:"dwmapi.dll"', + '/DELAYLOAD:"uxtheme.dll"', + + '/DEBUG', + '/MACHINE:X86', + '/FIXED:No', + ], + LIBS = [ + 'rpcrt4', + 'shlwapi', + 'winmm', + ], + ) + +if env['PLATFORM'] == 'win32': + # TODO(port): Port this. + input_files = [ + 'ipc_fuzzing_tests.cc', + 'ipc_tests.cc', + + '$BASE_DIR/perftimer$OBJSUFFIX', + ] + + ipc_tests = env.ChromeTestProgram('ipc_tests', input_files) + i = env.Install('$TARGET_ROOT', ipc_tests) + Alias('chrome', i) -- cgit v1.1