blob: 79907f0184bb6e513bf613c6a0b811759d4f3248 (
plain) (
tree)
|
|
<?xml version="1.0" encoding="UTF-8"?>
<project name="sabbus" default="build">
<description>
I am SuperSabbus for Scala core, the fast but simple version of Sabbus.
</description>
<!-- ===========================================================================
END-USER TARGETS
============================================================================ -->
<target name="build" depends="pack.load"
description="Builds the Scala compiler and library. Executables are in 'build/quick/bin'."/>
<target name="clean" depends="quick.clean"
description="Removes binaries of compiler and library. Distributions are untouched."/>
<target name="test" depends="suite.test, stability.test"
description="Runs test suite and bootstrapping test on Scala compiler and library."/>
<target name="docs" depends=""
description="Builds documentation for Scala library. Scaladoc is in 'build/scaladoc'."/>
<target name="docsclean" depends="docs.clean"
description="Removes generated documentation. Distributions are untouched."/>
<target name="dist"
description="Makes a new distribution and tests it. Will remove existing binaries and documentation.">
<antcall target="locker.clean"/>
<antcall target="docs.clean"/>
<antcall target="dist.load">
<param name="dist.expected" value="yes"/>
</antcall>
</target>
<target name="distclean" depends="dists.clean"
description="Removes all distributions. Binaries and documentation are untouched."/>
<target name="newstarr"
description="Replaces the Starr compiler and library by one built from current sources and tests it.">
<antcall target="locker.clean"/>
<antcall target="starr.build"/>
<antcall target="locker.clean"/>
<antcall target="test"/>
</target>
<target name="newlocker"
description="Replaces the Locker compiler and library by one built from current sources.">
<antcall target="locker.clean"/>
<antcall target="locker.build"/>
</target>
<!-- ===========================================================================
PROPERTIES
============================================================================ -->
<property environment="env"/>
<!-- Prevents system classpath from being used -->
<property name="build.sysclasspath" value="ignore"/>
<!-- Defines the repository layout -->
<property name="docs.dir" value="${basedir}/docs"/>
<property name="lib.dir" value="${basedir}/lib"/>
<property name="src.dir" value="${basedir}/src"/>
<property name="test.dir" value="${basedir}/test"/>
<!-- Loads custom properties definitions -->
<property name="properties.file" value="${basedir}/build.properties"/>
<property file="${properties.file}"/>
<!-- Sets location of pre-compiled libraries -->
<property name="lib.starr.jar" value="${lib.dir}/scala-library.jar"/>
<property name="comp.starr.jar" value="${lib.dir}/scala-compiler.jar"/>
<property name="fjbg.jar" value="${lib.dir}/fjbg.jar"/>
<property name="msil.jar" value="${lib.dir}/msil.jar"/>
<property name="jline.jar" value="${lib.dir}/jline.jar"/>
<property name="ant.jar" value="${ant.home}/lib/ant.jar"/>
<property name="ant-contrib.jar" value="${lib.dir}/ant-contrib.jar"/>
<!-- Sets location of build folders -->
<property name="build.dir" value="${basedir}/build"/>
<property name="build-fusrcs.dir" value="${build.dir}/fusrcs"/>
<property name="build-locker.dir" value="${build.dir}/locker"/>
<property name="build-quick.dir" value="${build.dir}/quick"/>
<property name="build-strap.dir" value="${build.dir}/strap"/>
<property name="build-partest.dir" value="${build.dir}/partest"/>
<property name="build-docs.dir" value="${build.dir}/scaladoc"/>
<property name="dists.dir" value="${basedir}/dists"/>
<property name="copyright.string" value="Copyright 2002-2008, LAMP/EPFL"/>
<property name="java.flags" value="-Xmx256M -Xms32M"/>
<!-- ===========================================================================
INITIALISATION
============================================================================ -->
<target name="init">
<!-- Setting-up Ant contrib tasks -->
<taskdef resource="net/sf/antcontrib/antlib.xml"
classpath="${ant-contrib.jar}"/>
<!-- This is the start time for the distribution -->
<tstamp prefix="time">
<format property="human" pattern="d MMMM yyyy, HH:mm:ss"/>
<format property="short" pattern="yyyyMMddHHmmss"/>
</tstamp>
<!-- Find out whether we are running on Windows -->
<condition property="os.win">
<os family="windows"/>
</condition>
<!-- Finding out SVN revision -->
<exec executable="svn" vmlauncher="no" outputproperty="svn.out">
<arg line=" info ${basedir}"/>
</exec>
<propertyregex
property="svn.number" input="${svn.out}" select="\1"
regexp="Revision: ([0-9]+)"
defaultValue="0"/>
<property name="init.avail" value="yes"/>
<!-- Generating version number -->
<property file="${basedir}/build.number"/>
<property
name="version.number"
value="${version.major}.${version.minor}.${version.patch}.r${svn.number}-b${time.short}"/>
<!-- And print-out what we are building -->
<echo level="info" message="Build number is '${version.number}'"/>
<echo level="info" message="Built ${time.human} from revision ${svn.number} with Java ${java.vm.version}"/>
</target>
<!-- ===========================================================================
FUSION JVM 1.5 LIBRARY SOURCES
============================================================================ -->
<target name="files" depends="init">
<!--
<union id="library.files">
<files includes="${src.dir}/library/jvm/jvm1.5/scala/**/*.scala"/>
<difference>
<files includes="${src.dir}/library/jvm/scala/**/*.scala"/>
<files includes="${src.dir}/library/jvm/jvm1.5/scala/**/*.scala"/>
</difference>
<difference>
<files includes="${src.dir}/library/scala/**/*.scala"/>
<files includes="${src.dir}/library/jvm/scala/**/*.scala"/>
<files includes="${src.dir}/library/jvm/jvm1.5/scala/**/*.scala"/>
</difference>
</union>
-->
<mkdir dir="${build-fusrcs.dir}/scala"/>
<sync toDir="${build-fusrcs.dir}/scala" failonerror="false">
<fileset dir="${src.dir}/library/jvm/jvm1.5/scala"/>
<difference>
<fileset dir="${src.dir}/library/jvm/scala"/>
<fileset dir="${src.dir}/library/jvm/jvm1.5/scala"/>
</difference>
<difference>
<fileset dir="${src.dir}/library/scala"/>
<fileset dir="${src.dir}/library/jvm/scala"/>
<fileset dir="${src.dir}/library/jvm/jvm1.5/scala"/>
</difference>
</sync>
</target>
<!-- ===========================================================================
LOAD STABLE REFERENCE (STARR) LAYER
============================================================================ -->
<target name="starr.load" depends="files">
<path id="starr.classpath">
<pathelement location="${lib.starr.jar}"/>
<pathelement location="${comp.starr.jar}"/>
<pathelement location="${lib.dir}/sabbus.jar"/>
<pathelement location="${fjbg.jar}"/>
<pathelement location="${ant.jar}"/>
</path>
<taskdef resource="scala/tools/ant/sabbus/antlib.xml" classpathref="starr.classpath"/>
</target>
<!-- ===========================================================================
BUILD LOCAL REFERENCE (LOCKER) LAYER
============================================================================ -->
<target name="locker.init" depends="starr.load">
<condition property="locker.available">
<available file="${build-locker.dir}/build.complete"/>
</condition>
</target>
<target name="locker.build" depends="locker.init" unless="locker.available">
<stopwatch name="locker.timer"/>
<!-- Build library -->
<mkdir dir="${build-locker.dir}/classes/library"/>
<javac
srcdir="${build-fusrcs.dir}/scala"
destdir="${build-locker.dir}/classes/library"
classpath="${build-locker.dir}/classes/library"
includes="**/*.java"/>
<sabmake id="starr.lib.scalac"
destdir="${build-locker.dir}/classes/library"
compilerpathref="starr.classpath"
srcpath="${build-fusrcs.dir}">
<compilationpath>
<pathelement location="${build-locker.dir}/classes/library"/>
</compilationpath>
</sabmake>
<sabuse id="starr.lib.scalac" srcdir="${build-fusrcs.dir}">
<include name="scala/Predef.scala"/>
</sabuse>
<sabuse id="starr.lib.scalac" srcdir="${build-fusrcs.dir}">
<include name="**/*.scala"/>
<exclude name="scala/Predef.scala"/>
<exclude name="scala/dbc/**"/>
<exclude name="scala/actors/**"/>
</sabuse>
<propertyfile file="${build-locker.dir}/classes/library/library.properties">
<entry key="version.number" value="${version.number}"/>
<entry key="copyright.string" value="${copyright.string}"/>
</propertyfile>
<copy todir="${build-locker.dir}/classes/library">
<fileset dir="${build-fusrcs.dir}">
<include name="**/*.tmpl"/>
<include name="**/*.xml"/>
<include name="**/*.js"/>
<include name="**/*.css"/>
</fileset>
</copy>
<sabbreak id="starr.lib.scalac"/>
<!-- Build compiler -->
<mkdir dir="${build-locker.dir}/classes/compiler"/>
<sabmake id="starr.comp.scalac"
destdir="${build-locker.dir}/classes/compiler"
compilerpathref="starr.classpath"
srcpath="${src.dir}/compiler">
<compilationpath>
<pathelement location="${build-locker.dir}/classes/library"/>
<pathelement location="${build-locker.dir}/classes/compiler"/>
<pathelement location="${fjbg.jar}"/>
<pathelement location="${msil.jar}"/>
<pathelement location="${jline.jar}"/>
<pathelement location="${ant.jar}"/>
</compilationpath>
</sabmake>
<sabuse id="starr.comp.scalac" srcdir="${src.dir}/compiler">
<include name="**/*.scala"/>
</sabuse>
<propertyfile file="${build-locker.dir}/classes/compiler/compiler.properties">
<entry key="version.number" value="${version.number}"/>
<entry key="copyright.string" value="${copyright.string}"/>
</propertyfile>
<copy todir="${build-locker.dir}/classes/compiler">
<fileset dir="${src.dir}/compiler">
<include name="**/*.tmpl"/>
<include name="**/*.xml"/>
<include name="**/*.js"/>
<include name="**/*.css"/>
</fileset>
</copy>
<sabbreak id="starr.comp.scalac"/>
<!-- Timing the build -->
<touch file="${build-locker.dir}/build.complete" verbose="no"/>
<stopwatch name="locker.timer" action="total"/>
</target>
<target name="locker.load" depends="locker.build">
<path id="locker.classpath">
<pathelement location="${build-locker.dir}/classes/library"/>
<pathelement location="${build-locker.dir}/classes/compiler"/>
<pathelement location="${fjbg.jar}"/>
<pathelement location="${ant.jar}"/>
</path>
</target>
<!-- ===========================================================================
BUILD QUICK LAYER
============================================================================ -->
<target name="quick.init" depends="locker.load">
<uptodate property="quick.available" targetfile="${build-quick.dir}/build.complete">
<srcfiles dir="${src.dir}">
<include name="library/**"/>
<include name="compiler/**"/>
<include name="dbc/**"/>
<include name="actors/**"/>
</srcfiles>
</uptodate>
</target>
<target name="quick.build" depends="quick.init" unless="quick.available">
<stopwatch name="quick.timer"/>
<!-- Build library -->
<mkdir dir="${build-quick.dir}/classes/library"/>
<javac
srcdir="${build-fusrcs.dir}/scala"
destdir="${build-quick.dir}/classes/library"
classpath="${build-quick.dir}/classes/library"
includes="**/*.java"/>
<javac
srcdir="${src.dir}/actors"
destdir="${build-quick.dir}/classes/library"
classpath="${build-quick.dir}/classes/library"
includes="**/*.java"/>
<sabmake id="locker.lib.scalac"
destdir="${build-quick.dir}/classes/library"
compilerpathref="locker.classpath"
srcpath="${build-fusrcs.dir}">
<compilationpath>
<pathelement location="${build-quick.dir}/classes/library"/>
</compilationpath>
</sabmake>
<sabuse id="locker.lib.scalac" srcdir="${build-fusrcs.dir}">
<include name="scala/Predef.scala"/>
</sabuse>
<sabuse id="locker.lib.scalac" srcdir="${build-fusrcs.dir}">
<include name="**/*.scala"/>
<exclude name="scala/Predef.scala"/>
</sabuse>
<sabuse id="locker.lib.scalac" srcdir="${src.dir}/actors">
<include name="**/*.scala"/>
</sabuse>
<sabuse id="locker.lib.scalac" srcdir="${src.dir}/dbc">
<include name="**/*.scala"/>
</sabuse>
<propertyfile file="${build-quick.dir}/classes/library/library.properties">
<entry key="version.number" value="${version.number}"/>
<entry key="copyright.string" value="${copyright.string}"/>
</propertyfile>
<copy todir="${build-quick.dir}/classes/library">
<fileset dir="${build-fusrcs.dir}">
<include name="**/*.tmpl"/>
<include name="**/*.xml"/>
<include name="**/*.js"/>
<include name="**/*.css"/>
</fileset>
</copy>
<sabbreak id="locker.lib.scalac"/>
<!-- Build compiler -->
<mkdir dir="${build-quick.dir}/classes/compiler"/>
<sabmake id="locker.comp.scalac"
destdir="${build-quick.dir}/classes/compiler"
compilerpathref="locker.classpath"
srcpath="${src.dir}/compiler">
<compilationpath>
<pathelement location="${build-quick.dir}/classes/library"/>
<pathelement location="${build-quick.dir}/classes/compiler"/>
<pathelement location="${fjbg.jar}"/>
<pathelement location="${msil.jar}"/>
<pathelement location="${jline.jar}"/>
<pathelement location="${ant.jar}"/>
</compilationpath>
</sabmake>
<sabuse id="locker.comp.scalac" srcdir="${src.dir}/compiler">
<include name="**/*.scala"/>
</sabuse>
<propertyfile file="${build-quick.dir}/classes/compiler/compiler.properties">
<entry key="version.number" value="${version.number}"/>
<entry key="copyright.string" value="${copyright.string}"/>
</propertyfile>
<copy todir="${build-quick.dir}/classes/compiler">
<fileset dir="${src.dir}/compiler">
<include name="**/*.tmpl"/>
<include name="**/*.xml"/>
<include name="**/*.js"/>
<include name="**/*.css"/>
</fileset>
</copy>
<sabbreak id="locker.comp.scalac"/>
<!-- Timing the build -->
<touch file="${build-quick.dir}/build.complete" verbose="no"/>
<stopwatch name="quick.timer" action="total"/>
</target>
<target name="quick.load" depends="quick.build">
<path id="quick.classpath">
<pathelement location="${build-quick.dir}/classes/library"/>
<pathelement location="${build-quick.dir}/classes/compiler"/>
<pathelement location="${fjbg.jar}"/>
<pathelement location="${ant.jar}"/>
</path>
<taskdef resource="scala/tools/ant/antlib.xml" classpathref="quick.classpath"/>
</target>
<!-- ===========================================================================
BUILD STRAP LAYER
============================================================================ -->
<target name="strap.init" depends="quick.load">
<uptodate property="strap.available" targetfile="${build-strap.dir}/build.complete">
<srcfiles dir="${src.dir}">
<include name="library/**"/>
<include name="compiler/**"/>
<include name="dbc/**"/>
<include name="actors/**"/>
</srcfiles>
</uptodate>
</target>
<target name="strap.build" depends="strap.init" unless="strap.available">
<stopwatch name="strap.timer"/>
<!-- Build library -->
<mkdir dir="${build-strap.dir}/classes/library"/>
<javac
srcdir="${build-fusrcs.dir}/scala"
destdir="${build-strap.dir}/classes/library"
classpath="${build-strap.dir}/classes/library"
includes="**/*.java"/>
<javac
srcdir="${src.dir}/actors"
destdir="${build-strap.dir}/classes/library"
classpath="${build-strap.dir}/classes/library"
includes="**/*.java"/>
<sabmake id="quick.lib.scalac"
destdir="${build-strap.dir}/classes/library"
compilerpathref="quick.classpath"
srcpath="${build-fusrcs.dir}">
<compilationpath>
<pathelement location="${build-strap.dir}/classes/library"/>
</compilationpath>
</sabmake>
<sabuse id="quick.lib.scalac" srcdir="${build-fusrcs.dir}">
<include name="scala/Predef.scala"/>
</sabuse>
<sabuse id="quick.lib.scalac" srcdir="${build-fusrcs.dir}">
<include name="**/*.scala"/>
<exclude name="scala/Predef.scala"/>
</sabuse>
<sabuse id="quick.lib.scalac" srcdir="${src.dir}/actors">
<include name="**/*.scala"/>
</sabuse>
<sabuse id="quick.lib.scalac" srcdir="${src.dir}/dbc">
<include name="**/*.scala"/>
</sabuse>
<propertyfile file="${build-strap.dir}/classes/library/library.properties">
<entry key="version.number" value="${version.number}"/>
<entry key="copyright.string" value="${copyright.string}"/>
</propertyfile>
<copy todir="${build-strap.dir}/classes/library">
<fileset dir="${build-fusrcs.dir}">
<include name="**/*.tmpl"/>
<include name="**/*.xml"/>
<include name="**/*.js"/>
<include name="**/*.css"/>
</fileset>
</copy>
<sabbreak id="quick.lib.scalac"/>
<!-- Build compiler -->
<mkdir dir="${build-strap.dir}/classes/compiler"/>
<sabmake id="quick.comp.scalac"
destdir="${build-strap.dir}/classes/compiler"
compilerpathref="quick.classpath"
srcpath="${src.dir}/compiler">
<compilationpath>
<pathelement location="${build-strap.dir}/classes/library"/>
<pathelement location="${build-strap.dir}/classes/compiler"/>
<pathelement location="${fjbg.jar}"/>
<pathelement location="${msil.jar}"/>
<pathelement location="${jline.jar}"/>
<pathelement location="${ant.jar}"/>
</compilationpath>
</sabmake>
<sabuse id="quick.comp.scalac" srcdir="${src.dir}/compiler">
<include name="**/*.scala"/>
</sabuse>
<propertyfile file="${build-strap.dir}/classes/compiler/compiler.properties">
<entry key="version.number" value="${version.number}"/>
<entry key="copyright.string" value="${copyright.string}"/>
</propertyfile>
<copy todir="${build-strap.dir}/classes/compiler">
<fileset dir="${src.dir}/compiler">
<include name="**/*.tmpl"/>
<include name="**/*.xml"/>
<include name="**/*.js"/>
<include name="**/*.css"/>
</fileset>
</copy>
<sabbreak id="quick.comp.scalac"/>
<!-- Timing the build -->
<touch file="${build-strap.dir}/build.complete" verbose="no"/>
<stopwatch name="strap.timer" action="total"/>
</target>
<target name="strap.load" depends="strap.build"/>
<!-- ===========================================================================
BUILD PARTEST
============================================================================ -->
<target name="partest.init" depends="quick.load">
<uptodate property="partest.available" targetfile="${build-partest.dir}/build.complete">
<srcfiles dir="${src.dir}/partest"/>
</uptodate>
</target>
<target name="partest.build" depends="partest.init" unless="partest.available">
<mkdir dir="${build-partest.dir}/classes"/>
<javac
srcdir="${src.dir}/partest"
destdir="${build-partest.dir}/classes">
<classpath>
<path refid="quick.classpath"/>
<pathelement location="${build-partest.dir}/classes"/>
</classpath>
<include name="**/*.java"/>
</javac>
<scalac
srcdir="${src.dir}/partest"
destdir="${build-partest.dir}/classes">
<classpath>
<path refid="quick.classpath"/>
<pathelement location="${build-partest.dir}/classes"/>
</classpath>
<include name="**/*.scala"/>
</scalac>
<copy todir="${build-partest.dir}/classes">
<fileset dir="${src.dir}/partest">
<include name="**/*.xml"/>
</fileset>
</copy>
<touch file="${build-partest.dir}/build.complete" verbose="no"/>
</target>
<target name="partest.load" depends="partest.build"/>
<!-- ===========================================================================
MAKE MODEL DISTRIBUTION
============================================================================ -->
<target name="pack.init" depends="quick.load, partest.load">
<uptodate property="pack.available" targetfile="${build-quick.dir}/pack.complete">
<srcfiles dir="${build.dir}">
<include name="*/build.complete"/>
</srcfiles>
</uptodate>
</target>
<target name="pack.build" depends="pack.init" unless="pack.available">
<!-- Packages libraries -->
<mkdir dir="${build-quick.dir}/lib"/>
<jar destfile="${build-quick.dir}/lib/scala-library.jar">
<fileset dir="${build-quick.dir}/classes/library">
<exclude name="scala/dbc/**"/>
</fileset>
</jar>
<jar destfile="${build-quick.dir}/lib/scala-dbc.jar">
<fileset dir="${build-quick.dir}/classes/library">
<include name="scala/dbc/**"/>
</fileset>
</jar>
<jar destfile="${build-quick.dir}/lib/scala-compiler.jar">
<fileset dir="${build-quick.dir}/classes/compiler"/>
<zipfileset src="${fjbg.jar}"/>
<zipfileset src="${msil.jar}"/>
</jar>
<jar destfile="${build-quick.dir}/lib/scala-partest.jar">
<fileset dir="${build-partest.dir}/classes"/>
</jar>
<!-- Make executables -->
<mkdir dir="${build-quick.dir}/bin"/>
<scalatool
file="${build-quick.dir}/bin/scala"
name="Scala code runner"
class="scala.tools.nsc.MainGenericRunner"
version="${version.number}"
copyright="${copyright.string}"
javaFlags="${java.flags}"/>
<scalatool
file="${build-quick.dir}/bin/scalac"
name="Scala compiler"
class="scala.tools.nsc.Main"
version="${version.number}"
copyright="${copyright.string}"
javaFlags="${java.flags}"/>
<scalatool
file="${build-quick.dir}/bin/scaladoc"
name="Scala doc generator"
class="scala.tools.nsc.Scaladoc"
version="${version.number}"
copyright="${copyright.string}"
javaFlags="${java.flags}"/>
<scalatool
file="${build-quick.dir}/bin/fsc"
name="Fast Scala compiler"
class="scala.tools.nsc.CompileClient"
version="${version.number}"
copyright="${copyright.string}"
javaFlags="${java.flags}"/>
<chmod perm="ugo+rx" file="${build-quick.dir}/bin/scala"/>
<chmod perm="ugo+rx" file="${build-quick.dir}/bin/scalac"/>
<chmod perm="ugo+rx" file="${build-quick.dir}/bin/scaladoc"/>
<chmod perm="ugo+rx" file="${build-quick.dir}/bin/fsc"/>
<!-- Point to latest -->
<touch file="${build-quick.dir}/pack.complete" verbose="no"/>
</target>
<target name="pack.load" depends="pack.build">
<path id="pack.classpath">
<pathelement location="${build-quick.dir}/lib/scala-library.jar"/>
<pathelement location="${build-quick.dir}/lib/scala-compiler.jar"/>
<pathelement location="${build-quick.dir}/lib/scala-partest.jar"/>
<pathelement location="${ant.jar}"/>
</path>
</target>
<!-- ===========================================================================
BUILD DOCUMENTATION
============================================================================ -->
<target name="docs.init" depends="quick.load">
<uptodate property="docs.available" targetfile="${build-docs.dir}/build.complete">
<srcfiles dir="${src.dir}">
<include name="library/**"/>
<include name="dbc/**"/>
<include name="actors/**"/>
</srcfiles>
</uptodate>
</target>
<target name="docs.build" depends="docs.init" unless="docs.available">
<stopwatch name="docs.timer"/>
<mkdir dir="${build-docs.dir}"/>
<scaladoc
destdir="${build-docs.dir}"
windowtitle="Scala Library"
doctitle="Scala ${version.number} API"
classpathref="quick.classpath">
<src>
<files includes="${src.dir}/dbc"/>
<files includes="${src.dir}/actors"/>
<files includes="${build-fusrcs.dir}"/>
</src>
<include name="**/*.scala"/>
</scaladoc>
<touch file="${build-docs.dir}/build.complete" verbose="no"/>
<stopwatch name="docs.timer" action="total"/>
</target>
<target name="docs.load" depends="docs.build"/>
<!-- ===========================================================================
BOOTRAPING TEST AND TEST SUITE
============================================================================ -->
<target name="stability.test" depends="strap.load">
<same dir="${build-quick.dir}" todir="${build-strap.dir}" failondifferent="no">
<exclude name="**/*.properties"/>
<exclude name="bin/**"/>
<exclude name="lib/**"/>
<exclude name="pack.complete"/>
</same>
</target>
<target name="suite.test" depends="partest.load, pack.load">
<taskdef resource="scala/tools/partest/antlib.xml" classpathref="pack.classpath"/>
<partest showlog="yes" erroronfailed="yes">
<classpath>
<path refid="pack.classpath"/>
<fileset dir="${test.dir}/files/lib" includes="*.jar"/>
</classpath>
<postests dir="${test.dir}/files/pos" includes="*.scala"/>
<negtests dir="${test.dir}/files/neg" includes="*.scala"/>
<runtests dir="${test.dir}/files">
<include name="run/**/*.scala"/>
<include name="jvm/**/*.scala"/>
<include name="jvm5/**/*.scala"/>
</runtests>
<residenttests dir="${test.dir}/files/res" includes="*.res"/>
</partest>
</target>
<!-- ===========================================================================
MAKE SABBUS JAR (to remove once sabbus is part of starr library)
============================================================================ -->
<target name="sabbus.build" depends="starr.load">
<taskdef resource="scala/tools/ant/antlib.xml" classpathref="starr.classpath"/>
<mkdir dir="${build.dir}/sabbus"/>
<scalac
srcdir="${src.dir}/compiler/scala/tools/ant/sabbus/"
destdir="${build.dir}/sabbus">
<include name="*.scala"/>
<classpath>
<pathelement location="${lib.starr.jar}"/>
<pathelement location="${comp.starr.jar}"/>
<pathelement location="${ant.jar}"/>
</classpath>
</scalac>
<copy
file="${src.dir}/compiler/scala/tools/ant/sabbus/antlib.xml"
todir="${build.dir}/sabbus/scala/tools/ant/sabbus"/>
<jar
destfile="${lib.dir}/sabbus.jar"
basedir="${build.dir}/sabbus"/>
</target>
<target name="sabbus.load" depends="sabbus.build"/>
<!-- ===========================================================================
MAKE ACTUAL DISTRIBUTION
============================================================================ -->
<target name="dist.init" depends="docs.load, pack.load"/>
<target name="dist.build" depends="dist.init" unless="dist.available">
<property name="dist.dir" value="${dists.dir}/scala-${version.number}"/>
<!-- Copy model -->
<mkdir dir="${dist.dir}/lib"/>
<copy toDir="${dist.dir}/lib">
<fileset dir="${build-quick.dir}/lib"/>
</copy>
<mkdir dir="${dist.dir}/bin"/>
<copy toDir="${dist.dir}/bin">
<fileset dir="${build-quick.dir}/bin"/>
</copy>
<chmod perm="ugo+rx" file="${dist.dir}/bin/scala"/>
<chmod perm="ugo+rx" file="${dist.dir}/bin/scalac"/>
<chmod perm="ugo+rx" file="${dist.dir}/bin/scaladoc"/>
<chmod perm="ugo+rx" file="${dist.dir}/bin/fsc"/>
<!-- Packages doc -->
<mkdir dir="${dist.dir}/doc/api"/>
<copy toDir="${dist.dir}/doc/api">
<fileset dir="${build-docs.dir}"/>
</copy>
<!-- Packages source -->
<mkdir dir="${dist.dir}/src"/>
<jar destfile="${dist.dir}/src/scala-library-src.jar">
<fileset dir="${build-fusrcs.dir}"/>
<fileset dir="${src.dir}/actors"/>
</jar>
<jar destfile="${dist.dir}/src/scala-dbc-src.jar">
<fileset dir="${src.dir}/dbc"/>
</jar>
<jar destfile="${dist.dir}/src/scala-compiler-src.jar">
<fileset dir="${src.dir}/compiler"/>
</jar>
</target>
<target name="dist.latest" depends="dist.build" unless="os.win">
<symlink link="${dists.dir}/latest" resource="${dist.dir}" overwrite="yes"/>
</target>
<target name="dist.load" depends="stability.test, suite.test, dist.latest"/>
<!-- ===========================================================================
MAKE NEW STARR
============================================================================ -->
<target name="starr.init" depends="pack.load"/>
<target name="starr.build" depends="starr.init">
<delete file="${lib.starr.jar}"/>
<delete file="${comp.starr.jar}"/>
<delete file="${lib.dir}/scala-library-src.jar"/>
<copy file="${build-quick.dir}/lib/scala-library.jar" toFile="${lib.starr.jar}"/>
<copy file="${build-quick.dir}/lib/scala-compiler.jar" toFile="${comp.starr.jar}"/>
<jar destfile="${lib.dir}/scala-library-src.jar">
<fileset dir="${build-fusrcs.dir}"/>
<fileset dir="${src.dir}/actors"/>
</jar>
</target>
<!-- ===========================================================================
CLEAN
============================================================================ -->
<target name="locker.clean" depends="fusrcs.clean">
<delete dir="${build-locker.dir}" includeemptydirs="yes" quiet="yes" failonerror="no"/>
</target>
<target name="fusrcs.clean" depends="quick.clean">
<delete dir="${build-fusrcs.dir}" includeemptydirs="yes" quiet="yes" failonerror="no"/>
</target>
<target name="quick.clean" depends="strap.clean, partest.clean">
<delete dir="${build-quick.dir}" includeemptydirs="yes" quiet="yes" failonerror="no"/>
</target>
<target name="strap.clean">
<delete dir="${build-strap.dir}" includeemptydirs="yes" quiet="yes" failonerror="no"/>
</target>
<target name="partest.clean">
<delete dir="${build-partest.dir}" includeemptydirs="yes" quiet="yes" failonerror="no"/>
</target>
<target name="docs.clean">
<delete dir="${build-docs.dir}" includeemptydirs="yes" quiet="yes" failonerror="no"/>
</target>
<target name="dists.clean">
<delete dir="${dists.dir}" includeemptydirs="yes" quiet="yes" failonerror="no"/>
</target>
</project>
|