Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """ | 5 """ |
| 6 Tool module for adding, to a construction environment, Chromium-specific | 6 Tool module for adding, to a construction environment, Chromium-specific |
| 7 wrappers around Hammer builders. This gives us a central place for any | 7 wrappers around Hammer builders. This gives us a central place for any |
| 8 customization we need to make to the different things we build. | 8 customization we need to make to the different things we build. |
| 9 """ | 9 """ |
| 10 | 10 |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 295 | 295 |
| 296 def ChromeInstall(env, target, source): | 296 def ChromeInstall(env, target, source): |
| 297 """ | 297 """ |
| 298 Replacement for the stock SCons Install() builder to use the | 298 Replacement for the stock SCons Install() builder to use the |
| 299 external cp utility instead of Python internals. | 299 external cp utility instead of Python internals. |
| 300 """ | 300 """ |
| 301 result = [] | 301 result = [] |
| 302 copy_action = Action('cp $SOURCE $TARGET', 'Copying $TARGET') | 302 copy_action = Action('cp $SOURCE $TARGET', 'Copying $TARGET') |
| 303 for s in source: | 303 for s in source: |
| 304 dest = str(target) + '/' + os.path.split(str(s))[1] | 304 dest = str(target) + '/' + os.path.split(str(s))[1] |
| 305 result.extend(env.Command(dest, s, copy_action) | 305 result.extend(env.Command(dest, s, copy_action)) |
|
Mark Mentovai
2009/04/02 05:10:24
Oops!
| |
| 306 return result | 306 return result |
| 307 | 307 |
| 308 def generate(env): | 308 def generate(env): |
| 309 env.AddMethod(ChromeProgram) | 309 env.AddMethod(ChromeProgram) |
| 310 env.AddMethod(ChromeTestProgram) | 310 env.AddMethod(ChromeTestProgram) |
| 311 env.AddMethod(ChromeLibrary) | 311 env.AddMethod(ChromeLibrary) |
| 312 env.AddMethod(ChromeLoadableModule) | 312 env.AddMethod(ChromeLoadableModule) |
| 313 env.AddMethod(ChromeStaticLibrary) | 313 env.AddMethod(ChromeStaticLibrary) |
| 314 env.AddMethod(ChromeSharedLibrary) | 314 env.AddMethod(ChromeSharedLibrary) |
| 315 env.AddMethod(ChromeObject) | 315 env.AddMethod(ChromeObject) |
| 316 env.AddMethod(ChromeMSVSFolder) | 316 env.AddMethod(ChromeMSVSFolder) |
| 317 env.AddMethod(ChromeMSVSProject) | 317 env.AddMethod(ChromeMSVSProject) |
| 318 env.AddMethod(ChromeMSVSSolution) | 318 env.AddMethod(ChromeMSVSSolution) |
| 319 env.AddMethod(ChromeInstall) | 319 env.AddMethod(ChromeInstall) |
| 320 | 320 |
| 321 env.AddMethod(FilterOut) | 321 env.AddMethod(FilterOut) |
| 322 | 322 |
| 323 # Add the grit tool to the base environment because we use this a lot. | 323 # Add the grit tool to the base environment because we use this a lot. |
| 324 sys.path.append(env.Dir('$SRC_DIR/tools/grit').abspath) | 324 sys.path.append(env.Dir('$SRC_DIR/tools/grit').abspath) |
| 325 env.Tool('scons', toolpath=[env.Dir('$SRC_DIR/tools/grit/grit')]) | 325 env.Tool('scons', toolpath=[env.Dir('$SRC_DIR/tools/grit/grit')]) |
| 326 | 326 |
| 327 # Add the repack python script tool that we use in multiple places. | 327 # Add the repack python script tool that we use in multiple places. |
| 328 sys.path.append(env.Dir('$SRC_DIR/tools/data_pack').abspath) | 328 sys.path.append(env.Dir('$SRC_DIR/tools/data_pack').abspath) |
| 329 env.Tool('scons', toolpath=[env.Dir('$SRC_DIR/tools/data_pack/')]) | 329 env.Tool('scons', toolpath=[env.Dir('$SRC_DIR/tools/data_pack/')]) |
| 330 | 330 |
| 331 def exists(env): | 331 def exists(env): |
| 332 return True | 332 return True |
| OLD | NEW |