| OLD | NEW |
| (Empty) |
| 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 | |
| 3 # found in the LICENSE file. | |
| 4 | |
| 5 """ | |
| 6 Tool module for adding, to a construction environment, Chromium-specific | |
| 7 wrappers around SCons builders. This gives us a central place for any | |
| 8 customization we need to make to the different things we build. | |
| 9 """ | |
| 10 | |
| 11 import sys | |
| 12 | |
| 13 from SCons.Script import * | |
| 14 | |
| 15 class Null(object): | |
| 16 def __new__(cls, *args, **kwargs): | |
| 17 if '_inst' not in vars(cls): | |
| 18 cls._inst = super(type, cls).__new__(cls, *args, **kwargs) | |
| 19 return cls._inst | |
| 20 def __init__(self, *args, **kwargs): pass | |
| 21 def __call__(self, *args, **kwargs): return self | |
| 22 def __repr__(self): return "Null()" | |
| 23 def __nonzero__(self): return False | |
| 24 def __getattr__(self, name): return self | |
| 25 def __setattr__(self, name, val): return self | |
| 26 def __delattr__(self, name): return self | |
| 27 def __getitem__(self, name): return self | |
| 28 | |
| 29 | |
| 30 def generate(env): | |
| 31 # Add the grit tool to the base environment because we use this a lot. | |
| 32 sys.path.append(env.Dir('$SRC_DIR/tools/grit').abspath) | |
| 33 env.Tool('scons', toolpath=[env.Dir('$SRC_DIR/tools/grit/grit')]) | |
| 34 | |
| 35 # Add the repack python script tool that we use in multiple places. | |
| 36 sys.path.append(env.Dir('$SRC_DIR/tools/data_pack').abspath) | |
| 37 env.Tool('scons', toolpath=[env.Dir('$SRC_DIR/tools/data_pack/')]) | |
| 38 | |
| 39 def exists(env): | |
| 40 return True | |
| OLD | NEW |