OLD | NEW |
1 #!/usr/bin/python2.4 | 1 #!/usr/bin/python2.4 |
2 # Copyright 2009, Google Inc. | 2 # Copyright 2009, Google Inc. |
3 # All rights reserved. | 3 # All rights reserved. |
4 # | 4 # |
5 # Redistribution and use in source and binary forms, with or without | 5 # Redistribution and use in source and binary forms, with or without |
6 # modification, are permitted provided that the following conditions are | 6 # modification, are permitted provided that the following conditions are |
7 # met: | 7 # met: |
8 # | 8 # |
9 # * Redistributions of source code must retain the above copyright | 9 # * Redistributions of source code must retain the above copyright |
10 # notice, this list of conditions and the following disclaimer. | 10 # notice, this list of conditions and the following disclaimer. |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 elif not ec.RelativePath('$MAIN_DIR', c_dir).startswith('..'): | 195 elif not ec.RelativePath('$MAIN_DIR', c_dir).startswith('..'): |
196 # The above expression means: if c_dir is $MAIN_DIR or anything | 196 # The above expression means: if c_dir is $MAIN_DIR or anything |
197 # under it. Going from c_dir to $TARGET_ROOT and dropping the not fails | 197 # under it. Going from c_dir to $TARGET_ROOT and dropping the not fails |
198 # to include $MAIN_DIR. | 198 # to include $MAIN_DIR. |
199 # Also, if we are passed a SConscript that | 199 # Also, if we are passed a SConscript that |
200 # is not under $MAIN_DIR, we should fail loudly, because it is unclear how | 200 # is not under $MAIN_DIR, we should fail loudly, because it is unclear how |
201 # this will correspond to things under $OBJ_ROOT. | 201 # this will correspond to things under $OBJ_ROOT. |
202 ec.SConscript(c_script, build_dir='$OBJ_ROOT/' + c_dir, | 202 ec.SConscript(c_script, build_dir='$OBJ_ROOT/' + c_dir, |
203 exports={'env': ec}, duplicate=0) | 203 exports={'env': ec}, duplicate=0) |
204 else: | 204 else: |
205 raise SCons.Error.UserError( | 205 raise SCons.Errors.UserError( |
206 'Bad location for a SConscript. "%s" is not under ' | 206 'Bad location for a SConscript. "%s" is not under ' |
207 '\$TARGET_ROOT or \$MAIN_DIR' % c_script) | 207 '\$TARGET_ROOT or \$MAIN_DIR' % c_script) |
208 | 208 |
209 | 209 |
210 def FilterEnvironments(environments): | 210 def FilterEnvironments(environments): |
211 """Filters out the environments to be actually build from the specified list | 211 """Filters out the environments to be actually build from the specified list |
212 | 212 |
213 Only environments with HOST_PLATFORMS containing the platform specified by | 213 Only environments with HOST_PLATFORMS containing the platform specified by |
214 --host-platform (or the native host platform, if --host-platform was not | 214 --host-platform (or the native host platform, if --host-platform was not |
215 specified) will be matched. | 215 specified) will be matched. |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 # Since our site dir was specified on the SCons command line, SCons will | 446 # Since our site dir was specified on the SCons command line, SCons will |
447 # normally only look at our site dir. Add back checking for project-local | 447 # normally only look at our site dir. Add back checking for project-local |
448 # site_scons directories. | 448 # site_scons directories. |
449 if not SCons.Script.GetOption('no_site_dir'): | 449 if not SCons.Script.GetOption('no_site_dir'): |
450 SCons.Script.Main._load_site_scons_dir( | 450 SCons.Script.Main._load_site_scons_dir( |
451 SCons.Node.FS.get_default_fs().SConstruct_dir, None) | 451 SCons.Node.FS.get_default_fs().SConstruct_dir, None) |
452 | 452 |
453 | 453 |
454 # Run main code | 454 # Run main code |
455 SiteInitMain() | 455 SiteInitMain() |
OLD | NEW |