OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 | 2 |
3 # Copyright 2014 Google Inc. | 3 # Copyright 2014 Google Inc. |
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 """ | 8 """ |
9 Script for generating the Android framework's version of Skia from gyp | 9 Script for generating the Android framework's version of Skia from gyp |
10 files. | 10 files. |
11 """ | 11 """ |
12 | 12 |
13 import os | 13 import os |
14 import shutil | 14 import shutil |
15 import sys | 15 import sys |
16 import tempfile | 16 import tempfile |
17 | 17 |
18 # Find the top of trunk | 18 # Find the top of trunk |
19 SCRIPT_DIR = os.path.abspath(os.path.dirname(__file__)) | 19 SCRIPT_DIR = os.path.abspath(os.path.dirname(__file__)) |
20 SKIA_DIR = os.path.normpath(os.path.join(SCRIPT_DIR, os.pardir, os.pardir, | 20 SKIA_DIR = os.path.normpath(os.path.join(SCRIPT_DIR, os.pardir, os.pardir, |
21 os.pardir)) | 21 os.pardir)) |
22 | 22 |
23 # Find the directory with our helper files, and add it to the path. | 23 # Find the directory with our helper files, and add it to the path. |
24 GYP_GEN_DIR = os.path.join(SKIA_DIR, 'platform_tools', 'android', 'gyp_gen') | 24 ANDROID_TOOLS = os.path.join(SKIA_DIR, 'platform_tools', 'android') |
25 sys.path.append(GYP_GEN_DIR) | 25 sys.path.append(ANDROID_TOOLS) |
26 | 26 |
27 import android_framework_gyp | 27 import gyp_gen.android_framework_gyp as android_framework_gyp |
28 import gypd_parser | 28 import gyp_gen.gypd_parser as gypd_parser |
29 import generate_user_config | 29 import gyp_gen.generate_user_config as generate_user_config |
30 import makefile_writer | 30 import gyp_gen.makefile_writer as makefile_writer |
31 import tool_makefile_writer | 31 import gyp_gen.tool_makefile_writer as tool_makefile_writer |
32 import vars_dict_lib | 32 import gyp_gen.vars_dict_lib as vars_dict_lib |
33 | 33 |
34 # Folder containing all gyp files and generated gypd files. | 34 # Folder containing all gyp files and generated gypd files. |
35 GYP_FOLDER = 'gyp' | 35 GYP_FOLDER = 'gyp' |
36 | 36 |
37 | 37 |
38 def generate_var_dict(target_dir, target_file, skia_arch_type, have_neon): | 38 def generate_var_dict(target_dir, target_file, skia_arch_type, have_neon): |
39 """Create a VarsDict for a particular arch type. | 39 """Create a VarsDict for a particular arch type. |
40 | 40 |
41 Each paramater is passed directly to android_framework_gyp.main(). | 41 Each paramater is passed directly to android_framework_gyp.main(). |
42 | 42 |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 'arm64')) | 174 'arm64')) |
175 | 175 |
176 makefile_writer.write_android_mk(target_dir=target_dir, | 176 makefile_writer.write_android_mk(target_dir=target_dir, |
177 common=common, deviations_from_common=deviations_from_common) | 177 common=common, deviations_from_common=deviations_from_common) |
178 | 178 |
179 finally: | 179 finally: |
180 shutil.rmtree(tmp_folder) | 180 shutil.rmtree(tmp_folder) |
181 | 181 |
182 if __name__ == '__main__': | 182 if __name__ == '__main__': |
183 main() | 183 main() |
OLD | NEW |