OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2011 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2011 The Native Client Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """Main setup for software construction toolkit. | 6 """Main setup for software construction toolkit. |
7 | 7 |
8 This module is a SCons tool which should be include in all environments. | 8 This module is a SCons tool which should be include in all environments. |
9 It is used as follows: | 9 It is used as follows: |
10 env = Environment(tools = ['component_setup']) | 10 env = Environment(tools = ['component_setup']) |
11 and should be the first tool from this toolkit referenced by any environment. | 11 and should be the first tool from this toolkit referenced by any environment. |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 # have a common location for tools outside of the current clientspec. Need | 236 # have a common location for tools outside of the current clientspec. Need |
237 # to check if it's defined already, so it can be set prior to this tool | 237 # to check if it's defined already, so it can be set prior to this tool |
238 # being included. | 238 # being included. |
239 tool_root = env.get('TOOL_ROOT', '$SOURCE_ROOT') | 239 tool_root = env.get('TOOL_ROOT', '$SOURCE_ROOT') |
240 env['TOOL_ROOT'] = env.Dir(tool_root).abspath | 240 env['TOOL_ROOT'] = env.Dir(tool_root).abspath |
241 | 241 |
242 # Defer pre-evaluating some environment variables, but do before building | 242 # Defer pre-evaluating some environment variables, but do before building |
243 # SConscripts. | 243 # SConscripts. |
244 env.Defer(PreEvaluateVariables) | 244 env.Defer(PreEvaluateVariables) |
245 env.Defer('BuildEnvironmentSConscripts', after=PreEvaluateVariables) | 245 env.Defer('BuildEnvironmentSConscripts', after=PreEvaluateVariables) |
OLD | NEW |