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. |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 original_sk_user_config=user_config, | 126 original_sk_user_config=user_config, |
127 require_sk_user_config=require_sk_user_config, target_dir=dst_dir, | 127 require_sk_user_config=require_sk_user_config, target_dir=dst_dir, |
128 ordered_set=common.DEFINES) | 128 ordered_set=common.DEFINES) |
129 | 129 |
130 tool_makefile_writer.generate_tool(gyp_dir=tmp_folder, | 130 tool_makefile_writer.generate_tool(gyp_dir=tmp_folder, |
131 target_file='tests.gyp', | 131 target_file='tests.gyp', |
132 skia_trunk=target_dir, | 132 skia_trunk=target_dir, |
133 dest_dir='tests', | 133 dest_dir='tests', |
134 skia_lib_var_dict=common, | 134 skia_lib_var_dict=common, |
135 local_module_name='skia_test', | 135 local_module_name='skia_test', |
136 local_module_tags=['eng', 'tests']) | 136 local_module_tags=['tests']) |
137 | 137 |
138 tool_makefile_writer.generate_tool(gyp_dir=tmp_folder, | 138 tool_makefile_writer.generate_tool(gyp_dir=tmp_folder, |
139 target_file='bench.gyp', | 139 target_file='bench.gyp', |
140 skia_trunk=target_dir, | 140 skia_trunk=target_dir, |
141 dest_dir='bench', | 141 dest_dir='bench', |
142 skia_lib_var_dict=common, | 142 skia_lib_var_dict=common, |
143 local_module_name='skia_bench', | 143 local_module_name='skia_bench', |
144 local_module_tags=['tests'], | 144 local_module_tags=['tests'], |
145 place_in_local_tmp=True) | 145 place_in_local_tmp=True) |
146 | 146 |
147 tool_makefile_writer.generate_tool(gyp_dir=tmp_folder, | 147 tool_makefile_writer.generate_tool(gyp_dir=tmp_folder, |
148 target_file='gm.gyp', | 148 target_file='gm.gyp', |
149 skia_trunk=target_dir, | 149 skia_trunk=target_dir, |
150 dest_dir='gm', | 150 dest_dir='gm', |
151 skia_lib_var_dict=common, | 151 skia_lib_var_dict=common, |
152 local_module_name='skia_gm', | 152 local_module_name='skia_gm', |
153 local_module_tags=['optional']) | 153 local_module_tags=['tests']) |
154 | 154 |
155 tool_makefile_writer.generate_tool(gyp_dir=tmp_folder, | 155 tool_makefile_writer.generate_tool(gyp_dir=tmp_folder, |
156 target_file='dm.gyp', | 156 target_file='dm.gyp', |
157 skia_trunk=target_dir, | 157 skia_trunk=target_dir, |
158 dest_dir='dm', | 158 dest_dir='dm', |
159 skia_lib_var_dict=common, | 159 skia_lib_var_dict=common, |
160 local_module_name='skia_dm', | 160 local_module_name='skia_dm', |
161 local_module_tags=['optional']) | 161 local_module_tags=['tests']) |
162 | 162 |
163 # Now that the defines have been written to SkUserConfig and they've been | 163 # Now that the defines have been written to SkUserConfig and they've been |
164 # used to skip adding them to the tools makefiles, they are not needed in | 164 # used to skip adding them to the tools makefiles, they are not needed in |
165 # Android.mk. Reset DEFINES. | 165 # Android.mk. Reset DEFINES. |
166 common.DEFINES.reset() | 166 common.DEFINES.reset() |
167 | 167 |
168 # Further trim arm_neon_var_dict with arm_var_dict. After this call, | 168 # Further trim arm_neon_var_dict with arm_var_dict. After this call, |
169 # arm_var_dict (which will now be the intersection) includes all definitions | 169 # arm_var_dict (which will now be the intersection) includes all definitions |
170 # used by both arm and arm + neon, and arm_neon_var_dict will only contain | 170 # used by both arm and arm + neon, and arm_neon_var_dict will only contain |
171 # those specific to arm + neon. | 171 # those specific to arm + neon. |
(...skipping 18 matching lines...) Expand all Loading... |
190 'arm64')) | 190 'arm64')) |
191 | 191 |
192 makefile_writer.write_android_mk(target_dir=target_dir, | 192 makefile_writer.write_android_mk(target_dir=target_dir, |
193 common=common, deviations_from_common=deviations_from_common) | 193 common=common, deviations_from_common=deviations_from_common) |
194 | 194 |
195 finally: | 195 finally: |
196 shutil.rmtree(tmp_folder) | 196 shutil.rmtree(tmp_folder) |
197 | 197 |
198 if __name__ == '__main__': | 198 if __name__ == '__main__': |
199 main() | 199 main() |
OLD | NEW |