| 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 ('buildtype', 'Official', 'is_official_build=true'), | 122 ('buildtype', 'Official', 'is_official_build=true'), |
| 123 ('component', 'shared_library', 'is_component_build=true'), | 123 ('component', 'shared_library', 'is_component_build=true'), |
| 124 ] | 124 ] |
| 125 for i in remap_cases: | 125 for i in remap_cases: |
| 126 if i[0] in vars_dict and vars_dict[i[0]] == i[1]: | 126 if i[0] in vars_dict and vars_dict[i[0]] == i[1]: |
| 127 gn_args += ' ' + i[2] | 127 gn_args += ' ' + i[2] |
| 128 | 128 |
| 129 # These string arguments get passed directly. | 129 # These string arguments get passed directly. |
| 130 for v in ['windows_sdk_path']: | 130 for v in ['windows_sdk_path']: |
| 131 if v in vars_dict: | 131 if v in vars_dict: |
| 132 gn_args += ' ' + v + '="' + EscapeStringForGN(vars_dict[v]) + '"' | 132 gn_args += ' ' + v + '=' + EscapeStringForGN(vars_dict[v]) |
| 133 | 133 |
| 134 # Set the GYP flag so BUILD files know they're being invoked in GYP mode. | 134 # Set the GYP flag so BUILD files know they're being invoked in GYP mode. |
| 135 gn_args += ' is_gyp=true' | 135 gn_args += ' is_gyp=true' |
| 136 return gn_args.strip() | 136 return gn_args.strip() |
| 137 | 137 |
| 138 | 138 |
| 139 def additional_include_files(supplemental_files, args=[]): | 139 def additional_include_files(supplemental_files, args=[]): |
| 140 """ | 140 """ |
| 141 Returns a list of additional (.gypi) files to include, without duplicating | 141 Returns a list of additional (.gypi) files to include, without duplicating |
| 142 ones that are already specified on the command line. The list of supplemental | 142 ones that are already specified on the command line. The list of supplemental |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 # to enfore syntax checking. | 312 # to enfore syntax checking. |
| 313 syntax_check = os.environ.get('CHROMIUM_GYP_SYNTAX_CHECK') | 313 syntax_check = os.environ.get('CHROMIUM_GYP_SYNTAX_CHECK') |
| 314 if syntax_check and int(syntax_check): | 314 if syntax_check and int(syntax_check): |
| 315 args.append('--check') | 315 args.append('--check') |
| 316 | 316 |
| 317 print 'Updating projects from gyp files...' | 317 print 'Updating projects from gyp files...' |
| 318 sys.stdout.flush() | 318 sys.stdout.flush() |
| 319 | 319 |
| 320 # Off we go... | 320 # Off we go... |
| 321 sys.exit(gyp.main(args)) | 321 sys.exit(gyp.main(args)) |
| OLD | NEW |