| OLD | NEW |
| (Empty) |
| 1 #!/usr/bin/env python | |
| 2 | |
| 3 # Copyright (c) 2012 The Dart Authors. All rights reserved. | |
| 4 # Use of this source code is governed by a BSD-style license that can be | |
| 5 # found in the LICENSE file. | |
| 6 | |
| 7 """ | |
| 8 Invoke gyp to generate build files for building the Dart VM. | |
| 9 """ | |
| 10 | |
| 11 import os | |
| 12 import subprocess | |
| 13 import sys | |
| 14 | |
| 15 SCRIPT_DIR = os.path.dirname(sys.argv[0]) | |
| 16 DART_ROOT = os.path.realpath(os.path.join(SCRIPT_DIR, '..')) | |
| 17 | |
| 18 def execute(args): | |
| 19 process = subprocess.Popen(args, cwd=DART_ROOT) | |
| 20 process.wait() | |
| 21 return process.returncode | |
| 22 | |
| 23 def main(): | |
| 24 component = 'all' | |
| 25 if len(sys.argv) == 2: | |
| 26 component = sys.argv[1] | |
| 27 | |
| 28 component_gyp_files = { | |
| 29 'all' : 'dart.gyp', | |
| 30 'runtime' : 'runtime/dart-runtime.gyp', | |
| 31 } | |
| 32 args = ['python', '-S', 'third_party/gyp/gyp_main.py', | |
| 33 '--depth=.', '-Itools/gyp/all.gypi', | |
| 34 component_gyp_files[component]] | |
| 35 | |
| 36 sys.exit(execute(args)) | |
| 37 | |
| 38 if __name__ == '__main__': | |
| 39 main() | |
| OLD | NEW |