OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 3 # Copyright (c) 2016, 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 import os | 7 import os |
8 import os.path | 8 import os.path |
9 import shutil | 9 import shutil |
10 import sys | 10 import sys |
11 import subprocess | 11 import subprocess |
12 | 12 |
13 SCRIPT_DIR = os.path.dirname(sys.argv[0]) | 13 SCRIPT_DIR = os.path.dirname(sys.argv[0]) |
14 DART_ROOT = os.path.realpath(os.path.join(SCRIPT_DIR, '..', '..')) | 14 DART_ROOT = os.path.realpath(os.path.join(SCRIPT_DIR, '..', '..')) |
15 | 15 |
16 def main(argv): | 16 def main(argv): |
17 os.environ["DART_USE_GN"] = "1" | 17 os.environ["DART_USE_GN"] = "1" |
18 gclient_result = subprocess.call(['gclient', 'runhooks']) | 18 generate_buildfiles = os.path.join( |
| 19 DART_ROOT, 'tools', 'generate_buildfiles.py') |
| 20 gclient_result = subprocess.call(['python', generate_buildfiles]) |
19 if gclient_result != 0: | 21 if gclient_result != 0: |
20 return gclient_result | 22 return gclient_result |
21 | 23 |
22 build_py = os.path.join(DART_ROOT, 'tools', 'build.py') | 24 build_py = os.path.join(DART_ROOT, 'tools', 'build.py') |
23 build_result = subprocess.call(['python', build_py] + argv[1:]) | 25 build_result = subprocess.call(['python', build_py] + argv[1:]) |
24 if build_result != 0: | 26 if build_result != 0: |
25 return build_result | 27 return build_result |
26 return 0 | 28 return 0 |
27 | 29 |
28 if __name__ == '__main__': | 30 if __name__ == '__main__': |
29 sys.exit(main(sys.argv)) | 31 sys.exit(main(sys.argv)) |
OLD | NEW |