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 |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
139 | 139 |
140 return result | 140 return result |
141 | 141 |
142 | 142 |
143 def RunGN(supplemental_includes): | 143 def RunGN(supplemental_includes): |
144 """Runs GN, returning True if it succeeded, printing an error and returning | 144 """Runs GN, returning True if it succeeded, printing an error and returning |
145 false if not.""" | 145 false if not.""" |
146 | 146 |
147 # The binaries in platform-specific subdirectories in src/tools/gn/bin. | 147 # The binaries in platform-specific subdirectories in src/tools/gn/bin. |
148 gnpath = SRC_DIR + '/tools/gn/bin/' | 148 gnpath = SRC_DIR + '/tools/gn/bin/' |
149 if sys.platform == 'win32': | 149 if sys.platform in [ 'win32', 'cygwin' ]: |
M-A Ruel
2013/12/05 14:38:31
if sys.platform in ('cygwin', 'win32'):
| |
150 gnpath += 'win/gn.exe' | 150 gnpath += 'win/gn.exe' |
151 elif sys.platform.startswith('linux'): | 151 elif sys.platform.startswith('linux'): |
152 # On Linux we have 32-bit and 64-bit versions. | 152 # On Linux we have 32-bit and 64-bit versions. |
153 if subprocess.check_output(["getconf", "LONG_BIT"]).find("64") >= 0: | 153 if subprocess.check_output(["getconf", "LONG_BIT"]).find("64") >= 0: |
154 gnpath += 'linux/gn' | 154 gnpath += 'linux/gn' |
155 else: | 155 else: |
156 gnpath += 'linux/gn32' | 156 gnpath += 'linux/gn32' |
157 elif sys.platform == 'darwin': | 157 elif sys.platform == 'darwin': |
158 gnpath += 'mac/gn' | 158 gnpath += 'mac/gn' |
159 else: | 159 else: |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
282 # to enfore syntax checking. | 282 # to enfore syntax checking. |
283 syntax_check = os.environ.get('CHROMIUM_GYP_SYNTAX_CHECK') | 283 syntax_check = os.environ.get('CHROMIUM_GYP_SYNTAX_CHECK') |
284 if syntax_check and int(syntax_check): | 284 if syntax_check and int(syntax_check): |
285 args.append('--check') | 285 args.append('--check') |
286 | 286 |
287 print 'Updating projects from gyp files...' | 287 print 'Updating projects from gyp files...' |
288 sys.stdout.flush() | 288 sys.stdout.flush() |
289 | 289 |
290 # Off we go... | 290 # Off we go... |
291 sys.exit(gyp.main(args)) | 291 sys.exit(gyp.main(args)) |
OLD | NEW |