diff options
author | sgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-01 22:05:52 +0000 |
---|---|---|
committer | sgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-01 22:05:52 +0000 |
commit | b20fe49192425fab3e92aa444bd5e9bcc9837cc8 (patch) | |
tree | 97cfc5eca626baf5f47ba1fb71be4f68a704bc26 /site_scons | |
parent | 0fad1f1a74408b939d1b09dcc2f9391544e7e692 (diff) | |
download | chromium_src-b20fe49192425fab3e92aa444bd5e9bcc9837cc8.zip chromium_src-b20fe49192425fab3e92aa444bd5e9bcc9837cc8.tar.gz chromium_src-b20fe49192425fab3e92aa444bd5e9bcc9837cc8.tar.bz2 |
Change uses of the SCons Install() builder to 'cp' inside the
Chromium infrastructure, too.
Review URL: http://codereview.chromium.org/60030
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12984 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'site_scons')
-rw-r--r-- | site_scons/site_tools/chromium_builders.py | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/site_scons/site_tools/chromium_builders.py b/site_scons/site_tools/chromium_builders.py index 56081ea..65dbb95 100644 --- a/site_scons/site_tools/chromium_builders.py +++ b/site_scons/site_tools/chromium_builders.py @@ -191,7 +191,7 @@ def ChromeProgram(env, target, source, *args, **kw): source = compilable_files(env, source) if env.get('_GYP'): prog = env.Program(target, source, *args, **kw) - result = env.Install('$TOP_BUILDDIR', prog) + result = env.ChromeInstall('$TOP_BUILDDIR', prog) else: result = env.ComponentProgram(target, source, *args, **kw) if env.get('INCREMENTAL'): @@ -202,7 +202,7 @@ def ChromeTestProgram(env, target, source, *args, **kw): source = compilable_files(env, source) if env.get('_GYP'): prog = env.Program(target, source, *args, **kw) - result = env.Install('$TOP_BUILDDIR', prog) + result = env.ChromeInstall('$TOP_BUILDDIR', prog) else: result = env.ComponentTestProgram(target, source, *args, **kw) if env.get('INCREMENTAL'): @@ -213,7 +213,7 @@ def ChromeLibrary(env, target, source, *args, **kw): source = compilable_files(env, source) if env.get('_GYP'): lib = env.Library(target, source, *args, **kw) - result = env.Install('$LIB_DIR', lib) + result = env.ChromeInstall('$LIB_DIR', lib) else: result = env.ComponentLibrary(target, source, *args, **kw) return result @@ -231,7 +231,7 @@ def ChromeStaticLibrary(env, target, source, *args, **kw): source = compilable_files(env, source) if env.get('_GYP'): lib = env.StaticLibrary(target, source, *args, **kw) - result = env.Install('$LIB_DIR', lib) + result = env.ChromeInstall('$LIB_DIR', lib) else: kw['COMPONENT_STATIC'] = True result = env.ComponentLibrary(target, source, *args, **kw) @@ -241,7 +241,7 @@ def ChromeSharedLibrary(env, target, source, *args, **kw): source = compilable_files(env, source) if env.get('_GYP'): lib = env.SharedLibrary(target, source, *args, **kw) - result = env.Install('$LIB_DIR', lib) + result = env.ChromeInstall('$LIB_DIR', lib) else: kw['COMPONENT_STATIC'] = False result = [env.ComponentLibrary(target, source, *args, **kw)[0]] @@ -293,6 +293,18 @@ def ChromeMSVSSolution(env, *args, **kw): Alias('msvs', i) return result +def ChromeInstall(env, target, source): + """ + Replacement for the stock SCons Install() builder to use the + external cp utility instead of Python internals. + """ + result = [] + copy_action = Action('cp $SOURCE $TARGET', 'Copying $TARGET') + for s in source: + dest = str(target) + '/' + os.path.split(str(s))[1] + result.extend(env.Command(dest, s, copy_action) + return result + def generate(env): env.AddMethod(ChromeProgram) env.AddMethod(ChromeTestProgram) @@ -304,6 +316,7 @@ def generate(env): env.AddMethod(ChromeMSVSFolder) env.AddMethod(ChromeMSVSProject) env.AddMethod(ChromeMSVSSolution) + env.AddMethod(ChromeInstall) env.AddMethod(FilterOut) |