OLD | NEW |
(Empty) | |
| 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 3 # for details. All rights reserved. Use of this source code is governed by a |
| 4 # BSD-style license that can be found in the LICENSE file. |
| 5 |
| 6 import os |
| 7 import sys |
| 8 |
| 9 |
| 10 def Main(): |
| 11 def normjoin(*args): |
| 12 return os.path.normpath(os.path.join(*args)) |
| 13 |
| 14 dart_dir = normjoin(__file__, '..', '..', '..') |
| 15 compiler_scripts = normjoin(dart_dir, 'tools', 'compiler_scripts') |
| 16 editor = normjoin(dart_dir, 'editor') |
| 17 |
| 18 locations = { |
| 19 'compiler_scripts': compiler_scripts, |
| 20 'editor': editor, |
| 21 } |
| 22 |
| 23 generate_source_list_calls = [ |
| 24 # The paths are relative to dart/editor/ |
| 25 { |
| 26 "name" : "plugin_engine_java", |
| 27 "output" : "%(editor)s/plugin_engine_sources" % locations, |
| 28 "path" : "tools/plugins/com.google.dart.engine", |
| 29 }, |
| 30 { |
| 31 "name" : "plugin_command_analyze_java", |
| 32 "output" : "%(editor)s/plugin_command_analyze_sources" % locations, |
| 33 "path" : "tools/plugins/com.google.dart.command.analyze", |
| 34 }, |
| 35 ] |
| 36 |
| 37 for call_options in generate_source_list_calls: |
| 38 command = (("python %(compiler_scripts)s/generate_source_list.py " |
| 39 % locations) + |
| 40 ("%(name)s %(output)s %(path)s" % call_options)) |
| 41 exit_code = os.system(command) |
| 42 if exit_code: |
| 43 return exit_code |
| 44 |
| 45 if '--no-gyp' in sys.argv: |
| 46 print '--no-gyp is deprecated.' |
| 47 |
| 48 return 0 |
| 49 |
| 50 |
| 51 if __name__ == '__main__': |
| 52 sys.exit(Main()) |
OLD | NEW |