mirror of https://gitlab.com/ita1024/waf.git
javaw: add possibility to enable recurse use also globally via env variable
This commit is contained in:
parent
ce8d103cf4
commit
9cd14427c1
|
@ -10,13 +10,16 @@
|
||||||
# a project with many java artifacts and complex dependencies a manual
|
# a project with many java artifacts and complex dependencies a manual
|
||||||
# management may be expensive.
|
# management may be expensive.
|
||||||
#
|
#
|
||||||
# By setting recurse_use to True the recursive behaviour is enabled.
|
# By setting recurse_use to True (or build wise by setting RECURSE_JAVA env
|
||||||
|
# variable to True) the recursive behaviour is enabled.
|
||||||
#
|
#
|
||||||
# Directory d tests the case when recursion stops earlier since
|
# Directory d tests the case when recursion stops earlier since
|
||||||
# a dependency is already explicitly defined
|
# a dependency is already explicitly defined
|
||||||
|
|
||||||
def configure(conf):
|
def configure(conf):
|
||||||
conf.load('java')
|
conf.load('java')
|
||||||
|
# For build wide enabling:
|
||||||
|
# conf.env.RECURSE_JAVA = True
|
||||||
|
|
||||||
def build(bld):
|
def build(bld):
|
||||||
bld.recurse('a b c d')
|
bld.recurse('a b c d')
|
||||||
|
|
|
@ -99,9 +99,14 @@ and then NNN can be freely used in rules as:
|
||||||
|
|
||||||
In the java tool the dependencies via use are not transitive by default, as
|
In the java tool the dependencies via use are not transitive by default, as
|
||||||
this necessity depends on the code. To enable recursive dependency scanning
|
this necessity depends on the code. To enable recursive dependency scanning
|
||||||
use:
|
use on a specific rule:
|
||||||
|
|
||||||
recurse_use = True
|
recurse_use = True
|
||||||
|
|
||||||
|
Or build wise by setting the RECURSE_JAVA environment variable to True:
|
||||||
|
|
||||||
|
bld.env.RECURSE_JAVA = True
|
||||||
|
|
||||||
Unit tests can be integrated in the waf unit test environment using the
|
Unit tests can be integrated in the waf unit test environment using the
|
||||||
javatest extra.
|
javatest extra.
|
||||||
|
|
||||||
|
@ -240,8 +245,8 @@ def use_javac_files(self):
|
||||||
for tsk in y.tasks:
|
for tsk in y.tasks:
|
||||||
self.javac_task.set_run_after(tsk)
|
self.javac_task.set_run_after(tsk)
|
||||||
|
|
||||||
# If recurse_use then 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):
|
if getattr(self, 'recurse_use', False) or self.bld.env.RECURSE_JAVA:
|
||||||
self.java_use_rec(x)
|
self.java_use_rec(x)
|
||||||
|
|
||||||
self.env.append_value('CLASSPATH', self.use_lst)
|
self.env.append_value('CLASSPATH', self.use_lst)
|
||||||
|
|
Loading…
Reference in New Issue