| 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 |
| 11 import sys |
| 12 |
| 11 from SCons.Script import * | 13 from SCons.Script import * |
| 12 | 14 |
| 13 import SCons.Node | 15 import SCons.Node |
| 14 import _Node_MSVS as MSVS | 16 import _Node_MSVS as MSVS |
| 15 | 17 |
| 16 class Null(object): | 18 class Null(object): |
| 17 def __new__(cls, *args, **kwargs): | 19 def __new__(cls, *args, **kwargs): |
| 18 if '_inst' not in vars(cls): | 20 if '_inst' not in vars(cls): |
| 19 cls._inst = super(type, cls).__new__(cls, *args, **kwargs) | 21 cls._inst = super(type, cls).__new__(cls, *args, **kwargs) |
| 20 return cls._inst | 22 return cls._inst |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 env.AddMethod(ChromeProgram) | 158 env.AddMethod(ChromeProgram) |
| 157 env.AddMethod(ChromeTestProgram) | 159 env.AddMethod(ChromeTestProgram) |
| 158 env.AddMethod(ChromeLibrary) | 160 env.AddMethod(ChromeLibrary) |
| 159 env.AddMethod(ChromeStaticLibrary) | 161 env.AddMethod(ChromeStaticLibrary) |
| 160 env.AddMethod(ChromeSharedLibrary) | 162 env.AddMethod(ChromeSharedLibrary) |
| 161 env.AddMethod(ChromeObject) | 163 env.AddMethod(ChromeObject) |
| 162 env.AddMethod(ChromeMSVSFolder) | 164 env.AddMethod(ChromeMSVSFolder) |
| 163 env.AddMethod(ChromeMSVSProject) | 165 env.AddMethod(ChromeMSVSProject) |
| 164 env.AddMethod(ChromeMSVSSolution) | 166 env.AddMethod(ChromeMSVSSolution) |
| 165 | 167 |
| 168 # Add the grit tool to the base environment because we use this a lot. |
| 169 sys.path.append(env.Dir('$CHROME_SRC_DIR/tools/grit').abspath) |
| 170 env.Tool('scons', toolpath=[env.Dir('$CHROME_SRC_DIR/tools/grit/grit')]) |
| 171 |
| 172 # Add the repack python script tool that we use in multiple places. |
| 173 sys.path.append(env.Dir('$CHROME_SRC_DIR/tools/data_pack').abspath) |
| 174 env.Tool('scons', toolpath=[env.Dir('$CHROME_SRC_DIR/tools/data_pack/')]) |
| 175 |
| 166 def exists(env): | 176 def exists(env): |
| 167 return True | 177 return True |
| OLD | NEW |