diff options
author | Paul Phillips <paulp@improving.org> | 2010-02-23 00:27:39 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-02-23 00:27:39 +0000 |
commit | df94b3c5b831e78a056f7b0b5334b1fb8d3c3bd5 (patch) | |
tree | 6be1d68b93045d6a568ac165126d4ed8e11e3fd7 /src/compiler/scala/tools/nsc/Main.scala | |
parent | 8d74992310fe60a1da32606949c96531691754e9 (diff) | |
download | scala-df94b3c5b831e78a056f7b0b5334b1fb8d3c3bd5.tar.gz scala-df94b3c5b831e78a056f7b0b5334b1fb8d3c3bd5.tar.bz2 scala-df94b3c5b831e78a056f7b0b5334b1fb8d3c3bd5.zip |
Some much needed housecleaning regarding system...
Some much needed housecleaning regarding system properties. If you can
possibly resist the temptation, it'd be great if people could try to
go through the properties classes to get and set them, and also to set
property values somewhere fixed rather than using strings directly.
Review by community.
Diffstat (limited to 'src/compiler/scala/tools/nsc/Main.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/Main.scala | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/compiler/scala/tools/nsc/Main.scala b/src/compiler/scala/tools/nsc/Main.scala index 577439990d..4f945733fd 100644 --- a/src/compiler/scala/tools/nsc/Main.scala +++ b/src/compiler/scala/tools/nsc/Main.scala @@ -7,6 +7,7 @@ package scala.tools.nsc import java.io.File +import File.pathSeparator import scala.concurrent.SyncVar @@ -14,6 +15,7 @@ import scala.tools.nsc.interactive.{ RefinedBuildManager, SimpleBuildManager } import scala.tools.nsc.io.AbstractFile import scala.tools.nsc.reporters.{Reporter, ConsoleReporter} import scala.tools.nsc.util.{ BatchSourceFile, FakePos } //{Position} +import Properties.{ versionString, copyrightString, residentPromptString, msilLibPath } /** The main class for NSC, a compiler for the programming * language Scala. @@ -21,10 +23,10 @@ import scala.tools.nsc.util.{ BatchSourceFile, FakePos } //{Position} object Main extends AnyRef with EvalLoop { val versionMsg = "Scala compiler " + - Properties.versionString + " -- " + - Properties.copyrightString + versionString + " -- " + + copyrightString - val prompt = Properties.residentPromptString + val prompt = residentPromptString var reporter: ConsoleReporter = _ @@ -82,12 +84,9 @@ object Main extends AnyRef with EvalLoop { buildManager.update(fileSet(command.files), Set.empty) } } else { - if (command.settings.target.value == "msil") { - val libpath = System.getProperty("msil.libpath") - if (libpath != null) - command.settings.assemrefs.value = - command.settings.assemrefs.value + File.pathSeparator + libpath - } + if (command.settings.target.value == "msil") + msilLibPath foreach (x => command.settings.assemrefs.value += (pathSeparator + x)) + try { val compiler = if (command.settings.Yrangepos.value) new interactive.Global(command.settings, reporter) else new Global(command.settings, reporter) |