| 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 re | 10 import re |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 | 27 |
| 28 $ wget http://src.chromium.org/chrome/trunk/src/build/install-build-deps.sh | 28 $ wget http://src.chromium.org/chrome/trunk/src/build/install-build-deps.sh |
| 29 OR | 29 OR |
| 30 $ svn co http://src.chromium.org/chrome/trunk/src/build; cd build | 30 $ svn co http://src.chromium.org/chrome/trunk/src/build; cd build |
| 31 Then, | 31 Then, |
| 32 $ chmod u+x install-build-deps.sh | 32 $ chmod u+x install-build-deps.sh |
| 33 $ ./install-build-deps.sh --arm --no-chromeos-fonts | 33 $ ./install-build-deps.sh --arm --no-chromeos-fonts |
| 34 """ | 34 """ |
| 35 DEFAULT_ARM_CROSS_COMPILER_PATH = '/usr/bin' | 35 DEFAULT_ARM_CROSS_COMPILER_PATH = '/usr/bin' |
| 36 | 36 |
| 37 usage = """\ |
| 38 usage: %%prog [options] [targets] |
| 39 |
| 40 This script runs 'make' in the *current* directory. So, run it from |
| 41 the Dart repo root, |
| 42 |
| 43 %s , |
| 44 |
| 45 unless you really intend to use a non-default Makefile.""" % DART_ROOT |
| 37 | 46 |
| 38 def BuildOptions(): | 47 def BuildOptions(): |
| 39 result = optparse.OptionParser() | 48 result = optparse.OptionParser(usage=usage) |
| 40 result.add_option("-m", "--mode", | 49 result.add_option("-m", "--mode", |
| 41 help='Build variants (comma-separated).', | 50 help='Build variants (comma-separated).', |
| 42 metavar='[all,debug,release]', | 51 metavar='[all,debug,release]', |
| 43 default='debug') | 52 default='debug') |
| 44 result.add_option("-v", "--verbose", | 53 result.add_option("-v", "--verbose", |
| 45 help='Verbose output.', | 54 help='Verbose output.', |
| 46 default=False, action="store_true") | 55 default=False, action="store_true") |
| 47 result.add_option("-a", "--arch", | 56 result.add_option("-a", "--arch", |
| 48 help='Target architectures (comma-separated).', | 57 help='Target architectures (comma-separated).', |
| 49 metavar='[all,ia32,x64,simarm,arm,simmips,mips,simarm64,arm64,]', | 58 metavar='[all,ia32,x64,simarm,arm,simmips,mips,simarm64,arm64,]', |
| (...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 539 else: | 548 else: |
| 540 if BuildOneConfig(options, target, target_os, | 549 if BuildOneConfig(options, target, target_os, |
| 541 mode, arch, cross_build) != 0: | 550 mode, arch, cross_build) != 0: |
| 542 return 1 | 551 return 1 |
| 543 | 552 |
| 544 return 0 | 553 return 0 |
| 545 | 554 |
| 546 | 555 |
| 547 if __name__ == '__main__': | 556 if __name__ == '__main__': |
| 548 sys.exit(Main()) | 557 sys.exit(Main()) |
| OLD | NEW |