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

Unified Diff: platform_tools/android/gyp_gen/tool_makefile_writer.py

Issue 282053002: Generate bench/Android.mk from gyp. (Closed) Base URL: https://skia.googlesource.com/skia.git@baselines
Patch Set: Remove modifications to generated files to submit. Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « platform_tools/android/gyp_gen/makefile_writer.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: platform_tools/android/gyp_gen/tool_makefile_writer.py
diff --git a/platform_tools/android/gyp_gen/tool_makefile_writer.py b/platform_tools/android/gyp_gen/tool_makefile_writer.py
index bdcd8846b7072fd0a58f00a6cb4296a8bccdc6c1..ac2a75857e7cac4aa75d311bc0736311c7bf0713 100644
--- a/platform_tools/android/gyp_gen/tool_makefile_writer.py
+++ b/platform_tools/android/gyp_gen/tool_makefile_writer.py
@@ -15,27 +15,37 @@ import os
import vars_dict_lib
-def write_tool_android_mk(target_dir, var_dict):
+def write_tool_android_mk(target_dir, var_dict, place_in_local_tmp):
"""Write Android.mk for a Skia tool.
Args:
target_dir: Destination for the makefile. Must not be None.
var_dict: VarsDict containing variables for the makefile.
+ place_in_local_tmp: If True, the executable will be synced to
+ /data/local/tmp.
"""
target_file = os.path.join(target_dir, 'Android.mk')
with open(target_file, 'w') as f:
f.write(makefile_writer.AUTOGEN_WARNING)
+
+ if place_in_local_tmp:
+ f.write('local_target_dir := $(TARGET_OUT_DATA)/local/tmp\n')
+
makefile_writer.write_local_path(f)
makefile_writer.write_clear_vars(f)
makefile_writer.write_local_vars(f, var_dict, False, None)
+ if place_in_local_tmp:
+ f.write('LOCAL_MODULE_PATH := $(local_target_dir)\n')
+
makefile_writer.write_include_stlport(f)
f.write('include $(BUILD_EXECUTABLE)\n')
def generate_tool(gyp_dir, target_file, skia_trunk, dest_dir,
- skia_lib_var_dict, local_module_name, local_module_tags):
+ skia_lib_var_dict, local_module_name, local_module_tags,
+ place_in_local_tmp=False):
"""Common steps for building one of the skia tools.
Parse a gyp file and create an Android.mk for this tool.
@@ -52,6 +62,8 @@ def generate_tool(gyp_dir, target_file, skia_trunk, dest_dir,
ensure we do not duplicate anything in this Android.mk.
local_module_name: Name for this tool, to set as LOCAL_MODULE.
local_module_tags: Tags to pass to LOCAL_MODULE_TAG.
+ place_in_local_tmp: If True, the executable will be synced to
+ /data/local/tmp.
"""
result_file = android_framework_gyp.main(target_dir=gyp_dir,
target_file=target_file,
@@ -89,4 +101,5 @@ def generate_tool(gyp_dir, target_file, skia_trunk, dest_dir,
if not os.path.exists(full_dest):
os.mkdir(full_dest)
- write_tool_android_mk(target_dir=full_dest, var_dict=var_dict)
+ write_tool_android_mk(target_dir=full_dest, var_dict=var_dict,
+ place_in_local_tmp=place_in_local_tmp)
« no previous file with comments | « platform_tools/android/gyp_gen/makefile_writer.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698