summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGilles Dubochet <gilles.dubochet@epfl.ch>2006-03-21 17:43:54 +0000
committerGilles Dubochet <gilles.dubochet@epfl.ch>2006-03-21 17:43:54 +0000
commit357c6349ec090249cbae5ac616d2a90bb2e2ccf1 (patch)
treed62996a299bdc3d279ea61cd6ddfa1f9eb162c3d /src
parent1d147fed1e9c19a42492ae97c64f7fb9ba09c909 (diff)
downloadscala-357c6349ec090249cbae5ac616d2a90bb2e2ccf1.tar.gz
scala-357c6349ec090249cbae5ac616d2a90bb2e2ccf1.tar.bz2
scala-357c6349ec090249cbae5ac616d2a90bb2e2ccf1.zip
The compiler now takes care of its parameter cl...
The compiler now takes care of its parameter class path all by itself.
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/Settings.scala16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/compiler/scala/tools/nsc/Settings.scala b/src/compiler/scala/tools/nsc/Settings.scala
index c27f61b0be..97ca2dac6b 100644
--- a/src/compiler/scala/tools/nsc/Settings.scala
+++ b/src/compiler/scala/tools/nsc/Settings.scala
@@ -7,18 +7,22 @@
package scala.tools.nsc
import java.io.File
-import System.getProperty
class Settings(error: String => unit) {
private var allsettings: List[Setting] = List()
+ private def getProperty(name: String): String =
+ if (System.getProperty(name) != "")
+ System.getProperty(name)
+ else null
+
private val classpathDefault =
alternatePath(
- concatPath(
- getProperty("java.class.path"),
- getProperty("scala.class.path")),
- "")
+ getProperty("env.classpath"),
+ alternatePath(
+ getProperty("scala.class.path"),
+ "."))
private val bootclasspathDefault =
alternatePath(
@@ -58,6 +62,8 @@ class Settings(error: String => unit) {
val noassertions = BooleanSetting("-noassert", "Generate no assertions and assumptions")
val verbose = BooleanSetting("-verbose", "Output messages about what the compiler is doing")
val classpath = StringSetting ("-classpath", "path", "Specify where to find user class files", classpathDefault)
+ // This is a hack: it should really be part of the extension path, but since extension only accepts dirs, I add it to the end of classpath.
+ classpath.value = concatPath(classpath.value, getProperty("scala.ext.path"))
val sourcepath = StringSetting ("-sourcepath", "path", "Specify where to find input source files", "")
val bootclasspath = StringSetting ("-bootclasspath", "path", "Override location of bootstrap class files", bootclasspathDefault)
val extdirs = StringSetting ("-extdirs", "dirs", "Override location of installed extensions", extdirsDefault)