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

Unified Diff: build/android/java_cpp_template.gypi

Issue 12939021: Make the build control what library(/ies) to load (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@antpy
Patch Set: Created 7 years, 9 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 | « build/android/gcc_preprocess.py ('k') | build/android/write_ordered_libraries.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/java_cpp_template.gypi
diff --git a/build/android/java_cpp_template.gypi b/build/android/java_cpp_template.gypi
index c55b1002f5e5f68f4af57744744b860b7b74be08..2b254700acc6194a31df2d30c045a2a4d1c690b5 100644
--- a/build/android/java_cpp_template.gypi
+++ b/build/android/java_cpp_template.gypi
@@ -17,7 +17,7 @@
# 'package_name': 'org/chromium/net',
# 'template_deps': ['net/base/certificate_mime_type_list.h'],
# },
-# 'includes': [ '../build/android/java_constants.gypi' ],
+# 'includes': [ '../build/android/java_cpp_template.gypi' ],
# },
#
# The 'sources' entry should only list template file. The template file
@@ -31,7 +31,8 @@
{
# Location where all generated Java sources will be placed.
'variables': {
- 'output_dir': '<(SHARED_INTERMEDIATE_DIR)/templates/<(package_name)'
+ 'include_path%': '<(DEPTH)',
+ 'output_dir': '<(SHARED_INTERMEDIATE_DIR)/templates/<(package_name)',
},
# Ensure that the output directory is used in the class path
# when building targets that depend on this one.
@@ -49,19 +50,22 @@
'rule_name': 'generate_java_constants',
'extension': 'template',
# Set template_deps as additional dependencies.
- 'inputs': ['<@(template_deps)'],
+ 'variables': {
+ 'output_path': '<(output_dir)/<(RULE_INPUT_ROOT).java',
+ },
+ 'inputs': [
+ '<(DEPTH)/build/android/pylib/build_utils.py',
+ '<(DEPTH)/build/android/gcc_preprocess.py',
+ '<@(template_deps)'
+ ],
'outputs': [
- '<(output_dir)/<(RULE_INPUT_ROOT).java'
+ '<(output_path)',
],
'action': [
- 'gcc', # invoke host gcc.
- '-E', # stop after preprocessing.
- '-D', 'ANDROID', # Specify ANDROID define for pre-processor.
- '-x', 'c-header', # treat sources as C header files
- '-P', # disable line markers, i.e. '#line 309'
- '-I', '<(DEPTH)', # Add project top-level to include path
- '-o', '<@(_outputs)', # Specify output file
- '<(RULE_INPUT_PATH)', # Specify input file
+ 'python', '<(DEPTH)/build/android/gcc_preprocess.py',
+ '--include-path=<(include_path)',
+ '--output=<(output_path)',
+ '--template=<(RULE_INPUT_PATH)',
],
'message': 'Generating Java from cpp template <(RULE_INPUT_PATH)',
}
« no previous file with comments | « build/android/gcc_preprocess.py ('k') | build/android/write_ordered_libraries.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698