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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
61 | 61 |
62 # Return the directory where all the build files are to be written. | 62 # Return the directory where all the build files are to be written. |
63 def get_output_dir(): | 63 def get_output_dir(): |
64 # SKIA_OUT can be any directory either as a child of the standard out/ | 64 # SKIA_OUT can be any directory either as a child of the standard out/ |
65 # directory or any given location on the file system (e.g. /tmp/skia) | 65 # directory or any given location on the file system (e.g. /tmp/skia) |
66 output_dir = os.getenv('SKIA_OUT') | 66 output_dir = os.getenv('SKIA_OUT') |
67 | 67 |
68 if not output_dir: | 68 if not output_dir: |
69 return os.path.join(os.path.abspath(script_dir), 'out') | 69 return os.path.join(os.path.abspath(script_dir), 'out') |
70 | 70 |
71 if (sys.platform.startswith('darwin') and | |
72 (not os.getenv(ENVVAR_GYP_GENERATORS) or | |
73 'xcode' in os.getenv(ENVVAR_GYP_GENERATORS))): | |
74 print 'ERROR: variable SKIA_OUT is not valid on Mac (using xcodebuild)' | |
borenet
2015/05/04 13:46:27
This actually does work, probably due to our use o
djsollen
2015/05/04 14:03:44
Will this break the workflow of those who use xcod
| |
75 sys.exit(-1); | |
76 | |
77 if os.path.isabs(output_dir): | 71 if os.path.isabs(output_dir): |
78 return output_dir | 72 return output_dir |
79 else: | 73 else: |
80 return os.path.join(os.path.abspath(script_dir), output_dir) | 74 return os.path.join(os.path.abspath(script_dir), output_dir) |
81 | 75 |
82 | 76 |
83 if __name__ == '__main__': | 77 if __name__ == '__main__': |
84 args = sys.argv[1:] | 78 args = sys.argv[1:] |
85 | 79 |
86 if not os.getenv(ENVVAR_GYP_GENERATORS): | 80 if not os.getenv(ENVVAR_GYP_GENERATORS): |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
166 if res: | 160 if res: |
167 sys.exit(res) | 161 sys.exit(res) |
168 | 162 |
169 # This code is copied from Chrome's build/gyp_chromium. It's not clear why | 163 # This code is copied from Chrome's build/gyp_chromium. It's not clear why |
170 # the *_runtime variables are reversed. | 164 # the *_runtime variables are reversed. |
171 if vs2013_runtime_dll_dirs: | 165 if vs2013_runtime_dll_dirs: |
172 x64_runtime, x86_runtime = vs2013_runtime_dll_dirs | 166 x64_runtime, x86_runtime = vs2013_runtime_dll_dirs |
173 vs_toolchain.CopyVsRuntimeDlls( | 167 vs_toolchain.CopyVsRuntimeDlls( |
174 os.path.join(os.getenv('CHROME_PATH'), get_output_dir()), | 168 os.path.join(os.getenv('CHROME_PATH'), get_output_dir()), |
175 (x86_runtime, x64_runtime)) | 169 (x86_runtime, x64_runtime)) |
OLD | NEW |