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

Unified Diff: platform_tools/android/bin/gyp_to_android.py

Issue 800573002: Add parameter to specify gyp dir to gyp_to_android. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years 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 | « no previous file | platform_tools/android/gyp_gen/android_framework_gyp.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: platform_tools/android/bin/gyp_to_android.py
diff --git a/platform_tools/android/bin/gyp_to_android.py b/platform_tools/android/bin/gyp_to_android.py
index a42471b2e03e5101645ce9645d742956c1cc2892..34c81e1f5e38c7ca23fbfdf4b573cde7cc69f964 100755
--- a/platform_tools/android/bin/gyp_to_android.py
+++ b/platform_tools/android/bin/gyp_to_android.py
@@ -35,7 +35,8 @@ import gyp_gen.vars_dict_lib as vars_dict_lib
GYP_FOLDER = 'gyp'
-def generate_var_dict(target_dir, target_file, skia_arch_type, have_neon):
+def generate_var_dict(target_dir, target_file, skia_arch_type, have_neon,
+ gyp_source_dir):
"""Create a VarsDict for a particular arch type.
Each paramater is passed directly to android_framework_gyp.main().
@@ -45,18 +46,20 @@ def generate_var_dict(target_dir, target_file, skia_arch_type, have_neon):
target_file: Target gyp file.
skia_arch_type: Target architecture.
have_neon: Whether the target should build for neon.
+ gyp_source_dir: Directory for gyp source.
Returns:
A VarsDict containing the variable definitions determined by gyp.
"""
result_file = android_framework_gyp.main(target_dir, target_file,
- skia_arch_type, have_neon)
+ skia_arch_type, have_neon,
+ gyp_source_dir)
var_dict = vars_dict_lib.VarsDict()
gypd_parser.parse_gypd(var_dict, result_file, '.')
android_framework_gyp.clean_gypd_files(target_dir)
print '.',
return var_dict
-def main(target_dir=None, require_sk_user_config=False):
+def main(target_dir=None, require_sk_user_config=False, gyp_source_dir=None):
"""Create Android.mk for the Android framework's external/skia.
Builds Android.mk using Skia's gyp files.
@@ -66,6 +69,7 @@ def main(target_dir=None, require_sk_user_config=False):
will be placed in skia's root directory.
require_sk_user_config: If True, raise an AssertionError if
SkUserConfig.h does not exist.
+ gyp_source_dir: Source directory for gyp.
"""
# Create a temporary folder to hold gyp and gypd files. Create it in SKIA_DIR
# so that it is a sibling of gyp/, so the relationships between gyp files and
@@ -95,19 +99,22 @@ def main(target_dir=None, require_sk_user_config=False):
# The default uses a non-existant archtype, to find all the general
# variable definitions.
default_var_dict = generate_var_dict(tmp_folder, main_gyp_file, 'other',
- False)
- arm_var_dict = generate_var_dict(tmp_folder, main_gyp_file, 'arm', False)
+ False, gyp_source_dir)
+ arm_var_dict = generate_var_dict(tmp_folder, main_gyp_file, 'arm', False,
+ gyp_source_dir)
arm_neon_var_dict = generate_var_dict(tmp_folder, main_gyp_file, 'arm',
- True)
- x86_var_dict = generate_var_dict(tmp_folder, main_gyp_file, 'x86', False)
+ True, gyp_source_dir)
+ x86_var_dict = generate_var_dict(tmp_folder, main_gyp_file, 'x86', False,
+ gyp_source_dir)
- mips_var_dict = generate_var_dict(tmp_folder, main_gyp_file, 'mips', False)
+ mips_var_dict = generate_var_dict(tmp_folder, main_gyp_file, 'mips', False,
+ gyp_source_dir)
mips64_var_dict = generate_var_dict(tmp_folder, main_gyp_file, 'mips64',
- False)
+ False, gyp_source_dir)
arm64_var_dict = generate_var_dict(tmp_folder, main_gyp_file, 'arm64',
- False)
+ False, gyp_source_dir)
# Compute the intersection of all targets. All the files in the intersection
# should be part of the makefile always. Each dict will now contain trimmed
« no previous file with comments | « no previous file | platform_tools/android/gyp_gen/android_framework_gyp.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698