updated Ant build file for testing Scala examples
replaced 'compareTo' by 'compare' in file examples/maps.scala git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@7164 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
parent
78c37b4ab6
commit
fe58ae1267
|
@ -4,8 +4,9 @@
|
|||
<project name="scala-examples" default="build">
|
||||
|
||||
<description>
|
||||
I am SABBUS for ${ant.project.name}, the build system for the Scala compiler and core
|
||||
library. Please check the 'docs/README' file for more information about me.
|
||||
I am SABBUS for ${ant.project.name}, the build system for the Scala compiler
|
||||
and core library. Please check the 'docs/README' file for more information
|
||||
about me.
|
||||
</description>
|
||||
|
||||
<echo level="info" message="Running SABBUS for ${ant.project.name}..."/>
|
||||
|
@ -28,7 +29,6 @@ PROPERTIES
|
|||
<!-- Location of pre-compiled libraries properties -->
|
||||
<property name="scala.lib.jar" value="${lib.dir}/scala-library.jar"/>
|
||||
<property name="scala.comp.jar" value="${lib.dir}/scala-compiler.jar"/>
|
||||
<property name="jaco.jar" value="${lib.dir}/jaco.jar"/>
|
||||
<property name="fjbg.name" value="fjbg.jar"/>
|
||||
<property name="fjbg.jar" value="${lib.dir}/${fjbg.name}"/>
|
||||
<property name="ant.jar" value="${ant.home}/lib/ant.jar"/>
|
||||
|
@ -55,7 +55,7 @@ INITIALISATION
|
|||
</tstamp>
|
||||
<!-- Testing if everything is in place -->
|
||||
<echo level="verbose" message="scala.lib.jar=${scala.lib.jar}"/>
|
||||
<fail message="Scala library in 'lib/' is not available">
|
||||
<fail message="Scala library in '${lib.dir}/' is not available">
|
||||
<condition><not><and>
|
||||
<available
|
||||
classname="scala.Predef"
|
||||
|
@ -72,7 +72,7 @@ INITIALISATION
|
|||
</and></not></condition>
|
||||
</fail>
|
||||
<echo level="verbose" message="scala.comp.jar=${scala.comp.jar}"/>
|
||||
<fail message="Scala compiler in 'lib/' is not available">
|
||||
<fail message="Scala compiler in '${lib.dir}/' is not available">
|
||||
<condition><not>
|
||||
<available
|
||||
classname="scala.tools.ant.Scalac"
|
||||
|
@ -81,7 +81,7 @@ INITIALISATION
|
|||
</not></condition>
|
||||
</fail>
|
||||
<echo level="verbose" message="fjbg.jar=${fjbg.jar}"/>
|
||||
<fail message="FJBG library in 'lib/' is not available">
|
||||
<fail message="FJBG library in '${lib.dir}/' is not available">
|
||||
<condition><not>
|
||||
<available
|
||||
classname="ch.epfl.lamp.fjbg.JCode"
|
||||
|
@ -89,15 +89,9 @@ INITIALISATION
|
|||
/>
|
||||
</not></condition>
|
||||
</fail>
|
||||
<echo level="verbose" message="jaco.jar=${jaco.jar}"/>
|
||||
<fail message="JaCo compiler in 'lib/' is not available">
|
||||
<condition><not>
|
||||
<available classname="jaco.pizza.Main" classpath="${jaco.jar}"/>
|
||||
</not></condition>
|
||||
</fail>
|
||||
<echo level="verbose" message="ant.jar=${ant.jar}"/>
|
||||
<echo level="verbose" message="ant-contrib.jar=${ant-contrib.jar}"/>
|
||||
<fail message="Additional Ant tasks in 'lib/' is not available">
|
||||
<fail message="Additional Ant tasks in '${lib.dir}/' is not available">
|
||||
<condition><not>
|
||||
<available
|
||||
classname="net.sf.antcontrib.AntContribVersion"
|
||||
|
@ -179,9 +173,11 @@ INITIALISATION
|
|||
|
||||
<target name="setup" depends="init">
|
||||
<!-- Creating boot-level tasks -->
|
||||
<taskdef name="scalac"
|
||||
classname="scala.tools.ant.Scalac"
|
||||
classpathref="scala.classpath"/>
|
||||
<taskdef
|
||||
name="scalac"
|
||||
classname="scala.tools.ant.Scalac"
|
||||
classpathref="scala.classpath"
|
||||
/>
|
||||
<property name="init.avail" value="yes"/>
|
||||
</target>
|
||||
|
||||
|
@ -194,8 +190,11 @@ BUILD
|
|||
<echo level="verbose">src.dir=${src.dir}</echo>
|
||||
<pathconvert property="list" pathsep=",">
|
||||
<path>
|
||||
<fileset dir="${src.dir}" includes="examples/*.scala"
|
||||
excludes="${excludes.compile}"/>
|
||||
<fileset
|
||||
dir="${src.dir}"
|
||||
includes="examples/*.scala"
|
||||
excludes="${excludes.compile}"
|
||||
/>
|
||||
</path>
|
||||
<mapper>
|
||||
<globmapper from="${src.dir}/*" to="*"/>
|
||||
|
@ -222,8 +221,11 @@ RUN
|
|||
<target name="run" depends="build">
|
||||
<pathconvert property="list" pathsep=",">
|
||||
<path>
|
||||
<fileset dir="${src.dir}" includes="examples/*.scala"
|
||||
excludes="${excludes.run}"/>
|
||||
<fileset
|
||||
dir="${src.dir}"
|
||||
includes="examples/*.scala"
|
||||
excludes="${excludes.run}"
|
||||
/>
|
||||
</path>
|
||||
<mapper>
|
||||
<globmapper from="${src.dir}/*" to="*"/>
|
||||
|
|
|
@ -157,7 +157,7 @@ object maps {
|
|||
def month = m
|
||||
def day = d
|
||||
|
||||
def compareTo[b >: Date <% Ordered[b]](that: b): int = that match {
|
||||
override def compare [b >: Date <% Ordered[b]](that: b): Int = that match {
|
||||
case other: Date =>
|
||||
if ((year == other.year) &&
|
||||
(month == other.month) &&
|
||||
|
|
Loading…
Reference in New Issue