| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 | 2 |
| 3 # Copyright (c) 2009 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2009 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 os | 11 import os |
| 12 import shlex | 12 import shlex |
| 13 import sys | 13 import sys |
| 14 | 14 |
| 15 script_dir = os.path.dirname(__file__) | 15 script_dir = os.path.dirname(__file__) |
| 16 chrome_src = os.path.normpath(os.path.join(script_dir, os.pardir)) | 16 chrome_src = os.path.normpath(os.path.join(script_dir, os.pardir)) |
| 17 | 17 |
| 18 sys.path.append(os.path.join(chrome_src, 'tools', 'gyp', 'pylib')) | 18 sys.path.insert(0, os.path.join(chrome_src, 'tools', 'gyp', 'pylib')) |
| 19 import gyp | 19 import gyp |
| 20 | 20 |
| 21 def additional_include_files(args=[]): | 21 def additional_include_files(args=[]): |
| 22 """ | 22 """ |
| 23 Returns a list of additional (.gypi) files to include, without | 23 Returns a list of additional (.gypi) files to include, without |
| 24 duplicating ones that are already specified on the command line. | 24 duplicating ones that are already specified on the command line. |
| 25 """ | 25 """ |
| 26 # Determine the include files specified on the command line. | 26 # Determine the include files specified on the command line. |
| 27 # This doesn't cover all the different option formats you can use, | 27 # This doesn't cover all the different option formats you can use, |
| 28 # but it's mainly intended to avoid duplicating flags on the automatic | 28 # but it's mainly intended to avoid duplicating flags on the automatic |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 # to enfore syntax checking. | 88 # to enfore syntax checking. |
| 89 syntax_check = os.environ.get('CHROMIUM_GYP_SYNTAX_CHECK') | 89 syntax_check = os.environ.get('CHROMIUM_GYP_SYNTAX_CHECK') |
| 90 if syntax_check and int(syntax_check): | 90 if syntax_check and int(syntax_check): |
| 91 args.append('--check') | 91 args.append('--check') |
| 92 | 92 |
| 93 print 'Updating projects from gyp files...' | 93 print 'Updating projects from gyp files...' |
| 94 sys.stdout.flush() | 94 sys.stdout.flush() |
| 95 | 95 |
| 96 # Off we go... | 96 # Off we go... |
| 97 sys.exit(gyp.main(args)) | 97 sys.exit(gyp.main(args)) |
| OLD | NEW |