| OLD | NEW |
| 1 # Copyright (c) 2011, 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 os | 9 import os |
| 10 import platform | 10 import platform |
| 11 import re | 11 import re |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 | 111 |
| 112 # Mapping table between build mode and build configuration. | 112 # Mapping table between build mode and build configuration. |
| 113 BUILD_MODES = { | 113 BUILD_MODES = { |
| 114 'debug': 'Debug', | 114 'debug': 'Debug', |
| 115 'release': 'Release', | 115 'release': 'Release', |
| 116 } | 116 } |
| 117 | 117 |
| 118 | 118 |
| 119 # Mapping table between OS and build output location. | 119 # Mapping table between OS and build output location. |
| 120 BUILD_ROOT = { | 120 BUILD_ROOT = { |
| 121 'win32': os.path.join(''), | 121 'win32': os.path.join('build'), |
| 122 'linux': os.path.join('out'), | 122 'linux': os.path.join('out'), |
| 123 'freebsd': os.path.join('out'), | 123 'freebsd': os.path.join('out'), |
| 124 'macos': os.path.join('xcodebuild'), | 124 'macos': os.path.join('xcodebuild'), |
| 125 } | 125 } |
| 126 | 126 |
| 127 def GetBuildMode(mode): | 127 def GetBuildMode(mode): |
| 128 global BUILD_MODES | 128 global BUILD_MODES |
| 129 return BUILD_MODES[mode] | 129 return BUILD_MODES[mode] |
| 130 | 130 |
| 131 | 131 |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 | 293 |
| 294 | 294 |
| 295 def Touch(name): | 295 def Touch(name): |
| 296 with file(name, 'a'): | 296 with file(name, 'a'): |
| 297 os.utime(name, None) | 297 os.utime(name, None) |
| 298 | 298 |
| 299 | 299 |
| 300 if __name__ == "__main__": | 300 if __name__ == "__main__": |
| 301 import sys | 301 import sys |
| 302 Main(sys.argv) | 302 Main(sys.argv) |
| OLD | NEW |