| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 | 2 |
| 3 # Copyright 2011 The Android Open Source Project | 3 # Copyright 2011 The Android Open Source Project |
| 4 # | 4 # |
| 5 # Use of this source code is governed by a BSD-style license that can be | 5 # Use of this source code is governed by a BSD-style license that can be |
| 6 # found in the LICENSE file. | 6 # found in the LICENSE file. |
| 7 | 7 |
| 8 # This script is a wrapper which invokes gyp with the correct --depth argument, | 8 # This script is a wrapper which invokes gyp with the correct --depth argument, |
| 9 # and supports the automatic regeneration of build files if all.gyp is | 9 # and supports the automatic regeneration of build files if all.gyp is |
| 10 # changed (Linux-only). | 10 # changed (Linux-only). |
| 11 | 11 |
| 12 import glob | 12 import glob |
| 13 import os | 13 import os |
| 14 import platform | 14 import platform |
| 15 import shlex | 15 import shlex |
| 16 import sys | 16 import sys |
| 17 | 17 |
| 18 script_dir = os.path.dirname(__file__) | 18 script_dir = os.path.abspath(os.path.dirname(__file__)) |
| 19 | 19 |
| 20 # Directory within which we can find the gyp source. | 20 # Directory within which we can find the gyp source. |
| 21 gyp_source_dir = os.path.join(script_dir, 'third_party', 'externals', 'gyp') | 21 gyp_source_dir = os.path.join(script_dir, 'third_party', 'externals', 'gyp') |
| 22 | 22 |
| 23 # Directory within which we can find most of Skia's gyp configuration files. | 23 # Directory within which we can find most of Skia's gyp configuration files. |
| 24 gyp_config_dir = os.path.join(script_dir, 'gyp') | 24 gyp_config_dir = os.path.join(script_dir, 'gyp') |
| 25 | 25 |
| 26 # Ensure we import our current gyp source's module, not any version | 26 # Ensure we import our current gyp source's module, not any version |
| 27 # pre-installed in your PYTHONPATH. | 27 # pre-installed in your PYTHONPATH. |
| 28 sys.path.insert(0, os.path.join(gyp_source_dir, 'pylib')) | 28 sys.path.insert(0, os.path.join(gyp_source_dir, 'pylib')) |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 args.extend(['-Goutput_dir=.']) | 126 args.extend(['-Goutput_dir=.']) |
| 127 | 127 |
| 128 # By default, we build 'most' instead of 'all' or 'everything'. See skia.gyp. | 128 # By default, we build 'most' instead of 'all' or 'everything'. See skia.gyp. |
| 129 args.extend(['-Gdefault_target=most']) | 129 args.extend(['-Gdefault_target=most']) |
| 130 | 130 |
| 131 print 'Updating projects from gyp files...' | 131 print 'Updating projects from gyp files...' |
| 132 sys.stdout.flush() | 132 sys.stdout.flush() |
| 133 | 133 |
| 134 # Off we go... | 134 # Off we go... |
| 135 sys.exit(gyp.main(args)) | 135 sys.exit(gyp.main(args)) |
| OLD | NEW |