diff options
author | wisberg <wisberg> | 2005-02-11 05:04:07 +0000 |
---|---|---|
committer | wisberg <wisberg> | 2005-02-11 05:04:07 +0000 |
commit | c92e64aa1f9d9dafb3de78f974ceaa46c81a9730 (patch) | |
tree | d89855fcc369336d78e79dab1a9ae1ddfc16989f /build/src | |
parent | 7fd7d6b2875eff95488720dc951f3cc94d383903 (diff) | |
download | aspectj-c92e64aa1f9d9dafb3de78f974ceaa46c81a9730.tar.gz aspectj-c92e64aa1f9d9dafb3de78f974ceaa46c81a9730.zip |
support for building Java 5 sources
Diffstat (limited to 'build/src')
-rw-r--r-- | build/src/org/aspectj/internal/tools/build/Module.java | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/build/src/org/aspectj/internal/tools/build/Module.java b/build/src/org/aspectj/internal/tools/build/Module.java index 81907928c..cb9e2b644 100644 --- a/build/src/org/aspectj/internal/tools/build/Module.java +++ b/build/src/org/aspectj/internal/tools/build/Module.java @@ -433,9 +433,7 @@ public class Module { messager.error("no such library jar " + libJar + " from " + entry); } } else if ("var".equals(kind)) { - if (!"JRE_LIB".equals(path) && !"ASPECTJRT_LIB".equals(path)) { - messager.log("cannot handle var yet: " + entry); - } + warnVariable(path, entry); classpathVariables.add(path); } else if ("con".equals(kind)) { if (-1 == path.indexOf("JRE")) { // warn non-JRE containers @@ -448,6 +446,15 @@ public class Module { } return false; } + private void warnVariable(String path, XMLEntry entry) { + String[] known = {"JRE_LIB", "ASPECTJRT_LIB", "JRE15_LIB"}; + for (int i = 0; i < known.length; i++) { + if (known[i].equals(path)) { + return; + } + } + messager.log("Module cannot handle var yet: " + entry); + } /** @return true if any properties were read correctly */ private boolean initProperties() { @@ -483,16 +490,21 @@ public class Module { * @return true if initialization post-processing worked */ protected boolean reviewInit() { - if (!trimTesting) { - return true; - } try { for (ListIterator iter = srcDirs.listIterator(); iter.hasNext();) { File srcDir = (File) iter.next(); - String name = srcDir.getName(); - if ("testsrc".equals(name.toLowerCase())) { // XXXFileLiteral - iter.remove(); // XXX if verbose log - } + String lcname = srcDir.getName().toLowerCase(); + if (trimTesting + && Util.Constants.TESTSRC.equals(lcname)) { + iter.remove(); + } else if (!Util.JAVA5_VM + && Util.Constants.JAVA5_SRC.equals(lcname)) { + // assume optional for pre-1.5 builds + iter.remove(); + } + } + if (!trimTesting) { + return true; } if (!name.startsWith("testing")) { for (ListIterator iter = libJars.listIterator(); iter.hasNext();) { |