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

Unified Diff: base/android/jni_generator/jni_generator.py

Issue 341823003: Add depfile support to android build scripts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | « no previous file | build/android/PRESUBMIT.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/android/jni_generator/jni_generator.py
diff --git a/base/android/jni_generator/jni_generator.py b/base/android/jni_generator/jni_generator.py
index 1196f76285ed3ba11e2581701ab403146a04a69d..56db13cf9182ec006ed1d19e344ad3b6f2f91b32 100755
--- a/base/android/jni_generator/jni_generator.py
+++ b/base/android/jni_generator/jni_generator.py
@@ -18,6 +18,15 @@ import sys
import textwrap
import zipfile
+CHROMIUM_SRC = os.path.join(
+ os.path.dirname(__file__), os.pardir, os.pardir, os.pardir)
+BUILD_ANDROID_GYP = os.path.join(
+ CHROMIUM_SRC, 'build', 'android', 'gyp')
+
+sys.path.append(BUILD_ANDROID_GYP)
+
+from util import build_utils
+
class ParseError(Exception):
"""Exception thrown when we can't parse the input file."""
@@ -1351,6 +1360,8 @@ declarations and print the header file to stdout (or a file).
See SampleForTests.java for more details.
"""
option_parser = optparse.OptionParser(usage=usage)
+ build_utils.AddDepfileOption(option_parser)
+
option_parser.add_option('-j', '--jar_file', dest='jar_file',
help='Extract the list of input files from'
' a specified jar file.'
@@ -1425,6 +1436,11 @@ See SampleForTests.java for more details.
JniParams.SetJarJarMappings(f.read())
GenerateJNIHeader(input_file, output_file, options)
+ if options.depfile:
+ build_utils.WriteDepfile(
+ options.depfile,
+ build_utils.GetPythonDependencies())
+
if __name__ == '__main__':
sys.exit(main(sys.argv))
« no previous file with comments | « no previous file | build/android/PRESUBMIT.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698