| OLD | NEW |
| 1 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 # for details. All rights reserved. Use of this source code is governed by a | 2 # for details. All rights reserved. Use of this source code is governed by a |
| 3 # BSD-style license that can be found in the LICENSE file. | 3 # BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 # This file contains a set of utilities functions used by other Python-based | 5 # This file contains a set of utilities functions used by other Python-based |
| 6 # scripts. | 6 # scripts. |
| 7 | 7 |
| 8 import commands | 8 import commands |
| 9 import datetime | 9 import datetime |
| 10 import json | 10 import json |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 value.append(arg) | 208 value.append(arg) |
| 209 | 209 |
| 210 del parser.rargs[:len(value)] | 210 del parser.rargs[:len(value)] |
| 211 setattr(parser.values, option.dest, value) | 211 setattr(parser.values, option.dest, value) |
| 212 | 212 |
| 213 | 213 |
| 214 # Mapping table between build mode and build configuration. | 214 # Mapping table between build mode and build configuration. |
| 215 BUILD_MODES = { | 215 BUILD_MODES = { |
| 216 'debug': 'Debug', | 216 'debug': 'Debug', |
| 217 'release': 'Release', | 217 'release': 'Release', |
| 218 'product': 'Product', |
| 218 } | 219 } |
| 219 | 220 |
| 220 | 221 |
| 221 # Mapping table between OS and build output location. | 222 # Mapping table between OS and build output location. |
| 222 BUILD_ROOT = { | 223 BUILD_ROOT = { |
| 223 'win32': os.path.join('build'), | 224 'win32': os.path.join('build'), |
| 224 'linux': os.path.join('out'), | 225 'linux': os.path.join('out'), |
| 225 'freebsd': os.path.join('out'), | 226 'freebsd': os.path.join('out'), |
| 226 'macos': os.path.join('xcodebuild'), | 227 'macos': os.path.join('xcodebuild'), |
| 227 } | 228 } |
| (...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 673 os.chdir(self._working_directory) | 674 os.chdir(self._working_directory) |
| 674 | 675 |
| 675 def __exit__(self, *_): | 676 def __exit__(self, *_): |
| 676 print "Enter directory = ", self._old_cwd | 677 print "Enter directory = ", self._old_cwd |
| 677 os.chdir(self._old_cwd) | 678 os.chdir(self._old_cwd) |
| 678 | 679 |
| 679 | 680 |
| 680 if __name__ == "__main__": | 681 if __name__ == "__main__": |
| 681 import sys | 682 import sys |
| 682 Main() | 683 Main() |
| OLD | NEW |