| 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 # Optionally add supplemental .gypi files if present. | 75 # Optionally add supplemental .gypi files if present. |
| 76 supplements = glob.glob(os.path.join(chrome_src, '*', 'supplement.gypi')) | 76 supplements = glob.glob(os.path.join(chrome_src, '*', 'supplement.gypi')) |
| 77 for supplement in supplements: | 77 for supplement in supplements: |
| 78 AddInclude(supplement) | 78 AddInclude(supplement) |
| 79 | 79 |
| 80 return result | 80 return result |
| 81 | 81 |
| 82 if __name__ == '__main__': | 82 if __name__ == '__main__': |
| 83 args = sys.argv[1:] | 83 args = sys.argv[1:] |
| 84 | 84 |
| 85 if int(os.environ.get('GYP_CHROMIUM_NO_ACTION', 0)): |
| 86 print 'Skipping gyp_chromium due to GYP_CHROMIUM_NO_ACTION env var.' |
| 87 sys.exit(0) |
| 88 |
| 85 # Use the Psyco JIT if available. | 89 # Use the Psyco JIT if available. |
| 86 if psyco: | 90 if psyco: |
| 87 psyco.profile() | 91 psyco.profile() |
| 88 print "Enabled Psyco JIT." | 92 print "Enabled Psyco JIT." |
| 89 | 93 |
| 90 # Fall back on hermetic python if we happen to get run under cygwin. | 94 # Fall back on hermetic python if we happen to get run under cygwin. |
| 91 # TODO(bradnelson): take this out once this issue is fixed: | 95 # TODO(bradnelson): take this out once this issue is fixed: |
| 92 # http://code.google.com/p/gyp/issues/detail?id=177 | 96 # http://code.google.com/p/gyp/issues/detail?id=177 |
| 93 if sys.platform == 'cygwin': | 97 if sys.platform == 'cygwin': |
| 94 python_dir = os.path.join(chrome_src, 'third_party', 'python_26') | 98 python_dir = os.path.join(chrome_src, 'third_party', 'python_26') |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 # to enfore syntax checking. | 154 # to enfore syntax checking. |
| 151 syntax_check = os.environ.get('CHROMIUM_GYP_SYNTAX_CHECK') | 155 syntax_check = os.environ.get('CHROMIUM_GYP_SYNTAX_CHECK') |
| 152 if syntax_check and int(syntax_check): | 156 if syntax_check and int(syntax_check): |
| 153 args.append('--check') | 157 args.append('--check') |
| 154 | 158 |
| 155 print 'Updating projects from gyp files...' | 159 print 'Updating projects from gyp files...' |
| 156 sys.stdout.flush() | 160 sys.stdout.flush() |
| 157 | 161 |
| 158 # Off we go... | 162 # Off we go... |
| 159 sys.exit(gyp.main(args)) | 163 sys.exit(gyp.main(args)) |
| OLD | NEW |