summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-14 23:00:46 +0000
committersgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-14 23:00:46 +0000
commit94f686369c158fe46a327849ccae9f31c423adef (patch)
tree11a749e1cb4078790d6429e25a346a018cd03e1d
parentb496c9e6770e4951eec84b17d5c84454815bf796 (diff)
downloadchromium_src-94f686369c158fe46a327849ccae9f31c423adef.zip
chromium_src-94f686369c158fe46a327849ccae9f31c423adef.tar.gz
chromium_src-94f686369c158fe46a327849ccae9f31c423adef.tar.bz2
More *.scons renaming:
* Rename SConscript to *.scons in the following directories: third_party\{bspatch,bsdiff,lzma_dsk} chrome\installer\{setup,mini_installer,util} * Split mini_installer and installer_unittests into separate *.scons files. * Add using_bspatch.scons and using_lzma_sdk.scons "properties" files, modifying other *.scons files to use them as appropriate. Review URL: http://codereview.chromium.org/10952 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5515 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--build/SConscript.main14
-rw-r--r--chrome/SConscript8
-rw-r--r--chrome/installer/mini_installer/SConscript160
-rw-r--r--chrome/installer/mini_installer/installer_unittests.scons68
-rw-r--r--chrome/installer/mini_installer/mini_installer.scons106
-rw-r--r--chrome/installer/setup/SConscript87
-rw-r--r--chrome/installer/setup/setup.scons85
-rw-r--r--chrome/installer/util/util.scons (renamed from chrome/installer/util/SConscript)37
-rw-r--r--third_party/bsdiff/SConscript53
-rw-r--r--third_party/bsdiff/bsdiff.scons25
-rw-r--r--third_party/bspatch/SConscript64
-rw-r--r--third_party/bspatch/bspatch.scons30
-rw-r--r--third_party/bspatch/using_bspatch.scons18
-rw-r--r--third_party/lzma_sdk/SConscript72
-rw-r--r--third_party/lzma_sdk/lzma_sdk.scons46
-rw-r--r--third_party/lzma_sdk/using_lzma_sdk.scons21
16 files changed, 423 insertions, 471 deletions
diff --git a/build/SConscript.main b/build/SConscript.main
index fd41d60..8ccac3b 100644
--- a/build/SConscript.main
+++ b/build/SConscript.main
@@ -245,18 +245,18 @@ if LoadComponent('third_party'):
if not root_env.WantSystemLib('libxslt'):
sconscripts.append('$LIBXSLT_DIR/SConscript')
if not root_env.WantSystemLib('lzma_sdk'):
- sconscripts.append('$LZMA_SDK_DIR/SConscript')
+ sconscripts.append('$LZMA_SDK_DIR/lzma_sdk.scons')
if not root_env.WantSystemLib('zlib'):
sconscripts.append('$ZLIB_DIR/zlib.scons')
root_env.Append(ZLIB_LIB = ['zlib'])
else:
root_env.Append(ZLIB_LIB = ['z'])
sconscripts.extend([
- '$BSDIFF_DIR/SConscript',
+ '$BSDIFF_DIR/bsdiff.scons',
+ '$BSPATCH_DIR/bspatch.scons',
'$DMG_FP_DIR/dmg_fp.scons',
'$ICU38_DIR/icu38.scons',
'$MODP_B64_DIR/modp_b64.scons',
- '$BSPATCH_DIR/SConscript',
])
if LoadComponent('v8') and root_env.Dir('$CHROME_SRC_DIR/v8').exists():
@@ -514,8 +514,8 @@ linux_env.Replace(
linux_env.FilterOut(
BUILD_SCONSCRIPTS = [
- '$BSPATCH_DIR/SConscript',
- '$BSDIFF_DIR/SConscript',
+ '$BSPATCH_DIR/bspatch.scons',
+ '$BSDIFF_DIR/bsdiff.scons',
'$GEARS_DIR/SConscript',
'$GOOGLE_UPDATE_DIR/SConscript',
'$RLZ_DIR/SConscript',
@@ -605,8 +605,8 @@ mac_env.Replace(
mac_env.FilterOut(
BUILD_SCONSCRIPTS = [
- '$BSPATCH_DIR/SConscript',
- '$BSDIFF_DIR/SConscript',
+ '$BSPATCH_DIR/bspatch.scons',
+ '$BSDIFF_DIR/bsdiff.scons',
'$LIBJPEG_DIR/SConscript',
'$LIBXML_DIR/SConscript',
'$LIBXSLT_DIR/SConscript',
diff --git a/chrome/SConscript b/chrome/SConscript
index 8e1e19d..4f2ddd8 100644
--- a/chrome/SConscript
+++ b/chrome/SConscript
@@ -330,7 +330,6 @@ if env['PLATFORM'] == 'win32':
'app/google_update_client.cc',
'common/common.lib',
- #'$CHROME_DIR/chrome_dll.lib',
'chrome.lib',
]
)
@@ -412,9 +411,10 @@ if env['PLATFORM'] == 'win32':
'app/resources/SConscript',
'app/theme/SConscript',
'browser/views/SConscript',
- 'installer/mini_installer/SConscript',
- 'installer/setup/SConscript',
- 'installer/util/SConscript',
+ 'installer/mini_installer/mini_installer.scons',
+ 'installer/mini_installer/installer_unittests.scons',
+ 'installer/setup/setup.scons',
+ 'installer/util/util.scons',
'test/activex_test_control/activex_test_control.scons',
'test/automation/automation.scons',
'test/memory_test/memory_test.scons',
diff --git a/chrome/installer/mini_installer/SConscript b/chrome/installer/mini_installer/SConscript
deleted file mode 100644
index 40cccb5..0000000
--- a/chrome/installer/mini_installer/SConscript
+++ /dev/null
@@ -1,160 +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_res', 'env_test')
-
-
-env = env.Clone()
-
-env['LIBS'].remove('DelayImp.lib')
-
-env_res = env_res.Clone()
-env_test = env_test.Clone()
-
-
-env_res.Append(
- CPPPATH = [
- "$TARGET_ROOT",
- ".",
- "$CHROME_SRC_DIR",
- ],
- RCFLAGS = [
- ["/l", "0x409"],
- ],
-)
-
-resources = env_res.RES('mini_installer.rc')
-
-
-env.Prepend(
- CPPPATH = [
- '$GTEST_DIR/include',
- '$GTEST_DIR',
- '$CHROME_SRC_DIR',
- ],
- CCFLAGS = [
- '/TP',
- '/GS-', # because we link with /NODEFAULTLIB
- ],
- LINKFLAGS = [
- '/INCREMENTAL',
- '/NODEFAULTLIB',
- '/DEBUG',
- '/SUBSYSTEM:WINDOWS',
- '/OPT:NOWIN98',
- '/ENTRY:"MainEntryPoint"',
- '/MACHINE:X86',
- '/FIXED:No',
-
- '/SAFESEH:NO',
- '/NXCOMPAT',
- '/DYNAMICBASE:NO',
-
- '/PDB:${TARGETS[1]}',
- #'/MAP:${TARGETS[2]}',
- ],
- LIBS = [
- 'shlwapi.lib',
- ],
-)
-
-env['CCFLAGS'].remove('/RTC1')
-
-components = [
- "$VISUAL_STUDIO/VC/crt/src/intel/mt_lib/memset.obj",
- "$VISUAL_STUDIO/VC/crt/src/intel/mt_lib/P4_memset.obj",
- #"$TARGET_ROOT/chrome_dll.lib",
- "$TARGET_ROOT/chrome.lib",
-]
-
-input_files = [
- "mini_installer.cc",
- "pe_resource.cc",
-]
-
-exe = env.ChromeProgram('mini_installer', components + resources + input_files)
-i = env.Install('$TARGET_ROOT', exe)
-env.Alias('chrome', i)
-
-
-env.AppendENVPath('PATH', r'C:\WINDOWS\system32')
-
-packed = env.Command('$TARGET_ROOT/packed_files.txt',
- ['$CHROME_DIR/tools/build/win/create_installer_archive.py',
- '$CHROME_DIR/installer/mini_installer/chrome.release'],
- ('$PYTHON ${SOURCES[0]}'
- ' --output_dir=${TARGET.dir}'
- ' --input_file=${SOURCES[1]}'))
-env.Depends(packed, '$TARGET_ROOT/setup.exe')
-
-
-env.ChromeVersionRC('mini_installer_exe_version.rc',
- 'mini_installer_exe_version.rc.version',
- PWD=Dir('.'))
-
-
-env_test.Prepend(
- CPPDEFINES = [
- 'UNIT_TEST',
- ],
- CPPPATH = [
- '$GTEST_DIR/include',
- '$GTEST_DIR',
- '$CHROME_SRC_DIR',
- ],
- LIBS = [
- 'gtest',
- env_test['ICU_LIBS'], # TODO(sgk): '$ICU_LIBS' when scons is fixed
- 'common',
- 'base',
- ],
-)
-
-env_test.Prepend(
- LINKFLAGS = [
- '/INCREMENTAL',
- '/DEBUG',
-
- '/DELAYLOAD:"dwmapi.dll"',
- '/DELAYLOAD:"uxtheme.dll"',
-
- '/MACHINE:X86',
- '/FIXED:No',
-
- '/safeseh',
- '/dynamicbase',
- '/ignore:4199',
- '/nxcompat',
- ],
- LIBS = [
- 'comsupp.lib',
- 'oleacc.lib',
- 'rpcrt4.lib',
- 'shlwapi.lib',
- ],
-)
-
-input_files = [
- '../setup/setup_constants$OBJSUFFIX',
- '../util/copy_tree_work_item_unittest.cc',
- '../util/create_dir_work_item_unittest.cc',
- '../util/create_reg_key_work_item_unittest.cc',
- '../util/delete_reg_value_work_item_unittest.cc',
- '../util/delete_tree_work_item_unittest.cc',
- '../util/google_chrome_distribution_unittest.cc',
- '../util/helper_unittest.cc',
- '../util/run_all_unittests.cc',
- '../util/set_reg_value_work_item_unittest.cc',
- '../util/work_item_list_unittest.cc',
-]
-
-libs = [
- '../util/util.lib',
-]
-
-exe = env_test.ChromeTestProgram('installer_unittests', input_files + libs)
-i = env_test.Install('$TARGET_ROOT', exe)
-
-env.Alias('chrome', i)
-
diff --git a/chrome/installer/mini_installer/installer_unittests.scons b/chrome/installer/mini_installer/installer_unittests.scons
new file mode 100644
index 0000000..13119b9
--- /dev/null
+++ b/chrome/installer/mini_installer/installer_unittests.scons
@@ -0,0 +1,68 @@
+# 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.ApplySConscript([
+ '$BASE_DIR/using_base.scons',
+ '$GTEST_DIR/../using_gtest.scons',
+ '$ICU38_DIR/using_icu38.scons',
+])
+
+env.Prepend(
+ CPPPATH = [
+ '$CHROME_SRC_DIR',
+ ],
+ LIBS = [
+ 'common',
+ 'util',
+ ],
+)
+
+if env['PLATFORM'] == 'win32':
+ env.FilterOut(
+ LIBS = ['DelayImp.lib'],
+ )
+
+ env.Prepend(
+ LINKFLAGS = [
+ '/INCREMENTAL',
+ '/DEBUG',
+
+ '/DELAYLOAD:"dwmapi.dll"',
+ '/DELAYLOAD:"uxtheme.dll"',
+
+ '/MACHINE:X86',
+ '/FIXED:No',
+
+ '/safeseh',
+ '/dynamicbase',
+ '/ignore:4199',
+ '/nxcompat',
+ ],
+ LIBS = [
+ 'comsupp',
+ 'oleacc',
+ 'rpcrt4',
+ 'shlwapi',
+ ],
+ )
+
+input_files = [
+ '../setup/setup_constants$OBJSUFFIX',
+ '../util/copy_tree_work_item_unittest.cc',
+ '../util/create_dir_work_item_unittest.cc',
+ '../util/create_reg_key_work_item_unittest.cc',
+ '../util/delete_reg_value_work_item_unittest.cc',
+ '../util/delete_tree_work_item_unittest.cc',
+ '../util/google_chrome_distribution_unittest.cc',
+ '../util/helper_unittest.cc',
+ '../util/run_all_unittests.cc',
+ '../util/set_reg_value_work_item_unittest.cc',
+ '../util/work_item_list_unittest.cc',
+]
+
+env.ChromeTestProgram('installer_unittests', input_files)
diff --git a/chrome/installer/mini_installer/mini_installer.scons b/chrome/installer/mini_installer/mini_installer.scons
new file mode 100644
index 0000000..a6b5dc4
--- /dev/null
+++ b/chrome/installer/mini_installer/mini_installer.scons
@@ -0,0 +1,106 @@
+# 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_res')
+
+env = env.Clone()
+
+env.ApplySConscript([
+ '$GTEST_DIR/../using_gtest.scons',
+])
+
+
+# TODO(port): Don't be too fooled by the presence of all the
+# if env['PLATFORM'] == 'win32' tests in this file into thinking
+# this is necessarily portable. They're just there to wall off the
+# obviously windows-specific things
+
+if env['PLATFORM'] == 'win32':
+ env_res = env_res.Clone()
+
+ env_res.Append(
+ CPPPATH = [
+ "$TARGET_ROOT",
+ ".",
+ "$CHROME_SRC_DIR",
+ ],
+ RCFLAGS = [
+ ["/l", "0x409"],
+ ],
+ )
+
+ resources = env_res.RES('mini_installer.rc')
+
+
+env.Prepend(
+ CPPPATH = [
+ '$CHROME_SRC_DIR',
+ ],
+ LIBS = [
+ 'chrome',
+ ],
+)
+
+if env['PLATFORM'] == 'win32':
+ env.FilterOut(
+ LIBS = ['DelayImp.lib'],
+ CCFLAGS = ['/RTC1'],
+ )
+
+ env.Prepend(
+ CCFLAGS = [
+ '/TP',
+ '/GS-', # because we link with /NODEFAULTLIB
+ ],
+ LINKFLAGS = [
+ '/INCREMENTAL',
+ '/NODEFAULTLIB',
+ '/DEBUG',
+ '/SUBSYSTEM:WINDOWS',
+ '/OPT:NOWIN98',
+ '/ENTRY:"MainEntryPoint"',
+ '/MACHINE:X86',
+ '/FIXED:No',
+
+ '/SAFESEH:NO',
+ '/NXCOMPAT',
+ '/DYNAMICBASE:NO',
+
+ '/PDB:${TARGETS[1]}',
+ #'/MAP:${TARGETS[2]}',
+ ],
+ LIBS = [
+ 'shlwapi',
+ ],
+ )
+
+input_files = [
+ "mini_installer.cc",
+ "pe_resource.cc",
+]
+
+if env['PLATFORM'] == 'win32':
+ input_files.extend([
+ "$VISUAL_STUDIO/VC/crt/src/intel/mt_lib/memset.obj",
+ "$VISUAL_STUDIO/VC/crt/src/intel/mt_lib/P4_memset.obj",
+ ])
+ input_files.extend(resources)
+
+env.ChromeProgram('mini_installer', input_files)
+
+
+env.AppendENVPath('PATH', r'C:\WINDOWS\system32')
+
+packed = env.Command('$TARGET_ROOT/packed_files.txt',
+ ['$CHROME_DIR/tools/build/win/create_installer_archive.py',
+ '$CHROME_DIR/installer/mini_installer/chrome.release'],
+ ('$PYTHON ${SOURCES[0]}'
+ ' --output_dir=${TARGET.dir}'
+ ' --input_file=${SOURCES[1]}'))
+env.Depends(packed, '$TARGET_ROOT/setup.exe')
+
+
+env.ChromeVersionRC('mini_installer_exe_version.rc',
+ 'mini_installer_exe_version.rc.version',
+ PWD=Dir('.'))
diff --git a/chrome/installer/setup/SConscript b/chrome/installer/setup/SConscript
deleted file mode 100644
index e754c56..0000000
--- a/chrome/installer/setup/SConscript
+++ /dev/null
@@ -1,87 +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_res')
-
-env = env.Clone()
-env_res = env_res.Clone()
-
-
-env_res.Append(
- CPPPATH = [
- "$TARGET_ROOT",
- ".",
- "$CHROME_SRC_DIR",
- ],
- RCFLAGS = [
- ["/l", "0x409"],
- ],
-)
-
-
-resources = [
- env_res.RES('setup.rc'),
-]
-
-
-env.Prepend(
- CPPPATH = [
- '../util',
- '$TARGET_ROOT',
- '.',
- '$CHROME_SRC_DIR',
- ],
- LIBS = [
- 'base',
- 'bspatch',
- 'common',
- env['ICU_LIBS'], # TODO(sgk): '$ICU_LIBS' when scons is fixed
- 'lzma_sdk',
- 'util',
- ],
-)
-
-env.Prepend(
- LINKFLAGS = [
- '/INCREMENTAL',
- '/DEBUG',
-
- '/DELAYLOAD:"dwmapi.dll"',
- '/DELAYLOAD:"uxtheme.dll"',
-
- '/OPT:NOWIN98',
- '/SUBSYSTEM:WINDOWS',
- '/MACHINE:X86',
- '/FIXED:No',
-
- '/safeseh',
- '/dynamicbase',
- '/ignore:4199',
- '/nxcompat',
-
- '/PDB:${TARGETS[1]}',
- ],
- LIBS = [
- 'msi.lib',
- ],
-)
-
-input_files = [
- 'install.cc',
- 'main.cc',
- 'setup.cc',
- 'setup_constants.cc',
- 'uninstall.cc',
-]
-
-exe = env.ChromeProgram('setup', resources + input_files)
-i = env.Install('$TARGET_ROOT', exe)
-
-env.Alias('chrome', i)
-
-
-env.ChromeVersionRC('setup_exe_version.rc',
- 'setup_exe_version.rc.version',
- PWD = env.Dir('.'))
-
diff --git a/chrome/installer/setup/setup.scons b/chrome/installer/setup/setup.scons
new file mode 100644
index 0000000..5ea69e5
--- /dev/null
+++ b/chrome/installer/setup/setup.scons
@@ -0,0 +1,85 @@
+# 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_res')
+
+env = env.Clone()
+
+env.ApplySConscript([
+ '$BASE_DIR/using_base.scons',
+ '$BSPATCH_DIR/using_bspatch.scons',
+ '$ICU38_DIR/using_icu38.scons',
+ '$LZMA_SDK_DIR/using_lzma_sdk.scons',
+])
+
+if env['PLATFORM'] == 'win32':
+ env_res = env_res.Clone()
+
+ env_res.Append(
+ CPPPATH = [
+ "$TARGET_ROOT",
+ ".",
+ "$CHROME_SRC_DIR",
+ ],
+ RCFLAGS = [
+ ["/l", "0x409"],
+ ],
+ )
+
+ resources = env_res.RES('setup.rc')
+
+
+env.Prepend(
+ CPPPATH = [
+ '../util',
+ '$TARGET_ROOT',
+ '.',
+ '$CHROME_SRC_DIR',
+ ],
+ LIBS = [
+ 'common',
+ 'util',
+ ],
+)
+
+if env['PLATFORM'] == 'win32':
+ env.Prepend(
+ LINKFLAGS = [
+ '/INCREMENTAL',
+ '/DEBUG',
+
+ '/DELAYLOAD:"dwmapi.dll"',
+ '/DELAYLOAD:"uxtheme.dll"',
+
+ '/OPT:NOWIN98',
+ '/SUBSYSTEM:WINDOWS',
+ '/MACHINE:X86',
+ '/FIXED:No',
+
+ '/safeseh',
+ '/dynamicbase',
+ '/ignore:4199',
+ '/nxcompat',
+
+ '/PDB:${TARGETS[1]}',
+ ],
+ LIBS = [
+ 'msi',
+ ],
+ )
+
+
+input_files = [
+ 'install.cc',
+ 'main.cc',
+ 'setup.cc',
+ 'setup_constants.cc',
+ 'uninstall.cc',
+]
+
+env.ChromeProgram('setup', resources + input_files)
+
+env.ChromeVersionRC('setup_exe_version.rc',
+ 'setup_exe_version.rc.version',
+ PWD = env.Dir('.'))
diff --git a/chrome/installer/util/SConscript b/chrome/installer/util/util.scons
index cd1ae17..e1e4957 100644
--- a/chrome/installer/util/SConscript
+++ b/chrome/installer/util/util.scons
@@ -6,35 +6,24 @@ Import('env')
env = env.Clone()
+env.ApplySConscript([
+ '$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',
+ '$LZMA_SDK_DIR/using_lzma_sdk.scons',
+ '$NPAPI_DIR/using_npapi.scons',
+ '$SKIA_DIR/using_skia.scons',
+ '$ZLIB_DIR/using_zlib.scons',
+])
env.Prepend(
CPPPATH = [
- '$LZMA_SDK_DIR',
- '$CHROME_DIR/third_party/wtl/include',
- '$NPAPI_DIR',
- '$LIBXML_DIR/include',
- '$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',
'$CHROME_SRC_DIR',
'.',
],
- CPPDEFINES = [
- "_LZMA_IN_CB",
- "LIBXML_STATIC",
- "PNG_USER_CONFIG",
- "CHROME_PNG_WRITE_SUPPORT"
- "U_STATIC_IMPLEMENTATION",
- ],
- CCFLAGS = [
- '/TP',
- ],
)
input_files = [
@@ -61,7 +50,7 @@ input_files = [
'work_item_list.cc',
]
-x = env.ChromeStaticLibrary('util', input_files)
+env.ChromeStaticLibrary('util', input_files)
# create_string_rc.py imports FP.py from the tools/grit/grit/extern
diff --git a/third_party/bsdiff/SConscript b/third_party/bsdiff/SConscript
deleted file mode 100644
index e1408c8..0000000
--- a/third_party/bsdiff/SConscript
+++ /dev/null
@@ -1,53 +0,0 @@
-# Copyright 2008, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-# TODO(keunwoo): Use better cross-platform abstraction; see chrome/SConstruct
-Import('env')
-
-env = env.Clone()
-
-env.Prepend(
- CPPPATH = [
- '../bspatch',
- ]
-)
-
-if env['PLATFORM'] == 'win32':
- env.Append(
- CCFLAGS = [
- '/TP',
- '/wd4800',
- ],
- )
-
-input_files = [
- "mbsdiff.cc",
-]
-
-env.ChromeStaticLibrary('bsdiff', input_files)
diff --git a/third_party/bsdiff/bsdiff.scons b/third_party/bsdiff/bsdiff.scons
new file mode 100644
index 0000000..9aa56fb
--- /dev/null
+++ b/third_party/bsdiff/bsdiff.scons
@@ -0,0 +1,25 @@
+# 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.ApplySConscript([
+ '$BSPATCH_DIR/using_bspatch.scons',
+])
+
+if env['PLATFORM'] == 'win32':
+ env.Append(
+ CCFLAGS = [
+ '/TP',
+ '/wd4800',
+ ],
+ )
+
+input_files = [
+ "mbsdiff.cc",
+]
+
+env.ChromeStaticLibrary('bsdiff', input_files)
diff --git a/third_party/bspatch/SConscript b/third_party/bspatch/SConscript
deleted file mode 100644
index e88910c..0000000
--- a/third_party/bspatch/SConscript
+++ /dev/null
@@ -1,64 +0,0 @@
-# Copyright 2008, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-# TODO(keunwoo): Use better cross-platform abstraction; see chrome/SConstruct
-Import('env')
-
-env = env.Clone(
-)
-
-env.Prepend(
- CPPPATH = [
- '$CHROME_SRC_DIR/third_party/lzma_sdk/',
- ],
-)
-
-env.Append(
- CPPDEFINES = [
- '_LZMA_IN_CB',
- ],
-)
-
-if env['PLATFORM'] == 'win32':
- env.Append(
- CCFLAGS = [
- '/TP',
- '/wd4800',
- ],
- )
-elif env['PLATFORM'] == 'posix':
- if '-Wall' in env['CXXFLAGS']:
- # We're not responsible for bad warning hygiene in this third party code.
- env['CXXFLAGS'].remove('-Wall')
-
-input_files = [
- 'mbspatch.cc',
-]
-
-env.ChromeStaticLibrary('bspatch', input_files)
diff --git a/third_party/bspatch/bspatch.scons b/third_party/bspatch/bspatch.scons
new file mode 100644
index 0000000..6160e66
--- /dev/null
+++ b/third_party/bspatch/bspatch.scons
@@ -0,0 +1,30 @@
+# 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.ApplySConscript([
+ '$LZMA_SDK_DIR/using_lzma_sdk.scons',
+])
+
+if env['PLATFORM'] == 'win32':
+ env.Append(
+ CCFLAGS = [
+ '/TP',
+ '/wd4800',
+ ],
+ )
+elif env['PLATFORM'] == 'posix':
+ # We're not responsible for bad warning hygiene in this third party code.
+ env.FilterOut(
+ CXXFLAGS = ['-Wall'],
+ )
+
+input_files = [
+ 'mbspatch.cc',
+]
+
+env.ChromeStaticLibrary('bspatch', input_files)
diff --git a/third_party/bspatch/using_bspatch.scons b/third_party/bspatch/using_bspatch.scons
new file mode 100644
index 0000000..945fdf9
--- /dev/null
+++ b/third_party/bspatch/using_bspatch.scons
@@ -0,0 +1,18 @@
+# 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 bspatch library.
+"""
+
+Import("env")
+
+env.Append(
+ CPPPATH = [
+ '$BSPATCH_DIR',
+ ],
+ LIBS = [
+ 'bspatch',
+ ],
+)
diff --git a/third_party/lzma_sdk/SConscript b/third_party/lzma_sdk/SConscript
deleted file mode 100644
index 679d362..0000000
--- a/third_party/lzma_sdk/SConscript
+++ /dev/null
@@ -1,72 +0,0 @@
-# Copyright 2008, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Import('env')
-
-env = env.Clone(
-)
-
-env.Prepend(
- CPPPATH = [
- '.',
- '../../',
- ]
-)
-
-env.Append(
- CPPDEFINES = [
- '_LZMA_PROB32',
- '_LZMA_IN_CB',
- ],
-)
-
-if env['PLATFORM'] == 'win32':
- env.Append(
- CCFLAGS = [
- '/TC',
- '/wd4800',
- ],
- )
-
-input_files = [
- '7zCrc.c',
- 'Archive/7z/7zAlloc.c',
- 'Archive/7z/7zBuffer.c',
- 'Archive/7z/7zDecode.c',
- 'Archive/7z/7zExtract.c',
- 'Archive/7z/7zHeader.c',
- 'Archive/7z/7zIn.c',
- 'Archive/7z/7zItem.c',
- 'Archive/7z/7zMethodID.c',
- 'Compress/Branch/BranchX86.c',
- 'Compress/Branch/BranchX86_2.c',
- 'Compress/Lzma/LzmaDecode.c',
-]
-
-env.ChromeStaticLibrary('lzma_sdk', input_files)
diff --git a/third_party/lzma_sdk/lzma_sdk.scons b/third_party/lzma_sdk/lzma_sdk.scons
new file mode 100644
index 0000000..b76a2d22
--- /dev/null
+++ b/third_party/lzma_sdk/lzma_sdk.scons
@@ -0,0 +1,46 @@
+# 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.Prepend(
+ CPPPATH = [
+ '.',
+ '$CHROME_SRC_DIR',
+ ]
+)
+
+env.Append(
+ CPPDEFINES = [
+ '_LZMA_PROB32',
+ '_LZMA_IN_CB',
+ ],
+)
+
+if env['PLATFORM'] == 'win32':
+ env.Append(
+ CCFLAGS = [
+ '/TC',
+ '/wd4800',
+ ],
+ )
+
+input_files = [
+ '7zCrc.c',
+ 'Archive/7z/7zAlloc.c',
+ 'Archive/7z/7zBuffer.c',
+ 'Archive/7z/7zDecode.c',
+ 'Archive/7z/7zExtract.c',
+ 'Archive/7z/7zHeader.c',
+ 'Archive/7z/7zIn.c',
+ 'Archive/7z/7zItem.c',
+ 'Archive/7z/7zMethodID.c',
+ 'Compress/Branch/BranchX86.c',
+ 'Compress/Branch/BranchX86_2.c',
+ 'Compress/Lzma/LzmaDecode.c',
+]
+
+env.ChromeStaticLibrary('lzma_sdk', input_files)
diff --git a/third_party/lzma_sdk/using_lzma_sdk.scons b/third_party/lzma_sdk/using_lzma_sdk.scons
new file mode 100644
index 0000000..d3f4801
--- /dev/null
+++ b/third_party/lzma_sdk/using_lzma_sdk.scons
@@ -0,0 +1,21 @@
+# 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 lzma_sdk library.
+"""
+
+Import("env")
+
+env.Append(
+ CPPPATH = [
+ '$LZMA_SDK_DIR',
+ ],
+ CPPDEFINES = [
+ "_LZMA_IN_CB",
+ ],
+ LIBS = [
+ 'lzma_sdk',
+ ],
+)