summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIulian Dragos <jaguarul@gmail.com>2007-11-22 17:13:50 +0000
committerIulian Dragos <jaguarul@gmail.com>2007-11-22 17:13:50 +0000
commit3c14e1a07212b73f33f1cede0264ed8260dff534 (patch)
tree44ba8c6423a168c71b1a0f901c36c60ab2c9c117
parenta9a877ea247b0cef7ef814b234e7a7f0610796a2 (diff)
downloadscala-3c14e1a07212b73f33f1cede0264ed8260dff534.tar.gz
scala-3c14e1a07212b73f33f1cede0264ed8260dff534.tar.bz2
scala-3c14e1a07212b73f33f1cede0264ed8260dff534.zip
Made the scalac task return early if there are ...
Made the scalac task return early if there are no sourcefiles to compile (and not create a compile instance and an empty run).
-rw-r--r--src/compiler/scala/tools/ant/Scalac.scala6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/ant/Scalac.scala b/src/compiler/scala/tools/ant/Scalac.scala
index a804c526ff..cee423f944 100644
--- a/src/compiler/scala/tools/ant/Scalac.scala
+++ b/src/compiler/scala/tools/ant/Scalac.scala
@@ -575,8 +575,12 @@ class Scalac extends MatchingTask {
}
/** Performs the compilation. */
- override def execute() = {
+ override def execute() {
val (settings, sourceFiles) = initialize
+ if (sourceFiles.isEmpty) {
+ return
+ }
+
val reporter = new ConsoleReporter(settings)
// Compiles the actual code