| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/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']) |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 PCHCOMSTR='________Precompiling $TARGET', | 200 PCHCOMSTR='________Precompiling $TARGET', |
| 201 RANLIBCOMSTR='________Indexing $TARGET', | 201 RANLIBCOMSTR='________Indexing $TARGET', |
| 202 RCCOMSTR='________Compiling resource $TARGET', | 202 RCCOMSTR='________Compiling resource $TARGET', |
| 203 SHCCCOMSTR='________Compiling $TARGET', | 203 SHCCCOMSTR='________Compiling $TARGET', |
| 204 SHCXXCOMSTR='________Compiling $TARGET', | 204 SHCXXCOMSTR='________Compiling $TARGET', |
| 205 SHLINKCOMSTR='________Linking $TARGET', | 205 SHLINKCOMSTR='________Linking $TARGET', |
| 206 SHMANIFEST_COMSTR='________Updating manifest for $TARGET', | 206 SHMANIFEST_COMSTR='________Updating manifest for $TARGET', |
| 207 # Strip doesn't seem to be a first-class citizen in SCons country, | 207 # Strip doesn't seem to be a first-class citizen in SCons country, |
| 208 # so we have to add these *COM, *COMSTR manually. | 208 # so we have to add these *COM, *COMSTR manually. |
| 209 STRIPCOMSTR='________Stripping to create $TARGET', | 209 STRIPCOMSTR='________Stripping to create $TARGET', |
| 210 TRANSLATECOMSTR='________Translating $TARGET', |
| 210 ) | 211 ) |
| 211 | 212 |
| 212 # Add other default tools from our toolkit | 213 # Add other default tools from our toolkit |
| 213 # TODO: Currently this needs to be before SOURCE_ROOT in case a tool needs to | 214 # TODO: Currently this needs to be before SOURCE_ROOT in case a tool needs to |
| 214 # redefine it. Need a better way to handle order-dependency in tool setup. | 215 # redefine it. Need a better way to handle order-dependency in tool setup. |
| 215 for t in component_setup_tools: | 216 for t in component_setup_tools: |
| 216 env.Tool(t) | 217 env.Tool(t) |
| 217 | 218 |
| 218 # The following environment replacements use env.Dir() to force immediate | 219 # The following environment replacements use env.Dir() to force immediate |
| 219 # evaluation/substitution of SCons variables. They can't be part of the | 220 # evaluation/substitution of SCons variables. They can't be part of the |
| (...skipping 15 matching lines...) Expand all Loading... |
| 235 # 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 |
| 236 # 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 |
| 237 # being included. | 238 # being included. |
| 238 tool_root = env.get('TOOL_ROOT', '$SOURCE_ROOT') | 239 tool_root = env.get('TOOL_ROOT', '$SOURCE_ROOT') |
| 239 env['TOOL_ROOT'] = env.Dir(tool_root).abspath | 240 env['TOOL_ROOT'] = env.Dir(tool_root).abspath |
| 240 | 241 |
| 241 # Defer pre-evaluating some environment variables, but do before building | 242 # Defer pre-evaluating some environment variables, but do before building |
| 242 # SConscripts. | 243 # SConscripts. |
| 243 env.Defer(PreEvaluateVariables) | 244 env.Defer(PreEvaluateVariables) |
| 244 env.Defer('BuildEnvironmentSConscripts', after=PreEvaluateVariables) | 245 env.Defer('BuildEnvironmentSConscripts', after=PreEvaluateVariables) |
| OLD | NEW |