SCABBUS now also supports the "print" option.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@4994 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
dubochet 2005-11-30 17:16:11 +00:00
parent 7eb88496c7
commit 141861d4be
3 changed files with 24 additions and 5 deletions

View File

@ -218,7 +218,7 @@
<nsc srcdir="${sources.dir}" destdir="${build.nslib.dir}"
usepredefs="false" debuginfo="${nsc.debuginfo}"
stop="${nsc.stop}" skip="${nsc.skip}" check="${nsc.check}" log="${nsc.log}"
logging="${nsc.logging}">
logging="${nsc.logging}" print="${nsc.print}">
<classpath>
<pathelement location="${build.pico-nslib.dir}"/>
<pathelement location="${build.nslib.dir}"/>
@ -232,7 +232,7 @@
<nsc srcdir="${sources.dir}" destdir="${build.nslib.dir}"
excludesfile="${nsc.nslib.excludes}" debuginfo="${nsc.debuginfo}"
stop="${nsc.stop}" skip="${nsc.skip}" check="${nsc.check}" log="${nsc.log}"
logging="${nsc.logging}">
logging="${nsc.logging}" print="${nsc.print}">
<classpath>
<pathelement location="${build.pico-nslib.dir}"/>
<pathelement location="${build.nslib.dir}"/>
@ -253,7 +253,7 @@
<nsc srcdir="${sources.dir}" destdir="${build.nstools.dir}"
excludesfile="${nsc.nstools.excludes}" debuginfo="${nsc.debuginfo}"
stop="${nsc.stop}" skip="${nsc.skip}" check="${nsc.check}" log="${nsc.log}"
logging="${nsc.logging}">
logging="${nsc.logging}" print="${nsc.print}">
<classpath>
<pathelement location="${build.pico-nslib.dir}"/>
<pathelement location="${build.nslib.dir}"/>

View File

@ -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

View File

@ -52,6 +52,7 @@ package scala.tools.nsc.ant {
* <li>stop,</li>
* <li>skip,</li>
* <li>check,</li>
* <li>print,</li>
* <li>showicode,</li>
* <li>log,</li>
* <li>debuginfo.</li>
@ -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 <code>force</code>.
* Sets the check attribute. Used by Ant.
* @param input The value for <code>check</code>.
*/
def setCheck (input: String) = {
check = List.fromArray(input.split(",")).flatMap(s: String => {
@ -436,6 +439,18 @@ package scala.tools.nsc.ant {
else {error("Phase " + st + " in check does not exist."); Nil}
});
}
/**
* Sets the print attribute. Used by Ant.
* @param input The value for <code>print</code>.
*/
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;