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 """Code for generating Android.mk for a tool.""" | 8 """Code for generating Android.mk for a tool.""" |
9 | 9 |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... |
27 f.write(makefile_writer.AUTOGEN_WARNING) | 27 f.write(makefile_writer.AUTOGEN_WARNING) |
28 | 28 |
29 makefile_writer.write_local_path(f) | 29 makefile_writer.write_local_path(f) |
30 makefile_writer.write_clear_vars(f) | 30 makefile_writer.write_clear_vars(f) |
31 | 31 |
32 makefile_writer.write_local_vars(f, var_dict, False, None) | 32 makefile_writer.write_local_vars(f, var_dict, False, None) |
33 | 33 |
34 makefile_writer.write_group(f, 'LOCAL_PICKUP_FILES', | 34 makefile_writer.write_group(f, 'LOCAL_PICKUP_FILES', |
35 ['$(LOCAL_PATH)/../resources'], False) | 35 ['$(LOCAL_PATH)/../resources'], False) |
36 | 36 |
37 makefile_writer.write_include_stlport(f) | |
38 | |
39 f.write('include $(BUILD_NATIVE_TEST)\n') | 37 f.write('include $(BUILD_NATIVE_TEST)\n') |
40 | 38 |
41 | 39 |
42 def generate_tool(gyp_dir, target_file, skia_trunk, dest_dir, | 40 def generate_tool(gyp_dir, target_file, skia_trunk, dest_dir, |
43 skia_lib_var_dict, local_module_name, local_module_tags, | 41 skia_lib_var_dict, local_module_name, local_module_tags, |
44 desired_targets): | 42 desired_targets): |
45 """Common steps for building one of the skia tools. | 43 """Common steps for building one of the skia tools. |
46 | 44 |
47 Parse a gyp file and create an Android.mk for this tool. | 45 Parse a gyp file and create an Android.mk for this tool. |
48 | 46 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 full_dest = os.path.join(skia_trunk, dest_dir) | 88 full_dest = os.path.join(skia_trunk, dest_dir) |
91 else: | 89 else: |
92 full_dest = dest_dir | 90 full_dest = dest_dir |
93 | 91 |
94 # If the path does not exist, create it. This will happen during testing, | 92 # If the path does not exist, create it. This will happen during testing, |
95 # where there is no subdirectory for each tool (just a temporary folder). | 93 # where there is no subdirectory for each tool (just a temporary folder). |
96 if not os.path.exists(full_dest): | 94 if not os.path.exists(full_dest): |
97 os.mkdir(full_dest) | 95 os.mkdir(full_dest) |
98 | 96 |
99 write_tool_android_mk(target_dir=full_dest, var_dict=var_dict) | 97 write_tool_android_mk(target_dir=full_dest, var_dict=var_dict) |
OLD | NEW |