| 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  128   # currently exist.  The check for circular dependencies is currently |  128   # currently exist.  The check for circular dependencies is currently | 
|  129   # bypassed on other platforms, but is left enabled on the Mac, where a |  129   # bypassed on other platforms, but is left enabled on the Mac, where a | 
|  130   # violation of the rule causes Xcode to misbehave badly. |  130   # violation of the rule causes Xcode to misbehave badly. | 
|  131   # TODO(mark): Find and kill remaining circular dependencies, and remove this |  131   # TODO(mark): Find and kill remaining circular dependencies, and remove this | 
|  132   # option.  http://crbug.com/35878. |  132   # option.  http://crbug.com/35878. | 
|  133   # TODO(tc): Fix circular dependencies in ChromiumOS then add linux2 to the |  133   # TODO(tc): Fix circular dependencies in ChromiumOS then add linux2 to the | 
|  134   # list. |  134   # list. | 
|  135   if sys.platform not in ('darwin',): |  135   if sys.platform not in ('darwin',): | 
|  136     args.append('--no-circular-check') |  136     args.append('--no-circular-check') | 
|  137  |  137  | 
 |  138   # Default to ninja on linux, but only if no generator has explicitly been set. | 
 |  139   # . -f / --format has precedence over the env var, no need to check for it | 
 |  140   # . set the env var only if it hasn't been set yet | 
 |  141   # . chromium.gyp_env has been applied to os.environ at this point already | 
 |  142   if sys.platform.startswith('linux') and not os.environ.get('GYP_GENERATORS'): | 
 |  143     os.environ['GYP_GENERATORS'] = 'ninja' | 
 |  144  | 
|  138   # If CHROMIUM_GYP_SYNTAX_CHECK is set to 1, it will invoke gyp with --check |  145   # If CHROMIUM_GYP_SYNTAX_CHECK is set to 1, it will invoke gyp with --check | 
|  139   # to enfore syntax checking. |  146   # to enfore syntax checking. | 
|  140   syntax_check = os.environ.get('CHROMIUM_GYP_SYNTAX_CHECK') |  147   syntax_check = os.environ.get('CHROMIUM_GYP_SYNTAX_CHECK') | 
|  141   if syntax_check and int(syntax_check): |  148   if syntax_check and int(syntax_check): | 
|  142     args.append('--check') |  149     args.append('--check') | 
|  143  |  150  | 
|  144   print 'Updating projects from gyp files...' |  151   print 'Updating projects from gyp files...' | 
|  145   sys.stdout.flush() |  152   sys.stdout.flush() | 
|  146  |  153  | 
|  147   # Off we go... |  154   # Off we go... | 
|  148   sys.exit(gyp.main(args)) |  155   sys.exit(gyp.main(args)) | 
| OLD | NEW |