Index: components/cronet/tools/jar_src.py |
diff --git a/components/cronet/tools/jar_src.py b/components/cronet/tools/jar_src.py |
index 09281ab93c266e88f7e77cf3156d15935c4bc4b8..b2d39d648f9b2ec27db16b6bbf9c8a841bd6eb69 100755 |
--- a/components/cronet/tools/jar_src.py |
+++ b/components/cronet/tools/jar_src.py |
@@ -52,8 +52,10 @@ def main(): |
# A temporary directory to put the output of jar files. |
unzipped_jar_path = None |
+ generated_src_dirs = [] |
if options.src_jars: |
unzipped_jar_path = tempfile.mkdtemp(dir=os.path.dirname(options.jar_path)) |
+ generated_src_dirs.append(unzipped_jar_path) |
jar_list = [] |
for gn_list in options.src_jars: |
jar_list.extend(build_utils.ParseGnList(gn_list)) |
@@ -64,10 +66,8 @@ def main(): |
src_dirs = [] |
for src_dir in options.src_dir: |
src_dirs.extend(build_utils.ParseGnList(src_dir)) |
- if unzipped_jar_path: |
- src_dirs += [unzipped_jar_path] |
- for src_dir in src_dirs: |
+ for src_dir in src_dirs + generated_src_dirs: |
JarSources(src_dir, options.jar_path) |
if options.depfile: |
@@ -75,6 +75,7 @@ def main(): |
for src_dir in src_dirs: |
for root, _, filenames in os.walk(src_dir): |
deps.extend(os.path.join(root, f) for f in filenames) |
+ # Srcjar deps already captured in GN rules (no need to list them here). |
xunjieli
2016/09/14 19:43:42
Srcjar deps aren't explicitly listed in the GN rul
agrieve
2016/09/14 19:59:40
This change marks the srcjar_deps as inputs to the
xunjieli
2016/09/14 20:02:16
If the dependency is added, can we get rid of line
agrieve
2016/09/14 20:33:03
The dependency in GN is only for generated files.
xunjieli
2016/09/14 20:34:50
Acknowledged. I see.
|
build_utils.WriteDepfile(options.depfile, options.jar_path, deps) |
# Clean up temporary output directory. |