From 89c583a548bfa2c113cb5bff5668895107bee70e Mon Sep 17 00:00:00 2001 From: Gilles Dubochet Date: Wed, 30 Nov 2005 17:16:11 +0000 Subject: SCABBUS now also supports the "print" option. --- build.xml | 6 +++--- config/build.default.properties | 3 +++ sources/scala/tools/nsc/ant/NSC.scala | 20 ++++++++++++++++++-- 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/build.xml b/build.xml index dff7ed2455..374b8a2c0e 100644 --- a/build.xml +++ b/build.xml @@ -218,7 +218,7 @@ + logging="${nsc.logging}" print="${nsc.print}"> @@ -232,7 +232,7 @@ + logging="${nsc.logging}" print="${nsc.print}"> @@ -253,7 +253,7 @@ + logging="${nsc.logging}" print="${nsc.print}"> diff --git a/config/build.default.properties b/config/build.default.properties index f803b45862..356c664615 100644 --- a/config/build.default.properties +++ b/config/build.default.properties @@ -28,6 +28,9 @@ nsc.log= # consistency. nsc.check= +# A comma-separated list of compile phases that NSC should print. +nsc.print= + # The name of a file that lists files that should be excluded when building # the new Scala library. This file MUST EXIST. nsc.nslib.excludes=${config.dir}/excludes/nsc.nslib.excludes diff --git a/sources/scala/tools/nsc/ant/NSC.scala b/sources/scala/tools/nsc/ant/NSC.scala index 008958857c..3502a01e37 100644 --- a/sources/scala/tools/nsc/ant/NSC.scala +++ b/sources/scala/tools/nsc/ant/NSC.scala @@ -52,6 +52,7 @@ package scala.tools.nsc.ant { *
  • stop,
  • *
  • skip,
  • *
  • check,
  • + *
  • print,
  • *
  • showicode,
  • *
  • log,
  • *
  • debuginfo.
  • @@ -133,6 +134,8 @@ package scala.tools.nsc.ant { private var logPhase: List[String] = Nil; /** Which compilation phases results should be checked for consistency. */ private var check: List[String] = Nil; + /** Which compilation phases results should be printed-out. */ + private var print: List[String] = Nil; /** Print ICode files along with class files (debug option). */ private var showICode: Boolean = false; @@ -426,8 +429,8 @@ package scala.tools.nsc.ant { } /** - * Sets the force attribute. Used by Ant. - * @param input The value for force. + * Sets the check attribute. Used by Ant. + * @param input The value for check. */ def setCheck (input: String) = { check = List.fromArray(input.split(",")).flatMap(s: String => { @@ -437,6 +440,18 @@ package scala.tools.nsc.ant { }); } + /** + * Sets the print attribute. Used by Ant. + * @param input The value for print. + */ + def setPrint (input: String) = { + print = List.fromArray(input.split(",")).flatMap(s: String => { + val st = s.trim(); + if (CompilerPhase.isPermissible(st)) (if (input != "") List(st) else Nil) + else {error("Phase " + st + " in print does not exist."); Nil} + }); + } + def setShowicode(input: Boolean): Unit = showICode = input; @@ -598,6 +613,7 @@ package scala.tools.nsc.ant { if (!stop.isEmpty) settings.stop.value = List(stop.get); if (!skip.isEmpty) settings.skip.value = skip; if (!check.isEmpty) settings.check.value = check; + if (!print.isEmpty) settings.print.value = print; settings.Xshowicode.value = showICode; settings.debuginfo.value = debugInfo; if (!logPhase.isEmpty) settings.log.value = logPhase; -- cgit v1.2.3