mirror of
https://gitlab.com/ita1024/waf.git
synced 2024-11-25 19:30:04 +01:00
Merge branch 'javac_dep_robust' into 'master'
javaw: make dependencies code introduced in !2232 more robust See merge request ita1024/waf!2239
This commit is contained in:
commit
387f01750c
@ -213,7 +213,10 @@ def java_use_rec(self, name, **kw):
|
|||||||
if hasattr(y, 'jar_task'):
|
if hasattr(y, 'jar_task'):
|
||||||
self.use_lst.append(y.jar_task.outputs[0].abspath())
|
self.use_lst.append(y.jar_task.outputs[0].abspath())
|
||||||
else:
|
else:
|
||||||
|
if hasattr(y,'outdir'):
|
||||||
self.use_lst.append(y.outdir.abspath())
|
self.use_lst.append(y.outdir.abspath())
|
||||||
|
else:
|
||||||
|
self.use_lst.append(y.path.get_bld().abspath())
|
||||||
|
|
||||||
for x in self.to_list(getattr(y, 'use', [])):
|
for x in self.to_list(getattr(y, 'use', [])):
|
||||||
self.java_use_rec(x)
|
self.java_use_rec(x)
|
||||||
@ -242,10 +245,14 @@ def use_javac_files(self):
|
|||||||
self.javac_task.set_run_after(y.jar_task)
|
self.javac_task.set_run_after(y.jar_task)
|
||||||
self.javac_task.dep_nodes.extend(y.jar_task.outputs)
|
self.javac_task.dep_nodes.extend(y.jar_task.outputs)
|
||||||
else:
|
else:
|
||||||
|
if hasattr(y, 'outdir'):
|
||||||
self.use_lst.append(y.outdir.abspath())
|
self.use_lst.append(y.outdir.abspath())
|
||||||
|
self.javac_task.dep_nodes.extend([x for x in y.outdir.ant_glob(JAR_RE, remove=False, quiet=True)])
|
||||||
|
else:
|
||||||
|
self.use_lst.append(y.path.get_bld().abspath())
|
||||||
|
self.javac_task.dep_nodes.extend([x for x in y.path.get_bld().ant_glob(JAR_RE, remove=False, quiet=True)])
|
||||||
for tsk in y.tasks:
|
for tsk in y.tasks:
|
||||||
self.javac_task.set_run_after(tsk)
|
self.javac_task.set_run_after(tsk)
|
||||||
self.javac_task.dep_nodes.extend([x for x in y.outdir.ant_glob(JAR_RE, remove=False, quiet=True)])
|
|
||||||
|
|
||||||
# If recurse use scan is enabled recursively add use attribute for each used one
|
# If recurse use scan is enabled recursively add use attribute for each used one
|
||||||
if getattr(self, 'recurse_use', False) or self.bld.env.RECURSE_JAVA:
|
if getattr(self, 'recurse_use', False) or self.bld.env.RECURSE_JAVA:
|
||||||
|
Loading…
Reference in New Issue
Block a user