diff options
author | Gilles Dubochet <gilles.dubochet@epfl.ch> | 2005-10-11 11:43:57 +0000 |
---|---|---|
committer | Gilles Dubochet <gilles.dubochet@epfl.ch> | 2005-10-11 11:43:57 +0000 |
commit | 6f850988f453d6ced9661271ea4a5ed0be83d0e9 (patch) | |
tree | 31c6d693cacde619fdc4186f39206673978fd7ab | |
parent | 9a7eb6466ce007fdd0ecda326947327e4c562120 (diff) | |
download | scala-6f850988f453d6ced9661271ea4a5ed0be83d0e9.tar.gz scala-6f850988f453d6ced9661271ea4a5ed0be83d0e9.tar.bz2 scala-6f850988f453d6ced9661271ea4a5ed0be83d0e9.zip |
Remove the auto source detect feature which was...
Remove the auto source detect feature which was rather dodgy. The
library source must be in the task classpath now.
-rw-r--r-- | sources/scala/tools/scalac/ant/Scalac.java | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/sources/scala/tools/scalac/ant/Scalac.java b/sources/scala/tools/scalac/ant/Scalac.java index 37d8e21cb4..8495e3712a 100644 --- a/sources/scala/tools/scalac/ant/Scalac.java +++ b/sources/scala/tools/scalac/ant/Scalac.java @@ -401,30 +401,13 @@ public class Scalac extends MatchingTask { // From there, the sources should be in '../src' or '../sources' respectively. // This means any other configuration will fail at runtime. In this case, the bootclasspath should be set explicitly. // Notice also how the bootclasspath must finish with a ":" for it to work. - String[] baseBootclasspath; + Path baseBootclasspath; if (bootclasspath != null) { - baseBootclasspath = bootclasspath.list(); + baseBootclasspath = bootclasspath; } else { - baseBootclasspath = getClassLoaderClasspath(this.getClass().getClassLoader()).list(); + baseBootclasspath = getClassLoaderClasspath(this.getClass().getClassLoader()); } - bootclasspath = new Path(getProject()); - for (int i = 0; i < baseBootclasspath.length; i++) { - bootclasspath.append(new Path(getProject(), baseBootclasspath[i])); - int scalaJarIndex = baseBootclasspath[i].lastIndexOf("lib" + File.separator + "scala.jar"); - int scalaClassesIndex = baseBootclasspath[i].lastIndexOf("scala" + File.separator + "classes"); - if (scalaJarIndex > -1) { - String libPath = baseBootclasspath[i].substring(0, scalaJarIndex) + "src"; - bootclasspath.append(new Path(getProject(), libPath)); - System.setProperty("scala.library.class.path", baseBootclasspath[i]); - System.setProperty("scala.library.source.path", libPath); - } else if (scalaClassesIndex > -1) { - String libPath = baseBootclasspath[i].substring(0, scalaClassesIndex + 6) + "sources"; - bootclasspath.append(new Path(getProject(), libPath)); - System.setProperty("scala.library.class.path", baseBootclasspath[i]); - System.setProperty("scala.library.source.path", libPath); - } - } - command.bootclasspath.value = makeAbsolutePath(bootclasspath, "bootclasspath") + ":"; + command.bootclasspath.value = makeAbsolutePath(baseBootclasspath, "bootclasspath") + ":"; if (extpath != null) command.extdirs.value = makeAbsolutePath(extpath, "extpath"); if (encoding != null) command.encoding.value = encoding; command.verbose.value = verbose; |