| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # | 2 # |
| 3 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 3 # Copyright (c) 2011, 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 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 # construct lib/core_runtime.dart from whole cloth. | 343 # construct lib/core_runtime.dart from whole cloth. |
| 344 dest_file = open(join(corelib_dest_dir, 'core_runtime.dart'), 'w') | 344 dest_file = open(join(corelib_dest_dir, 'core_runtime.dart'), 'w') |
| 345 dest_file.write('#library("dart:core");\n') | 345 dest_file.write('#library("dart:core");\n') |
| 346 dest_file.write('#import("dart:coreimpl");\n') | 346 dest_file.write('#import("dart:coreimpl");\n') |
| 347 for filename in corelib_sources: | 347 for filename in corelib_sources: |
| 348 dest_file.write('#source("runtime/' + filename + '");\n') | 348 dest_file.write('#source("runtime/' + filename + '");\n') |
| 349 for filename in corelib_runtime_sources: | 349 for filename in corelib_runtime_sources: |
| 350 if filename.endswith('.dart'): | 350 if filename.endswith('.dart'): |
| 351 dest_file.write('#source("runtime/' + filename + '");\n') | 351 dest_file.write('#source("runtime/' + filename + '");\n') |
| 352 # include the missing print function | 352 # include the missing print function |
| 353 dest_file.write('void print(String arg) { /* native */ }\n') | 353 dest_file.write('void print(Object arg) { /* native */ }\n') |
| 354 dest_file.close() | 354 dest_file.close() |
| 355 | 355 |
| 356 # | 356 # |
| 357 # Create and populate lib/coreimpl. | 357 # Create and populate lib/coreimpl. |
| 358 # | 358 # |
| 359 | 359 |
| 360 # First, copy corelib/src/implementation to corelib/{frog, runtime}. | 360 # First, copy corelib/src/implementation to corelib/{frog, runtime}. |
| 361 for filename in coreimpl_sources: | 361 for filename in coreimpl_sources: |
| 362 for target_dir in ['frog', 'runtime']: | 362 for target_dir in ['frog', 'runtime']: |
| 363 copyfile(join('corelib', 'src', 'implementation', filename), | 363 copyfile(join('corelib', 'src', 'implementation', filename), |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 | 395 |
| 396 # Create and copy tools. | 396 # Create and copy tools. |
| 397 | 397 |
| 398 UTIL = join(SDK_tmp, 'util') | 398 UTIL = join(SDK_tmp, 'util') |
| 399 os.makedirs(UTIL) | 399 os.makedirs(UTIL) |
| 400 | 400 |
| 401 move(SDK_tmp, SDK) | 401 move(SDK_tmp, SDK) |
| 402 | 402 |
| 403 if __name__ == '__main__': | 403 if __name__ == '__main__': |
| 404 sys.exit(Main(sys.argv)) | 404 sys.exit(Main(sys.argv)) |
| OLD | NEW |