summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorsgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-21 20:24:56 +0000
committersgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-21 20:24:56 +0000
commit4c75444536c32d6f57801ab73129e90b93db0605 (patch)
treecf468f03b60942cbccd8a166713cf39a610f0131 /base
parentad11a576675dba34fe8f84f2abe6d1fed793b874 (diff)
downloadchromium_src-4c75444536c32d6f57801ab73129e90b93db0605.zip
chromium_src-4c75444536c32d6f57801ab73129e90b93db0605.tar.gz
chromium_src-4c75444536c32d6f57801ab73129e90b93db0605.tar.bz2
SCons renaming updates for base, net and googleurl:
* Rename SConscript files to {module}.scons or {moduel}_lib.scons, depending on the primary target involved. * Separate targets into individual *.scons files, with one construction environment (named "env") per *.scons file. * Add using_{module}.scons files (like .vsprops) that will be used by other modules to add CPPDEFINES, CPPPATH, LIBS and LIBPATH values. * Update other modules' *.scons files to use the new using_{module}.scons files (using a temporary one-liner idiom until we have the ApplySConscript() method from the Hammer modules). * Use the idiom of removing to-be-ported files from the master list, so they can be simply deleted from the to-be-ported list as they get ported in the future, instead of having to shuffle entries between lists. * Use $OBJ_ROOT instead of hard-coded '#/$BUILD_TYPE/' for the $*_DIR variables. * Add a addRepository() call mapping build/ to $TARGET_ROOT/googleurl, so its $OBJ_ROOT value can look like the others'. * Formatting changes, primarily modifying indentation to conform to style guidelines. * Fix copyright headers in some third_party/* modules previously overlooked. * Add rudimentary __doc__ strings, setting up for a future ability to generate meaningful documentation. Review URL: http://codereview.chromium.org/7807 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3675 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/SConscript360
-rw-r--r--base/base.scons19
-rw-r--r--base/base_lib.scons188
-rw-r--r--base/base_unittests.scons171
-rw-r--r--base/gfx/SConscript77
-rw-r--r--base/gfx/base_gfx.scons79
-rw-r--r--base/gfx/using_base_gfx.scons15
-rw-r--r--base/using_base.scons15
8 files changed, 487 insertions, 437 deletions
diff --git a/base/SConscript b/base/SConscript
deleted file mode 100644
index fbb0516..0000000
--- a/base/SConscript
+++ /dev/null
@@ -1,360 +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 = env.Clone()
-env_tests = env.Clone()
-
-env.Prepend(
- CPPPATH = [
- '$ICU38_DIR/public/common',
- '$ICU38_DIR/public/i18n',
- '..',
- ],
- CPPDEFINES = [
- 'U_STATIC_IMPLEMENTATION',
- ],
-)
-
-if env['PLATFORM'] == 'win32':
- env.Prepend(
- CCFLAGS = [
- '/TP',
- '/Wp64',
- ],
- )
-
-# These base files work on *all* platforms; files that don't work
-# cross-platform live below.
-input_files = [
- 'at_exit.cc',
- 'base_paths.cc',
- 'base_switches.cc',
- 'bzip2_error_handler.cc',
- 'command_line.cc',
- 'debug_util.cc',
- 'field_trial.cc',
- 'file_path.cc',
- 'file_util.cc',
- 'histogram.cc',
- 'icu_util.cc',
- 'json_reader.cc',
- 'json_writer.cc',
- 'lazy_instance.cc',
- 'lock.cc',
- 'logging.cc',
- 'md5.cc',
- 'memory_debug.cc',
- 'message_loop.cc',
- 'message_pump_default.cc',
- 'non_thread_safe.cc',
- 'path_service.cc',
- 'pickle.cc',
- 'rand_util.cc',
- 'ref_counted.cc',
- 'revocable_store.cc',
- 'sha2.cc',
- 'simple_thread.cc',
- 'stats_table.cc',
- 'string_escape.cc',
- 'string_piece.cc',
- 'string_util.cc',
- 'string_util_icu.cc',
- 'system_monitor.cc',
- 'thread.cc',
- 'time.cc',
- 'time_format.cc',
- 'timer.cc',
- 'trace_event.cc',
- 'tracked.cc',
- 'tracked_objects.cc',
- 'values.cc',
- 'word_iterator.cc',
- 'third_party/nspr/prtime.cc',
- 'third_party/nss/sha512.cc',
-]
-
-if env['PLATFORM'] == 'win32':
- # Some of these aren't really Windows-specific, they're just here until
- # we have the port versions working.
- # TODO: move all these files to either the cross-platform block above or
- # a platform-specific block below.
- input_files.extend([
- 'clipboard_util.cc',
- 'event_recorder.cc',
- 'file_version_info.cc',
-
- # This group all depends on MessageLoop.
- 'idle_timer.cc',
- 'object_watcher.cc',
- 'watchdog.cc',
-
- 'resource_util.cc', # Uses HMODULE, but may be abstractable.
- ])
-
-if env['PLATFORM'] == 'win32':
- input_files.extend([
- 'base_drag_source.cc',
- 'base_drop_target.cc',
- 'base_paths_win.cc',
- 'clipboard_win.cc',
- 'condition_variable_win.cc',
- 'cpu.cc',
- 'debug_on_start.cc',
- 'debug_util_win.cc',
- 'directory_watcher_win.cc',
- 'file_util_win.cc',
- 'hmac_win.cc',
- 'iat_patch.cc',
- 'image_util.cc',
- 'lock_impl_win.cc',
- 'message_pump_win.cc',
- 'pe_image.cc',
- 'platform_thread_win.cc',
- 'process_util_win.cc',
- 'process_win.cc',
- 'rand_util_win.cc',
- 'registry.cc',
- 'shared_memory_win.cc',
- 'sys_info_win.cc',
- 'sys_string_conversions_win.cc',
- 'system_monitor_win.cc',
- 'thread_local_storage_win.cc',
- 'thread_local_win.cc',
- 'time_win.cc',
- 'waitable_event_win.cc',
- 'win_util.cc',
- 'wmi_util.cc',
- 'worker_pool.cc',
- ])
-
-if env['PLATFORM'] in ('darwin', 'posix'):
- input_files.extend([
- 'condition_variable_posix.cc',
- 'debug_util_posix.cc',
- 'file_util_posix.cc',
- 'lock_impl_posix.cc',
- 'message_pump_libevent.cc',
- 'platform_thread_posix.cc',
- 'process_util_posix.cc',
- 'rand_util_posix.cc',
- 'shared_memory_posix.cc',
- 'string16.cc',
- 'sys_info_posix.cc',
- 'thread_local_storage_posix.cc',
- 'thread_local_posix.cc',
- 'time_posix.cc',
- 'waitable_event_generic.cc',
- ])
-
-if env['PLATFORM'] == 'darwin':
- input_files.extend([
- 'base_paths_mac.mm',
- 'clipboard_mac.mm',
- 'file_util_mac.mm',
- 'file_version_info_mac.mm',
- 'hmac_mac.cc',
- 'message_pump_mac.mm',
- 'platform_thread_mac.mm',
- 'scoped_nsautorelease_pool.mm',
- 'sys_string_conversions_mac.mm',
- 'worker_pool_mac.mm',
- ])
-
-if env['PLATFORM'] == 'posix':
- input_files.extend([
- 'atomicops_internals_x86_gcc.cc',
- 'base_paths_linux.cc',
- 'clipboard_linux.cc',
- 'file_util_linux.cc',
- 'hmac_nss.cc',
- 'message_pump_glib.cc',
- 'nss_init.cc',
- 'process_posix.cc',
- 'process_util_linux.cc',
- 'sys_string_conversions_linux.cc',
- 'worker_pool.cc',
- ])
-
-env.ChromeStaticLibrary('base', input_files)
-
-
-env_tests.Prepend(
- CPPPATH = [
- '$GTEST_DIR/include',
- '$GTEST_DIR',
- '$SKIA_DIR/include',
- '$SKIA_DIR/include/corecg',
- '$SKIA_DIR/platform',
- '$ZLIB_DIR',
- '$LIBPNG_DIR',
- '$ICU38_DIR/public/common',
- '$ICU38_DIR/public/i18n',
- '..',
- ],
- CPPDEFINES = [
- 'UNIT_TEST',
- 'PNG_USER_CONFIG',
- 'CHROME_PNG_WRITE_SUPPORT',
- 'U_STATIC_IMPLEMENTATION',
- 'GOOGLE_CHROME_BUILD',
- ],
- LIBS = [
- 'base',
- 'base_gfx',
- 'gtest',
- env_tests['ICU_LIBS'], # TODO(sgk): '$ICU_LIBS' when scons is fixed
- 'libpng',
- 'skia',
- 'zlib',
- ]
-)
-
-env_tests.Append(
- CPPPATH = [
- '$GTEST_DIR/include',
- ],
-)
-
-if env['PLATFORM'] == 'win32':
- env_tests.Prepend(
- CCFLAGS = [
- '/TP',
- '/WX',
- ],
- CPPDEFINES = [
- '_WIN32_WINNT=0x0600',
- 'WINVER=0x0600',
- '_HAS_EXCEPTIONS=0',
- ],
- LINKFLAGS = [
- '/MANIFEST',
- '/DELAYLOAD:"dwmapi.dll"',
- '/DELAYLOAD:"uxtheme.dll"',
- '/MACHINE:X86',
- '/FIXED:No',
-
- '/safeseh',
- '/dynamicbase',
- '/ignore:4199',
- '/nxcompat',
- ],
- )
-
-if env['PLATFORM'] in ('posix', 'darwin'):
- env_tests.Append(
- LIBS = [
- 'event',
- ],
- )
-
-# These test files work on *all* platforms; tests that don't work
-# cross-platform live below.
-test_files = [
- 'at_exit_unittest.cc',
- 'atomicops_unittest.cc',
- 'clipboard_unittest.cc',
- 'command_line_unittest.cc',
- 'condition_variable_unittest.cc',
- 'field_trial_unittest.cc',
- 'file_path_unittest.cc',
- 'file_util_unittest.cc',
- 'hmac_unittest.cc',
- 'histogram_unittest.cc',
- 'json_reader_unittest.cc',
- 'json_writer_unittest.cc',
- 'lazy_instance_unittest.cc',
- 'linked_ptr_unittest.cc',
- 'message_loop_unittest.cc',
- 'observer_list_unittest.cc',
- 'path_service_unittest.cc',
- 'pickle_unittest.cc',
- 'pr_time_unittest.cc',
- 'rand_util_unittest.cc',
- 'ref_counted_unittest.cc',
- 'run_all_unittests.cc',
- 'scoped_ptr_unittest.cc',
- 'sha2_unittest.cc',
- 'shared_memory_unittest.cc',
- 'simple_thread_unittest.cc',
- 'singleton_unittest.cc',
- 'stack_container_unittest.cc',
- 'string_escape_unittest.cc',
- 'string_piece_unittest.cc',
- 'string_tokenizer_unittest.cc',
- 'string_util_unittest.cc',
- 'sys_info_unittest.cc',
- 'thread_local_unittest.cc',
- 'thread_local_storage_unittest.cc',
- 'thread_unittest.cc',
- 'time_unittest.cc',
- 'timer_unittest.cc',
- 'tracked_objects_unittest.cc',
- 'tuple_unittest.cc',
- 'values_unittest.cc',
- 'waitable_event_unittest.cc',
- 'word_iterator_unittest.cc',
- 'worker_pool_unittest.cc',
- 'gfx/convolver_unittest.cc',
- 'gfx/image_operations_unittest.cc',
- 'gfx/png_codec_unittest.cc',
- 'gfx/rect_unittest.cc',
-]
-
-if env['PLATFORM'] == 'win32':
- # These tests aren't really Windows-specific, they're just here until
- # we have the port versions working.
- env_tests.ChromeTestProgram('debug_message', ['debug_message.cc'])
-
- test_files.extend([
- 'directory_watcher_unittest.cc',
- 'idletimer_unittest.cc',
- 'process_util_unittest.cc',
- 'stats_table_unittest.cc',
- 'watchdog_unittest.cc',
- 'gfx/native_theme_unittest.cc',
- 'gfx/uniscribe_unittest.cc',
- 'gfx/vector_canvas_unittest.cc',
- ])
-
-if env['PLATFORM'] == 'win32':
- # Windows-specific tests.
- test_files.extend([
- 'file_version_info_unittest.cc',
- 'object_watcher_unittest.cc',
- 'pe_image_unittest.cc',
- 'sys_string_conversions_win_unittest.cc',
- 'time_unittest_win.cc',
- 'win_util_unittest.cc',
- 'wmi_util_unittest.cc',
- ])
-
-if env['PLATFORM'] == 'darwin':
- test_files.extend([
- 'platform_test_mac.mm',
- ])
-
-base_unittests = env_tests.ChromeTestProgram('base_unittests', test_files)
-
-# Install up a level to allow unit test path assumptions to be valid.
-installed_base_unittests = env.Install('$TARGET_ROOT', base_unittests)
-
-
-sconscript_dirs = [
- 'gfx/SConscript',
-]
-
-SConscript(sconscript_dirs, exports=['env'])
-
-
-env.Alias('base', ['.', installed_base_unittests])
-
-# TODO(sgk) should this be moved into base.lib like everything else? This will
-# require updating a bunch of other SConscripts which link directly against
-# this generated object file.
-env_tests.StaticObject('perftimer.cc')
-
-# Since run_all_perftests supplies a main, we cannot have it in base.lib
-env_tests.StaticObject('run_all_perftests.cc')
diff --git a/base/base.scons b/base/base.scons
new file mode 100644
index 0000000..403eb26
--- /dev/null
+++ b/base/base.scons
@@ -0,0 +1,19 @@
+# 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.
+
+__doc__ = """
+Master configuration for building base components (including base_gfx).
+"""
+
+Import('env')
+
+sconscript_files = [
+ 'base_lib.scons',
+ 'base_unittests.scons',
+ 'gfx/base_gfx.scons',
+]
+
+SConscript(sconscript_files, exports=['env'])
+
+env.Alias('base', '.')
diff --git a/base/base_lib.scons b/base/base_lib.scons
new file mode 100644
index 0000000..b05a980
--- /dev/null
+++ b/base/base_lib.scons
@@ -0,0 +1,188 @@
+# 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.
+
+__doc__ = """
+Configuration for building base.lib / libbase.a.
+"""
+
+Import('env')
+
+env = env.Clone()
+
+env.SConscript([
+ '$ICU38_DIR/using_icu38.scons',
+], {'env':env})
+
+env.Prepend(
+ CPPPATH = [
+ '$ROOT_DIR',
+ ],
+)
+
+if env['PLATFORM'] == 'win32':
+ env.Prepend(
+ CCFLAGS = [
+ '/TP',
+ '/Wp64',
+ ],
+ )
+
+# These base files work on *all* platforms; files that don't work
+# cross-platform live below.
+input_files = [
+ 'at_exit.cc',
+ 'base_paths.cc',
+ 'base_switches.cc',
+ 'bzip2_error_handler.cc',
+ 'clipboard_util.cc',
+ 'command_line.cc',
+ 'debug_util.cc',
+ 'event_recorder.cc',
+ 'file_path.cc',
+ 'file_util.cc',
+ 'file_version_info.cc',
+ 'histogram.cc',
+ 'icu_util.cc',
+ 'idle_timer.cc',
+ 'json_reader.cc',
+ 'json_writer.cc',
+ 'lazy_instance.cc',
+ 'lock.cc',
+ 'logging.cc',
+ 'md5.cc',
+ 'memory_debug.cc',
+ 'message_loop.cc',
+ 'message_pump_default.cc',
+ 'non_thread_safe.cc',
+ 'object_watcher.cc',
+ 'path_service.cc',
+ 'pickle.cc',
+ 'rand_util.cc',
+ 'ref_counted.cc',
+ 'resource_util.cc',
+ 'revocable_store.cc',
+ 'sha2.cc',
+ 'simple_thread.cc',
+ 'stats_table.cc',
+ 'string_escape.cc',
+ 'string_piece.cc',
+ 'string_util.cc',
+ 'string_util_icu.cc',
+ 'system_monitor.cc',
+ 'third_party/nspr/prtime.cc',
+ 'third_party/nss/sha512.cc',
+ 'thread.cc',
+ 'time.cc',
+ 'time_format.cc',
+ 'timer.cc',
+ 'trace_event.cc',
+ 'tracked.cc',
+ 'tracked_objects.cc',
+ 'values.cc',
+ 'watchdog.cc',
+ 'word_iterator.cc',
+]
+
+if env['PLATFORM'] in ('posix', 'darwin'):
+ # Remove files that still need to be ported from the input_files list.
+ # TODO(port): delete files from this list as they get ported.
+ to_be_ported_files = [
+ 'clipboard_util.cc',
+ 'event_recorder.cc',
+ 'file_version_info.cc',
+
+ # This group all depends on MessageLoop.
+ 'idle_timer.cc',
+ 'object_watcher.cc',
+ 'watchdog.cc',
+
+ 'resource_util.cc', # Uses HMODULE, but may be abstractable.
+ ]
+ for remove in to_be_ported_files:
+ input_files.remove(remove)
+
+if env['PLATFORM'] == 'win32':
+ input_files.extend([
+ 'base_drag_source.cc',
+ 'base_drop_target.cc',
+ 'base_paths_win.cc',
+ 'clipboard_win.cc',
+ 'condition_variable_win.cc',
+ 'cpu.cc',
+ 'debug_on_start.cc',
+ 'debug_util_win.cc',
+ 'file_util_win.cc',
+ 'hmac_win.cc',
+ 'iat_patch.cc',
+ 'image_util.cc',
+ 'lock_impl_win.cc',
+ 'message_pump_win.cc',
+ 'pe_image.cc',
+ 'platform_thread_win.cc',
+ 'process_util_win.cc',
+ 'process_win.cc',
+ 'rand_util_win.cc',
+ 'registry.cc',
+ 'shared_memory_win.cc',
+ 'sys_info_win.cc',
+ 'sys_string_conversions_win.cc',
+ 'system_monitor_win.cc',
+ 'thread_local_storage_win.cc',
+ 'thread_local_win.cc',
+ 'time_win.cc',
+ 'waitable_event_win.cc',
+ 'win_util.cc',
+ 'wmi_util.cc',
+ 'worker_pool.cc',
+ ])
+
+if env['PLATFORM'] in ('darwin', 'posix'):
+ input_files.extend([
+ 'condition_variable_posix.cc',
+ 'debug_util_posix.cc',
+ 'file_util_posix.cc',
+ 'lock_impl_posix.cc',
+ 'message_pump_libevent.cc',
+ 'platform_thread_posix.cc',
+ 'process_util_posix.cc',
+ 'rand_util_posix.cc',
+ 'shared_memory_posix.cc',
+ 'string16.cc',
+ 'sys_info_posix.cc',
+ 'thread_local_storage_posix.cc',
+ 'thread_local_posix.cc',
+ 'time_posix.cc',
+ 'waitable_event_generic.cc',
+ ])
+
+if env['PLATFORM'] == 'darwin':
+ input_files.extend([
+ 'base_paths_mac.mm',
+ 'clipboard_mac.mm',
+ 'file_util_mac.mm',
+ 'file_version_info_mac.mm',
+ 'hmac_mac.cc',
+ 'message_pump_mac.mm',
+ 'platform_thread_mac.mm',
+ 'scoped_nsautorelease_pool.mm',
+ 'sys_string_conversions_mac.mm',
+ 'worker_pool_mac.mm',
+ ])
+
+if env['PLATFORM'] == 'posix':
+ input_files.extend([
+ 'atomicops_internals_x86_gcc.cc',
+ 'base_paths_linux.cc',
+ 'file_util_linux.cc',
+ 'hmac_nss.cc',
+ 'message_pump_glib.cc',
+ 'nss_init.cc',
+ 'process_posix.cc',
+ 'process_util_linux.cc',
+ 'sys_string_conversions_linux.cc',
+ 'worker_pool.cc',
+ ])
+
+base_lib = env.ChromeStaticLibrary('base', input_files)
+env.Alias('base', base_lib)
diff --git a/base/base_unittests.scons b/base/base_unittests.scons
new file mode 100644
index 0000000..fbb7c0c
--- /dev/null
+++ b/base/base_unittests.scons
@@ -0,0 +1,171 @@
+# 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.
+
+__doc__ = """
+Configuration for building base_unittests{,.exe}.
+"""
+
+Import('env')
+
+env = env.Clone()
+
+env.SConscript([
+ '$BASE_DIR/using_base.scons',
+ '$BASE_DIR/gfx/using_base_gfx.scons',
+ '$GTEST_DIR/../using_gtest.scons',
+ '$ICU38_DIR/using_icu38.scons',
+ '$LIBPNG_DIR/using_libpng.scons',
+ '$SKIA_DIR/using_skia.scons',
+ '$ZLIB_DIR/using_zlib.scons',
+], {'env':env})
+
+if env['PLATFORM'] in ('posix', 'darwin'):
+ env.SConscript([
+ '$LIBEVENT_DIR/using_libevent.scons',
+ ], {'env':env})
+
+env.Prepend(
+ CPPPATH = [
+ '$ROOT_DIR',
+ ],
+ CPPDEFINES = [
+ 'GOOGLE_CHROME_BUILD',
+ ],
+)
+
+if env['PLATFORM'] == 'win32':
+ env.Prepend(
+ CCFLAGS = [
+ '/TP',
+ '/WX',
+ ],
+ CPPDEFINES = [
+ '_WIN32_WINNT=0x0600',
+ 'WINVER=0x0600',
+ '_HAS_EXCEPTIONS=0',
+ ],
+ LINKFLAGS = [
+ '/MANIFEST',
+ '/DELAYLOAD:"dwmapi.dll"',
+ '/DELAYLOAD:"uxtheme.dll"',
+ '/MACHINE:X86',
+ '/FIXED:No',
+
+ '/safeseh',
+ '/dynamicbase',
+ '/ignore:4199',
+ '/nxcompat',
+ ],
+ )
+
+# These test files work on *all* platforms; tests that don't work
+# cross-platform live below.
+input_files = [
+ 'at_exit_unittest.cc',
+ 'atomicops_unittest.cc',
+ 'clipboard_unittest.cc',
+ 'command_line_unittest.cc',
+ 'condition_variable_unittest.cc',
+ 'file_path_unittest.cc',
+ 'file_util_unittest.cc',
+ 'histogram_unittest.cc',
+ 'hmac_unittest.cc',
+ 'idletimer_unittest.cc',
+ 'json_reader_unittest.cc',
+ 'json_writer_unittest.cc',
+ 'lazy_instance_unittest.cc',
+ 'linked_ptr_unittest.cc',
+ 'message_loop_unittest.cc',
+ 'observer_list_unittest.cc',
+ 'path_service_unittest.cc',
+ 'pickle_unittest.cc',
+ 'pr_time_unittest.cc',
+ 'process_util_unittest.cc',
+ 'rand_util_unittest.cc',
+ 'ref_counted_unittest.cc',
+ 'run_all_unittests.cc',
+ 'scoped_ptr_unittest.cc',
+ 'sha2_unittest.cc',
+ 'shared_memory_unittest.cc',
+ 'simple_thread_unittest.cc',
+ 'singleton_unittest.cc',
+ 'stack_container_unittest.cc',
+ 'stats_table_unittest.cc',
+ 'string_escape_unittest.cc',
+ 'string_piece_unittest.cc',
+ 'string_tokenizer_unittest.cc',
+ 'string_util_unittest.cc',
+ 'sys_info_unittest.cc',
+ 'thread_local_storage_unittest.cc',
+ 'thread_local_unittest.cc',
+ 'thread_unittest.cc',
+ 'time_unittest.cc',
+ 'timer_unittest.cc',
+ 'tracked_objects_unittest.cc',
+ 'tuple_unittest.cc',
+ 'values_unittest.cc',
+ 'waitable_event_unittest.cc',
+ 'watchdog_unittest.cc',
+ 'word_iterator_unittest.cc',
+ 'worker_pool_unittest.cc',
+
+ 'gfx/convolver_unittest.cc',
+ 'gfx/image_operations_unittest.cc',
+ 'gfx/native_theme_unittest.cc',
+ 'gfx/png_codec_unittest.cc',
+ 'gfx/rect_unittest.cc',
+ 'gfx/uniscribe_unittest.cc',
+ 'gfx/vector_canvas_unittest.cc',
+]
+
+if env['PLATFORM'] in ('posix', 'darwin'):
+ #env.ChromeTestProgram('debug_message', ['debug_message.cc'])
+
+ # Remove files that still need to be ported from the input_files list.
+ # TODO(port): delete files from this list as they get ported.
+ to_be_ported_files = [
+ 'clipboard_unittest.cc',
+ 'idletimer_unittest.cc',
+ 'process_util_unittest.cc',
+ 'stats_table_unittest.cc',
+ 'watchdog_unittest.cc',
+ 'gfx/native_theme_unittest.cc',
+ 'gfx/uniscribe_unittest.cc',
+ 'gfx/vector_canvas_unittest.cc',
+ ]
+ for remove in to_be_ported_files:
+ input_files.remove(remove)
+
+if env['PLATFORM'] == 'win32':
+ # Windows-specific tests.
+ input_files.extend([
+ 'file_version_info_unittest.cc',
+ 'object_watcher_unittest.cc',
+ 'pe_image_unittest.cc',
+ 'sys_string_conversions_win_unittest.cc',
+ 'time_unittest_win.cc',
+ 'win_util_unittest.cc',
+ 'wmi_util_unittest.cc',
+ ])
+
+if env['PLATFORM'] == 'darwin':
+ # Mac-specific tests.
+ input_files.extend([
+ 'platform_test_mac.mm',
+ ])
+
+base_unittests = env.ChromeTestProgram('base_unittests', input_files)
+
+# Install up a level to allow unit test path assumptions to be valid.
+installed_base_unittests = env.Install('$TARGET_ROOT', base_unittests)
+
+env.Alias('base', installed_base_unittests)
+
+# TODO(sgk) should this be moved into base.lib like everything else? This will
+# require updating a bunch of other SConscripts which link directly against
+# this generated object file.
+env.StaticObject('perftimer.cc')
+
+# Since run_all_perftests supplies a main, we cannot have it in base.lib
+env.StaticObject('run_all_perftests.cc')
diff --git a/base/gfx/SConscript b/base/gfx/SConscript
deleted file mode 100644
index c862193..0000000
--- a/base/gfx/SConscript
+++ /dev/null
@@ -1,77 +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 = env.Clone()
-
-# Remove an inherited relative path that doesn't make sense anymore. This
-# makes sure we don't pull in the wrong version of time.h when building on
-# linux.
-env['CPPPATH'].remove('..')
-
-env.Prepend(
- CPPPATH = [
- '$SKIA_DIR/include',
- '$SKIA_DIR/include/corecg',
- '$SKIA_DIR/include/platform',
- '$ZLIB_DIR',
- '$LIBPNG_DIR',
- '$ICU38_DIR/public/common',
- '$ICU38_DIR/public/i18n',
- '../..',
- ],
- CPPDEFINES = [
- 'PNG_USER_CONFIG',
- 'CHROME_PNG_WRITE_SUPPORT',
- 'U_STATIC_IMPLEMENTATION',
- ],
-)
-
-if env['PLATFORM'] == 'win32':
- env.Prepend(
- CCFLAGS = [
- '/TP',
- '/WX',
- ],
- )
-
-input_files = [
- 'convolver.cc',
- 'image_operations.cc',
- 'png_decoder.cc',
- 'png_encoder.cc',
- 'point.cc',
- 'rect.cc',
- 'size.cc',
-]
-
-if env['PLATFORM'] == 'win32':
- # Some of these aren't really Windows-specific, they're just here until
- # we have the port versions working.
- input_files.extend([
- 'font_utils.cc',
- 'gdi_util.cc',
- 'native_theme.cc',
- 'skia_utils.cc',
- 'uniscribe.cc',
- 'vector_canvas.cc',
- 'vector_device.cc',
- ])
-
-if env['PLATFORM'] == 'win32':
- input_files.extend([
- 'bitmap_platform_device_win.cc',
- 'platform_canvas_win.cc',
- 'platform_device_win.cc',
- ])
-elif env['PLATFORM'] == 'posix':
- input_files.extend([
- 'bitmap_platform_device_linux.cc',
- 'platform_canvas_linux.cc',
- 'platform_device_linux.cc',
- ])
-
-env.ChromeStaticLibrary('base_gfx', input_files)
-
diff --git a/base/gfx/base_gfx.scons b/base/gfx/base_gfx.scons
new file mode 100644
index 0000000..9a5e992
--- /dev/null
+++ b/base/gfx/base_gfx.scons
@@ -0,0 +1,79 @@
+# 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.
+
+__doc__ = """
+Configuration for building base_gfx.lib / libbase_gfx.a.
+"""
+
+Import('env')
+
+env = env.Clone()
+
+env.SConscript([
+ '$ICU38_DIR/using_icu38.scons',
+ '$LIBPNG_DIR/using_libpng.scons',
+ '$SKIA_DIR/using_skia.scons',
+ '$ZLIB_DIR/using_zlib.scons',
+], {'env':env})
+
+env.Prepend(
+ CPPPATH = [
+ '$ROOT_DIR',
+ ],
+)
+
+if env['PLATFORM'] == 'win32':
+ env.Prepend(
+ CCFLAGS = [
+ '/TP',
+ '/WX',
+ ],
+ )
+
+input_files = [
+ 'convolver.cc',
+ 'font_utils.cc',
+ 'gdi_util.cc',
+ 'image_operations.cc',
+ 'native_theme.cc',
+ 'png_decoder.cc',
+ 'png_encoder.cc',
+ 'point.cc',
+ 'rect.cc',
+ 'size.cc',
+ 'skia_utils.cc',
+ 'uniscribe.cc',
+ 'vector_canvas.cc',
+ 'vector_device.cc',
+]
+
+if env['PLATFORM'] in ('posix', 'darwin'):
+ # Remove files that still need to be ported from the input_files list.
+ # TODO(port): delete files from this list as they get ported.
+ to_be_ported_files = [
+ 'font_utils.cc',
+ 'gdi_util.cc',
+ 'native_theme.cc',
+ 'skia_utils.cc',
+ 'uniscribe.cc',
+ 'vector_canvas.cc',
+ 'vector_device.cc',
+ ]
+ for remove in to_be_ported_files:
+ input_files.remove(remove)
+
+if env['PLATFORM'] == 'win32':
+ input_files.extend([
+ 'bitmap_platform_device_win.cc',
+ 'platform_canvas_win.cc',
+ 'platform_device_win.cc',
+ ])
+elif env['PLATFORM'] == 'posix':
+ input_files.extend([
+ 'bitmap_platform_device_linux.cc',
+ 'platform_canvas_linux.cc',
+ 'platform_device_linux.cc',
+ ])
+
+env.ChromeStaticLibrary('base_gfx', input_files)
diff --git a/base/gfx/using_base_gfx.scons b/base/gfx/using_base_gfx.scons
new file mode 100644
index 0000000..a428878
--- /dev/null
+++ b/base/gfx/using_base_gfx.scons
@@ -0,0 +1,15 @@
+# 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.
+
+__doc__ = """
+Settings for other components using the base_gfx library.
+"""
+
+Import("env")
+
+env.Append(
+ LIBS = [
+ 'base_gfx',
+ ],
+)
diff --git a/base/using_base.scons b/base/using_base.scons
new file mode 100644
index 0000000..f3d58b4
--- /dev/null
+++ b/base/using_base.scons
@@ -0,0 +1,15 @@
+# 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.
+
+__doc__ = """
+Settings for other components using the base library.
+"""
+
+Import("env")
+
+env.Append(
+ LIBS = [
+ 'base',
+ ],
+)