Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: platform_tools/android/gyp_gen/tool_makefile_writer.py

Issue 1696483002: Update Android framework makefile to build static and shared libs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: new test Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 17 matching lines...) Expand all
28 """Write Android.mk for a Skia tool. 28 """Write Android.mk for a Skia tool.
29 29
30 Args: 30 Args:
31 target_dir: Destination for the makefile. Must not be None. 31 target_dir: Destination for the makefile. Must not be None.
32 var_dict: VarsDict containing variables for the makefile. 32 var_dict: VarsDict containing variables for the makefile.
33 """ 33 """
34 target_file = os.path.join(target_dir, 'Android.mk') 34 target_file = os.path.join(target_dir, 'Android.mk')
35 with open(target_file, 'w') as f: 35 with open(target_file, 'w') as f:
36 f.write(makefile_writer.AUTOGEN_WARNING) 36 f.write(makefile_writer.AUTOGEN_WARNING)
37 37
38 makefile_writer.write_local_path(f) 38 f.write(makefile_writer.LOCAL_PATH)
39 makefile_writer.write_clear_vars(f) 39 f.write(makefile_writer.CLEAR_VARS)
40 40
41 makefile_writer.write_local_vars(f, var_dict, False, None) 41 makefile_writer.write_local_vars(f, var_dict, False, None)
42 42
43 f.write(SKIA_RESOURCES) 43 f.write(SKIA_RESOURCES)
44 f.write('include $(LOCAL_PATH)/../skia_static_deps.mk\n')
44 f.write('include $(BUILD_NATIVE_TEST)\n') 45 f.write('include $(BUILD_NATIVE_TEST)\n')
45 46
46 47
47 def generate_tool(gyp_dir, target_file, skia_trunk, dest_dir, 48 def generate_tool(gyp_dir, target_file, skia_trunk, dest_dir,
48 skia_lib_var_dict, local_module_name, local_module_tags, 49 skia_lib_var_dict, local_module_name, local_module_tags,
49 desired_targets, gyp_source_dir=None): 50 desired_targets, gyp_source_dir=None):
50 """Common steps for building one of the skia tools. 51 """Common steps for building one of the skia tools.
51 52
52 Parse a gyp file and create an Android.mk for this tool. 53 Parse a gyp file and create an Android.mk for this tool.
53 54
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 full_dest = os.path.join(skia_trunk, dest_dir) 98 full_dest = os.path.join(skia_trunk, dest_dir)
98 else: 99 else:
99 full_dest = dest_dir 100 full_dest = dest_dir
100 101
101 # If the path does not exist, create it. This will happen during testing, 102 # If the path does not exist, create it. This will happen during testing,
102 # where there is no subdirectory for each tool (just a temporary folder). 103 # where there is no subdirectory for each tool (just a temporary folder).
103 if not os.path.exists(full_dest): 104 if not os.path.exists(full_dest):
104 os.mkdir(full_dest) 105 os.mkdir(full_dest)
105 106
106 write_tool_android_mk(target_dir=full_dest, var_dict=var_dict) 107 write_tool_android_mk(target_dir=full_dest, var_dict=var_dict)
OLDNEW
« no previous file with comments | « platform_tools/android/gyp_gen/makefile_writer.py ('k') | platform_tools/android/tests/expectations/Android.mk » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698