summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/ant/sabbus/ScalacFork.scala
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@epfl.ch>2009-03-24 18:10:59 +0000
committerLukas Rytz <lukas.rytz@epfl.ch>2009-03-24 18:10:59 +0000
commite33a70721e4c147bfc316f3e6d1bcd058021805c (patch)
tree678c17440172a5ae08019ae8f9fef13651137394 /src/compiler/scala/tools/ant/sabbus/ScalacFork.scala
parent1d439e0bd0bf099bdcf8bf5891d60f55d57de000 (diff)
downloadscala-e33a70721e4c147bfc316f3e6d1bcd058021805c.tar.gz
scala-e33a70721e4c147bfc316f3e6d1bcd058021805c.tar.bz2
scala-e33a70721e4c147bfc316f3e6d1bcd058021805c.zip
reverting my previous pointless change and movi...
reverting my previous pointless change and moving it to where it makes some sense (ScalacFork)
Diffstat (limited to 'src/compiler/scala/tools/ant/sabbus/ScalacFork.scala')
-rw-r--r--src/compiler/scala/tools/ant/sabbus/ScalacFork.scala14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/ant/sabbus/ScalacFork.scala b/src/compiler/scala/tools/ant/sabbus/ScalacFork.scala
index f70400fea8..e68304d2f5 100644
--- a/src/compiler/scala/tools/ant/sabbus/ScalacFork.scala
+++ b/src/compiler/scala/tools/ant/sabbus/ScalacFork.scala
@@ -32,10 +32,15 @@ class ScalacFork extends MatchingTask with TaskArgs {
jvmArgs = Some(input)
}
+ def setArgfile(input: File) {
+ argfile = Some(input)
+ }
+
private var sourceDir: Option[File] = None
private var failOnError: Boolean = true
private var timeout: Option[Long] = None
private var jvmArgs: Option[String] = None
+ private var argfile: Option[File] = None
override def execute() {
if (compilerPath.isEmpty) error("Mandatory attribute 'compilerpath' is not set.")
@@ -61,9 +66,12 @@ class ScalacFork extends MatchingTask with TaskArgs {
destinationDir.get,
mapper
) map (new File(sourceDir.get, _))
- if (includedFiles.size > 0) {
- log("Compiling "+ includedFiles.size +" file"+
+ if (includedFiles.size > 0 || argfile.isDefined) {
+ if (includedFiles.size > 0)
+ log("Compiling "+ includedFiles.size +" file"+
(if (includedFiles.size > 1) "s" else "") +" to "+ destinationDir.get)
+ if (argfile.isDefined)
+ log("Using argument file: @"+ argfile.get)
val java = new Java(this) // set this as owner
java.setFork(true)
@@ -76,6 +84,8 @@ class ScalacFork extends MatchingTask with TaskArgs {
java.createArg().setValue(arg)
for (file <- includedFiles)
java.createArg().setFile(file)
+ for (af <- argfile)
+ java.createArg().setValue("@"+ af)
log(java.getCommandLine.getCommandline.mkString("", " ", ""), Project.MSG_VERBOSE)
val res = java.executeJava()