| 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). |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 # be written. | 55 # be written. |
| 56 def get_output_dir(): | 56 def get_output_dir(): |
| 57 | 57 |
| 58 # SKIA_OUT can be any directory either as a child of the standard out/ | 58 # SKIA_OUT can be any directory either as a child of the standard out/ |
| 59 # directory or any given location on the file system (e.g. /tmp/skia) | 59 # directory or any given location on the file system (e.g. /tmp/skia) |
| 60 output_dir = os.getenv('SKIA_OUT') | 60 output_dir = os.getenv('SKIA_OUT') |
| 61 | 61 |
| 62 if not output_dir: | 62 if not output_dir: |
| 63 return os.path.join(os.path.abspath(script_dir), 'out') | 63 return os.path.join(os.path.abspath(script_dir), 'out') |
| 64 | 64 |
| 65 if (os.name != 'posix' or | 65 if (sys.platform.startswith('darwin') and |
| 66 (sys.platform.startswith('darwin') and | |
| 67 (not os.getenv('GYP_GENERATORS') or | 66 (not os.getenv('GYP_GENERATORS') or |
| 68 'make' not in os.getenv('GYP_GENERATORS')))): | 67 'make' not in os.getenv('GYP_GENERATORS'))): |
| 69 print 'ERROR: variable SKIA_OUT is not valid on Mac (using xcodebuild)' \ | 68 print 'ERROR: variable SKIA_OUT is not valid on Mac (using xcodebuild)' |
| 70 ' or Windows' | |
| 71 sys.exit(-1); | 69 sys.exit(-1); |
| 72 | 70 |
| 73 if os.path.isabs(output_dir): | 71 if os.path.isabs(output_dir): |
| 74 return output_dir | 72 return output_dir |
| 75 else: | 73 else: |
| 76 return os.path.join(os.path.abspath(script_dir), output_dir) | 74 return os.path.join(os.path.abspath(script_dir), output_dir) |
| 77 | 75 |
| 78 | 76 |
| 79 if __name__ == '__main__': | 77 if __name__ == '__main__': |
| 80 args = sys.argv[1:] | 78 args = sys.argv[1:] |
| (...skipping 30 matching lines...) Expand all Loading... |
| 111 args.extend(['-Goutput_dir=.']) | 109 args.extend(['-Goutput_dir=.']) |
| 112 | 110 |
| 113 # By default, we build 'most' instead of 'all' or 'everything'. See skia.gyp. | 111 # By default, we build 'most' instead of 'all' or 'everything'. See skia.gyp. |
| 114 args.extend(['-Gdefault_target=most']) | 112 args.extend(['-Gdefault_target=most']) |
| 115 | 113 |
| 116 print 'Updating projects from gyp files...' | 114 print 'Updating projects from gyp files...' |
| 117 sys.stdout.flush() | 115 sys.stdout.flush() |
| 118 | 116 |
| 119 # Off we go... | 117 # Off we go... |
| 120 sys.exit(gyp.main(args)) | 118 sys.exit(gyp.main(args)) |
| OLD | NEW |