| 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 # A script which will be invoked from gyp to create an SDK. | 7 # A script which will be invoked from gyp to create an SDK. |
| 8 # | 8 # |
| 9 # Usage: create_sdk.py sdk_directory | 9 # Usage: create_sdk.py sdk_directory |
| 10 # | 10 # |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 assert filename.endswith('.dart') | 212 assert filename.endswith('.dart') |
| 213 if filename == 'io.dart': | 213 if filename == 'io.dart': |
| 214 continue | 214 continue |
| 215 dest_file.write('#source("runtime/' + filename + '");\n') | 215 dest_file.write('#source("runtime/' + filename + '");\n') |
| 216 dest_file.close() | 216 dest_file.close() |
| 217 | 217 |
| 218 # | 218 # |
| 219 # Create and populate lib/{core, crypto, isolate, json, uri, utf, ...}. | 219 # Create and populate lib/{core, crypto, isolate, json, uri, utf, ...}. |
| 220 # | 220 # |
| 221 | 221 |
| 222 for library in ['_internal', 'compiler', html', 'core', 'coreimpl', | 222 for library in ['_internal', 'compiler', 'html', 'core', 'coreimpl', |
| 223 'crypto', 'isolate', 'json', 'math', 'mirrors', 'uri', 'utf', | 223 'crypto', 'isolate', 'json', 'math', 'mirrors', 'uri', 'utf', |
| 224 'web']: | 224 'web']: |
| 225 copytree(join(HOME, 'lib', library), join(LIB, library), | 225 copytree(join(HOME, 'lib', library), join(LIB, library), |
| 226 ignore=ignore_patterns('*.svn', 'doc', '*.py', '*.gypi', '*.sh')) | 226 ignore=ignore_patterns('*.svn', 'doc', '*.py', '*.gypi', '*.sh')) |
| 227 | 227 |
| 228 # TODO(dgrove): fix this really ugly hack | 228 # TODO(dgrove): fix this really ugly hack |
| 229 ReplaceInFiles( | 229 ReplaceInFiles( |
| 230 [join(LIB, 'compiler', 'implementation', 'lib', 'io.dart')], | 230 [join(LIB, 'compiler', 'implementation', 'lib', 'io.dart')], |
| 231 [('../../runtime/bin', '../io/runtime')]) | 231 [('../../runtime/bin', '../io/runtime')]) |
| 232 | 232 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 if revision is not None: | 289 if revision is not None: |
| 290 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f: | 290 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f: |
| 291 f.write(revision + '\n') | 291 f.write(revision + '\n') |
| 292 f.close() | 292 f.close() |
| 293 | 293 |
| 294 move(SDK_tmp, SDK) | 294 move(SDK_tmp, SDK) |
| 295 utils.Touch(os.path.join(SDK, 'create.stamp')) | 295 utils.Touch(os.path.join(SDK, 'create.stamp')) |
| 296 | 296 |
| 297 if __name__ == '__main__': | 297 if __name__ == '__main__': |
| 298 sys.exit(Main(sys.argv)) | 298 sys.exit(Main(sys.argv)) |
| OLD | NEW |