OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 | 2 |
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 # This script is wrapper for Chromium that adds some support for how GYP | 7 # This script is wrapper for Chromium that adds some support for how GYP |
8 # is invoked by Chromium beyond what can be done in the gclient hooks. | 8 # is invoked by Chromium beyond what can be done in the gclient hooks. |
9 | 9 |
10 import glob | 10 import glob |
11 import gyp_helper | 11 import gyp_helper |
12 import os | 12 import os |
13 import shlex | 13 import shlex |
14 import subprocess | 14 import subprocess |
15 import sys | 15 import sys |
16 | 16 |
17 script_dir = os.path.dirname(os.path.realpath(__file__)) | 17 script_dir = os.path.dirname(os.path.realpath(__file__)) |
18 chrome_src = os.path.abspath(os.path.join(script_dir, os.pardir)) | 18 chrome_src = os.path.abspath(os.path.join(script_dir, os.pardir)) |
19 | 19 |
20 sys.path.insert(0, os.path.join(chrome_src, 'tools', 'gyp', 'pylib')) | 20 sys.path.insert(0, os.path.join(chrome_src, 'tools', 'gyp', 'pylib')) |
21 import gyp | 21 import gyp |
22 | 22 |
23 # Add paths so that pymod_do_main(...) can import files. | 23 # Add paths so that pymod_do_main(...) can import files. |
24 sys.path.insert(1, os.path.join(chrome_src, 'tools', 'generate_shim_headers')) | 24 sys.path.insert(1, os.path.join(chrome_src, 'tools', 'generate_shim_headers')) |
25 sys.path.insert(1, os.path.join(chrome_src, 'tools', 'grit')) | 25 sys.path.insert(1, os.path.join(chrome_src, 'tools', 'grit')) |
26 sys.path.insert(1, os.path.join(chrome_src, 'chrome', 'tools', 'build')) | 26 sys.path.insert(1, os.path.join(chrome_src, 'chrome', 'tools', 'build')) |
27 sys.path.insert(1, os.path.join(chrome_src, 'native_client', 'build')) | 27 sys.path.insert(1, os.path.join(chrome_src, 'native_client', 'build')) |
| 28 sys.path.insert(1, os.path.join(chrome_src, 'remoting', 'tools', 'build')) |
28 sys.path.insert(1, os.path.join(chrome_src, 'third_party', 'WebKit', | 29 sys.path.insert(1, os.path.join(chrome_src, 'third_party', 'WebKit', |
29 'Source', 'core', 'scripts')) | 30 'Source', 'core', 'scripts')) |
30 # TODO(adamk): Remove this line once core.gyp is no longer a directory | 31 # TODO(adamk): Remove this line once core.gyp is no longer a directory |
31 sys.path.insert(1, os.path.join(chrome_src, 'third_party', 'WebKit', | 32 sys.path.insert(1, os.path.join(chrome_src, 'third_party', 'WebKit', |
32 'Source', 'core', 'core.gyp', 'scripts')) | 33 'Source', 'core', 'core.gyp', 'scripts')) |
33 | 34 |
34 | 35 |
35 # On Windows, Psyco shortens warm runs of build/gyp_chromium by about | 36 # On Windows, Psyco shortens warm runs of build/gyp_chromium by about |
36 # 20 seconds on a z600 machine with 12 GB of RAM, from 90 down to 70 | 37 # 20 seconds on a z600 machine with 12 GB of RAM, from 90 down to 70 |
37 # seconds. Conversely, memory usage of build/gyp_chromium with Psyco | 38 # seconds. Conversely, memory usage of build/gyp_chromium with Psyco |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 # to enfore syntax checking. | 148 # to enfore syntax checking. |
148 syntax_check = os.environ.get('CHROMIUM_GYP_SYNTAX_CHECK') | 149 syntax_check = os.environ.get('CHROMIUM_GYP_SYNTAX_CHECK') |
149 if syntax_check and int(syntax_check): | 150 if syntax_check and int(syntax_check): |
150 args.append('--check') | 151 args.append('--check') |
151 | 152 |
152 print 'Updating projects from gyp files...' | 153 print 'Updating projects from gyp files...' |
153 sys.stdout.flush() | 154 sys.stdout.flush() |
154 | 155 |
155 # Off we go... | 156 # Off we go... |
156 sys.exit(gyp.main(args)) | 157 sys.exit(gyp.main(args)) |
OLD | NEW |