summaryrefslogtreecommitdiffstats
path: root/SCons/Scanner
diff options
context:
space:
mode:
authorMats Wichmann <mats@linux.com>2022-10-18 17:33:36 (GMT)
committerMats Wichmann <mats@linux.com>2022-10-18 17:33:36 (GMT)
commit984e3f58b9f2c33cc551e2a3d2962c5f6420b3c8 (patch)
tree83ebaaac98b6ef8fcfffb1f6cba3d0e1f96825d3 /SCons/Scanner
parentcbe5d046c82d6f3c3e9952ffdbcf457be1dccb72 (diff)
downloadSCons-984e3f58b9f2c33cc551e2a3d2962c5f6420b3c8.zip
SCons-984e3f58b9f2c33cc551e2a3d2962c5f6420b3c8.tar.gz
SCons-984e3f58b9f2c33cc551e2a3d2962c5f6420b3c8.tar.bz2
Java scanner: fixes per review comments
Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'SCons/Scanner')
-rw-r--r--SCons/Scanner/Java.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/SCons/Scanner/Java.py b/SCons/Scanner/Java.py
index 0c6df37..f6edf93 100644
--- a/SCons/Scanner/Java.py
+++ b/SCons/Scanner/Java.py
@@ -33,7 +33,7 @@ def _subst_paths(env, paths) -> list:
"""Return a list of substituted path elements.
If *paths* is a string, it is split on the search-path separator
- (this makes the interpretation system-specitic - this is warned about
+ (this makes the interpretation system-specific - this is warned about
in the manpage). This helps support behavior like pulling in the
external ``CLASSPATH`` and setting it directly into ``JAVACLASSPATH``.
Otherwise, substitution is done on string-valued list elements
@@ -44,6 +44,7 @@ def _subst_paths(env, paths) -> list:
if SCons.Util.is_String(paths):
paths = paths.split(os.pathsep)
else:
+ # TODO: may want to revisit splitting list-element strings if requested
paths = flatten(paths)
paths = [env.subst(path) if is_String(path) else path for path in paths]
return paths
@@ -73,6 +74,9 @@ def scan(node, env, libpath=()) -> list:
result = []
for path in classpath:
if is_String(path) and "*" in path:
+ # This matches more than the Java docs describe: a '*' only
+ # matches jar files. The filter later should trim this down.
+ # TODO: should we filter here? use .endswith('*') rather than "in"?
libs = env.Glob(path)
else:
libs = [path]
@@ -91,6 +95,10 @@ def scan(node, env, libpath=()) -> list:
def JavaScanner():
+ """Scanner for .java files.
+
+ .. versionadded:: 4.4
+ """
return SCons.Scanner.Base(scan, 'JavaScanner', skeys=['.java'])
# Local Variables: