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 |
(...skipping 19 matching lines...) Expand all Loading... |
30 specified_includes = set() | 30 specified_includes = set() |
31 for arg in args: | 31 for arg in args: |
32 if arg.startswith('-I') and len(arg) > 2: | 32 if arg.startswith('-I') and len(arg) > 2: |
33 specified_includes.add(os.path.realpath(arg[2:])) | 33 specified_includes.add(os.path.realpath(arg[2:])) |
34 | 34 |
35 result = [] | 35 result = [] |
36 def AddInclude(path): | 36 def AddInclude(path): |
37 if os.path.realpath(path) not in specified_includes: | 37 if os.path.realpath(path) not in specified_includes: |
38 result.append(path) | 38 result.append(path) |
39 | 39 |
40 # Always include common.gypi | 40 # Always include common.gypi & features_override.gypi |
41 AddInclude(os.path.join(script_dir, 'common.gypi')) | 41 AddInclude(os.path.join(script_dir, 'common.gypi')) |
| 42 AddInclude(os.path.join(script_dir, 'features_override.gypi')) |
42 | 43 |
43 # Optionally add supplemental .gypi files if present. | 44 # Optionally add supplemental .gypi files if present. |
44 supplements = glob.glob(os.path.join(chrome_src, '*', 'supplement.gypi')) | 45 supplements = glob.glob(os.path.join(chrome_src, '*', 'supplement.gypi')) |
45 for supplement in supplements: | 46 for supplement in supplements: |
46 AddInclude(supplement) | 47 AddInclude(supplement) |
47 | 48 |
48 return result | 49 return result |
49 | 50 |
50 if __name__ == '__main__': | 51 if __name__ == '__main__': |
51 args = sys.argv[1:] | 52 args = sys.argv[1:] |
(...skipping 17 matching lines...) Expand all Loading... |
69 else: | 70 else: |
70 args.append(os.path.join(script_dir, 'all.gyp')) | 71 args.append(os.path.join(script_dir, 'all.gyp')) |
71 | 72 |
72 args.extend(['-I' + i for i in additional_include_files(args)]) | 73 args.extend(['-I' + i for i in additional_include_files(args)]) |
73 | 74 |
74 print 'Updating projects from gyp files...' | 75 print 'Updating projects from gyp files...' |
75 sys.stdout.flush() | 76 sys.stdout.flush() |
76 | 77 |
77 # Off we go... | 78 # Off we go... |
78 sys.exit(gyp.main(args)) | 79 sys.exit(gyp.main(args)) |
OLD | NEW |