OLD | NEW |
(Empty) | |
| 1 #!/usr/bin/python |
| 2 |
| 3 # This script is wrapper for Chromium that adds some support for how GYP |
| 4 # is invoked by Chromium beyond what can be done it the gclient hooks. |
| 5 |
| 6 import glob |
| 7 import os |
| 8 import shlex |
| 9 import sys |
| 10 |
| 11 print 'Updating projects from gyp files...' |
| 12 |
| 13 try: |
| 14 import gyp |
| 15 except ImportError, e: |
| 16 sys.path.append(os.path.join(os.path.dirname(sys.argv[0]), '../tools/gyp/pylib
')) |
| 17 import gyp |
| 18 |
| 19 if __name__ == '__main__': |
| 20 args = sys.argv[1:] |
| 21 |
| 22 # If we didn't get a file, check an env var, and then fall back to |
| 23 # assuming 'src/build/all.gyp' |
| 24 if len(args) == 0: |
| 25 args += shlex.split(os.environ.get('CHROMIUM_GYP_FILE', |
| 26 'src/build/all.gyp')) |
| 27 |
| 28 # Always include gyp_chromium.gypi |
| 29 args += ['-I', os.path.join(os.path.dirname(sys.argv[0]),'common.gypi')] |
| 30 |
| 31 # Optionally add supplemental .gypi files if present. |
| 32 supplements = glob.glob('src/*/supplement.gypi') |
| 33 for supplement in supplements: |
| 34 args += ['-I', supplement] |
| 35 |
| 36 # Off we go... |
| 37 sys.exit(gyp.main(args)) |
OLD | NEW |