| 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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 dom_dest_dir = join(LIB, 'dom') | 327 dom_dest_dir = join(LIB, 'dom') |
| 328 os.makedirs(dom_dest_dir) | 328 os.makedirs(dom_dest_dir) |
| 329 | 329 |
| 330 copyfile(join(dom_src_dir, 'dart2js', 'dom_dart2js.dart'), | 330 copyfile(join(dom_src_dir, 'dart2js', 'dom_dart2js.dart'), |
| 331 join(dom_dest_dir, 'dom_dart2js.dart')) | 331 join(dom_dest_dir, 'dom_dart2js.dart')) |
| 332 | 332 |
| 333 # | 333 # |
| 334 # Create and populate lib/{crypto, json, uri, utf, ...}. | 334 # Create and populate lib/{crypto, json, uri, utf, ...}. |
| 335 # | 335 # |
| 336 | 336 |
| 337 for library in ['crypto', 'json', 'math', 'uri', 'utf', 'web']: | 337 for library in ['_internal', 'crypto', 'json', 'math', 'uri', 'utf', 'web']: |
| 338 src_dir = join(HOME, 'lib', library) | 338 src_dir = join(HOME, 'lib', library) |
| 339 dest_dir = join(LIB, library) | 339 dest_dir = join(LIB, library) |
| 340 os.makedirs(dest_dir) | 340 os.makedirs(dest_dir) |
| 341 | 341 |
| 342 for filename in os.listdir(src_dir): | 342 for filename in os.listdir(src_dir): |
| 343 if filename.endswith('.dart'): | 343 if filename.endswith('.dart'): |
| 344 copyfile(join(src_dir, filename), join(dest_dir, filename)) | 344 copyfile(join(src_dir, filename), join(dest_dir, filename)) |
| 345 | 345 |
| 346 # Create and populate lib/isolate | 346 # Create and populate lib/isolate |
| 347 copytree(join(HOME, 'lib', 'isolate'), join(LIB, 'isolate'), | 347 copytree(join(HOME, 'lib', 'isolate'), join(LIB, 'isolate'), |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 483 if revision is not None: | 483 if revision is not None: |
| 484 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f: | 484 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f: |
| 485 f.write(revision + '\n') | 485 f.write(revision + '\n') |
| 486 f.close() | 486 f.close() |
| 487 | 487 |
| 488 move(SDK_tmp, SDK) | 488 move(SDK_tmp, SDK) |
| 489 utils.Touch(os.path.join(SDK, 'create.stamp')) | 489 utils.Touch(os.path.join(SDK, 'create.stamp')) |
| 490 | 490 |
| 491 if __name__ == '__main__': | 491 if __name__ == '__main__': |
| 492 sys.exit(Main(sys.argv)) | 492 sys.exit(Main(sys.argv)) |
| OLD | NEW |