OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
4 # for details. All rights reserved. Use of this source code is governed by a | 4 # for details. All rights reserved. Use of this source code is governed by a |
5 # BSD-style license that can be found in the LICENSE file. | 5 # BSD-style license that can be found in the LICENSE file. |
6 # | 6 # |
7 | 7 |
8 import optparse | 8 import optparse |
9 import os | 9 import os |
10 import shutil | 10 import shutil |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 def Main(): | 302 def Main(): |
303 utils.ConfigureJava() | 303 utils.ConfigureJava() |
304 # Parse the options. | 304 # Parse the options. |
305 parser = BuildOptions() | 305 parser = BuildOptions() |
306 (options, args) = parser.parse_args() | 306 (options, args) = parser.parse_args() |
307 if not ProcessOptions(options, args): | 307 if not ProcessOptions(options, args): |
308 parser.print_help() | 308 parser.print_help() |
309 return 1 | 309 return 1 |
310 # Determine which targets to build. By default we build the "all" target. | 310 # Determine which targets to build. By default we build the "all" target. |
311 if len(args) == 0: | 311 if len(args) == 0: |
312 if HOST_OS == 'macos': | 312 # Note: The 'default' target doesn't depend on all targets. Developers have |
313 target = 'All' | 313 # requested to exclude certain targets to keep build times down. |
314 else: | 314 target = 'default' |
315 target = 'all' | |
316 else: | 315 else: |
317 target = args[0] | 316 target = args[0] |
318 | 317 |
319 filter_xcodebuild_output = False | 318 filter_xcodebuild_output = False |
320 # Remember path | 319 # Remember path |
321 old_path = os.environ['PATH'] | 320 old_path = os.environ['PATH'] |
322 # Build the targets for each requested configuration. | 321 # Build the targets for each requested configuration. |
323 for target_os in options.os: | 322 for target_os in options.os: |
324 for mode in options.mode: | 323 for mode in options.mode: |
325 for arch in options.arch: | 324 for arch in options.arch: |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 process.wait() | 405 process.wait() |
407 if process.returncode != 0: | 406 if process.returncode != 0: |
408 print "BUILD FAILED" | 407 print "BUILD FAILED" |
409 return 1 | 408 return 1 |
410 | 409 |
411 return 0 | 410 return 0 |
412 | 411 |
413 | 412 |
414 if __name__ == '__main__': | 413 if __name__ == '__main__': |
415 sys.exit(Main()) | 414 sys.exit(Main()) |
OLD | NEW |