diff options
author | mpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-06 22:45:50 +0000 |
---|---|---|
committer | mpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-06 22:45:50 +0000 |
commit | 17ee3a0708898be179820aa17482b803ef549632 (patch) | |
tree | d3369a5b0cff3f1d997f6b4088ebd43481debcf5 /gears/SConscript.common | |
parent | d8e70b4ea21e505f0e784fdef8f7c36ab619d7d8 (diff) | |
download | chromium_src-17ee3a0708898be179820aa17482b803ef549632.zip chromium_src-17ee3a0708898be179820aa17482b803ef549632.tar.gz chromium_src-17ee3a0708898be179820aa17482b803ef549632.tar.bz2 |
Change the way inputs are specified in the gears sconscripts. This will make
it easier to share inputs among files, in preparation for the symbian port.
Also, some small fixes:
- Added a hack to the third party lib scripts to place the libraries in the
right directory. Normally SCons does this, but fails due to a bug when
COMPONENT_LIBRARY_DIR is changed.
- Added fake notifier targets to make the win32 installer happy.
- Added NPAPI's gears.dll to the win32 installer dependencies, so it is built (even though it isn't used by the installer).
- Added symbian file to sqlite compile.
Review URL: http://codereview.chromium.org/9657
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4921 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gears/SConscript.common')
-rw-r--r-- | gears/SConscript.common | 90 |
1 files changed, 46 insertions, 44 deletions
diff --git a/gears/SConscript.common b/gears/SConscript.common index 0e1aa43..c949d18 100644 --- a/gears/SConscript.common +++ b/gears/SConscript.common @@ -35,31 +35,26 @@ env.Prepend( ] ) -m4srcs = [] -binsrcs = [] -crash_sender_srcs = [] -ipc_test_srcs = [] - #----------------------------------------------------------------------------- # crash_sender if env['OS'] == 'win32': - crash_sender_srcs += [ + env.Append(CRASH_SENDER_CPPSRCS = [ '$OPEN_DIR/crash_sender/crash_sender_win32.cc', '$THIRD_PARTY_DIR/breakpad/src/client/windows/sender/crash_report_sender.cc', '$THIRD_PARTY_DIR/breakpad/src/common/windows/http_upload.cc', - ] + ]) elif env['OS'] == 'osx': print 'TODO: crash_sender' #----------------------------------------------------------------------------- # ipc_test -m4srcs += [ +env.Append(COMMON_M4SRCS = [ '$OPEN_DIR/base/common/product_constants.h.m4', -] +]) -ipc_test_srcs += [ +env.Append(IPC_TEST_CPPSRCS = [ '$OPEN_DIR/base/common/event.cc', '$OPEN_DIR/base/common/ipc_message_queue_linux.cc', '$OPEN_DIR/base/common/ipc_message_queue_null.cc', @@ -81,51 +76,51 @@ ipc_test_srcs += [ '$OPEN_DIR/base/common/thread_posix.cc', '$OPEN_DIR/base/common/thread_win32.cc', '$OPEN_DIR/base/common/time_utils_win32.cc', -] +]) if env['OS'] == 'osx': - ipc_test_srcs += [ + env.Append(IPC_TEST_CPPSRCS = [ '$OPEN_DIR/base/common/common_osx.mm', '$OPEN_DIR/base/common/ipc_message_queue_test_osx.mm', - ] + ]) -ipc_test_srcs += [ +env.Append(IPC_TEST_CPPSRCS = [ '$THIRD_PARTY_DIR/convert_utf/ConvertUTF.c' -] +]) #----------------------------------------------------------------------------- # inspector if not env['OFFICIAL_BUILD']: - binsrcs += [ - '$OPEN_DIR/inspector/console.html', - '$OPEN_DIR/inspector/database.html', - '$OPEN_DIR/inspector/index.html', - '$OPEN_DIR/inspector/localserver.html', - '$OPEN_DIR/inspector/common/alert-35.png', - '$OPEN_DIR/inspector/common/database.gif', - '$OPEN_DIR/inspector/common/error-35.png', - '$OPEN_DIR/inspector/common/ie6hacks.css', - '$OPEN_DIR/inspector/common/inspector_links.js', - '$OPEN_DIR/inspector/common/lightbulb-35.png', - '$OPEN_DIR/inspector/common/localserver.gif', - '$OPEN_DIR/inspector/common/question-35.png', - '$OPEN_DIR/inspector/common/styles.css', - '$OPEN_DIR/inspector/common/workerpool.gif', - '$OPEN_DIR/sdk/gears_init.js', - '$OPEN_DIR/ui/common/base.js', - '$OPEN_DIR/ui/common/dom.js', - '$OPEN_DIR/ui/common/icon_32x32.png', - ] + env.Append(COMMON_BINSRCS = [ + '$OPEN_DIR/inspector/console.html', + '$OPEN_DIR/inspector/database.html', + '$OPEN_DIR/inspector/index.html', + '$OPEN_DIR/inspector/localserver.html', + '$OPEN_DIR/inspector/common/alert-35.png', + '$OPEN_DIR/inspector/common/database.gif', + '$OPEN_DIR/inspector/common/error-35.png', + '$OPEN_DIR/inspector/common/ie6hacks.css', + '$OPEN_DIR/inspector/common/inspector_links.js', + '$OPEN_DIR/inspector/common/lightbulb-35.png', + '$OPEN_DIR/inspector/common/localserver.gif', + '$OPEN_DIR/inspector/common/question-35.png', + '$OPEN_DIR/inspector/common/styles.css', + '$OPEN_DIR/inspector/common/workerpool.gif', + '$OPEN_DIR/sdk/gears_init.js', + '$OPEN_DIR/ui/common/base.js', + '$OPEN_DIR/ui/common/dom.js', + '$OPEN_DIR/ui/common/icon_32x32.png', + ]) #----------------------------------------------------------------------------- # installer -m4srcs += [ +env.Append(COMMON_M4SRCS = [ '$OPEN_DIR/installer/npapi_msi.wxs.m4', '$OPEN_DIR/installer/win32_msi.wxs.m4', '$OPEN_DIR/installer/wince_cab.inf.m4', -] +]) #----------------------------------------------------------------------------- # Generate the dependency tree. @@ -134,26 +129,33 @@ common_targets = {} def PatternRule(t, s): return utils.PatternRule(t, s, env) +def GetInputs(var): + """Expands an env substitution variable and returns it as a list of + strings.""" + return [str(v) for v in env.subst_list(var)[0]] + # genfiles/%: %.m4 common_targets['m4'] = \ [env.M4(*PatternRule('$COMMON_GENFILES_DIR/${SOURCE.filebase}', src)) - for src in m4srcs] + for src in GetInputs('$COMMON_M4SRCS')] # genfiles/%.from_bin.cc: % -bins = [env.Bin2cpp(*PatternRule( - '$COMMON_GENFILES_DIR/${SOURCE.file}.from_bin.cc', src)) - for src in binsrcs] -common_targets['src'] = [env.SharedObject(bin) for bin in bins] +if GetInputs('$COMMON_BINSRCS'): + bins = [env.Bin2cpp(*PatternRule( + '$COMMON_GENFILES_DIR/${SOURCE.file}.from_bin.cc', src)) + for src in GetInputs('$COMMON_BINSRCS')] + common_targets['src'] = [env.SharedObject(bin) for bin in bins] Export('common_targets') -env.ChromeProgram('ipc_test', ipc_test_srcs) +env.ChromeProgram('ipc_test', GetInputs('$IPC_TEST_CPPSRCS')) # Note: crash_sender.exe name needs to stay in sync with name used in # exception_handler_win32.cc and exception_handler_osx/google_breakpad.mm. crash_sender = None if env['OS'] == 'win32': - crash_sender = env.ChromeProgram('crash_sender', crash_sender_srcs, + crash_sender = env.ChromeProgram('crash_sender', + GetInputs('$CRASH_SENDER_CPPSRCS'), LIBS = Split('advapi32.lib shell32.lib wininet.lib')) elif env['OS'] == 'osx': pass |