Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

2165 lines (1945 sloc) 87.706 kb
<?xml version="1.0" encoding="UTF-8"?>
<project name="sabbus" default="build">
<description>
SuperSabbus for Scala core, builds the scala library and compiler. It can also package it as a simple distribution, tests it for stable bootstrapping and against the Scala test suite.
</description>
<!-- ===========================================================================
END-USER TARGETS
============================================================================ -->
<target name="build" depends="pack.done"
description="Builds the Scala compiler and library. Executables are in 'build/pack/bin'."/>
<target name="build-opt"
description="Builds the optimised Scala compiler and library. Executables are in 'build/pack/bin'.">
<antcall target="build">
<param name="scalac.args.optimise" value="-optimise"/>
</antcall>
</target>
<target name="clean" depends="quick.clean"
description="Removes binaries of compiler and library. Distributions are untouched."/>
<target name="test" depends="test.done"
description="Runs test suite and bootstrapping test on Scala compiler and library."/>
<target name="test-opt"
description="Runs test suite and bootstrapping test, everything is optimised (compiler, library, tests).">
<antcall target="test">
<param name="scalac.args.optimise" value="-optimise"/>
</antcall>
</target>
<target name="docs" depends="docs.done"
description="Builds documentation for the Scala library. Scaladoc is in 'build/scaladoc/library'."/>
<target name="docscomp" depends="docs.comp"
description="Builds documentation for the Scala compiler and 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="all.done"/>
</target>
<target name="dist-opt"
description="Makes a new optimised distribution and tests it. Will remove existing binaries and documentation.">
<antcall target="dist">
<param name="scalac.args.optimise" value="-optimise"/>
</antcall>
</target>
<target name="fastdist" depends="dist.done"
description="Makes a new distribution without testing it or removing partially build elements."/>
<target name="fastdist-opt"
description="Makes a new optimised distribution without testing it or removing partially build elements.">
<antcall target="fastdist">
<param name="scalac.args.optimise" value="-optimise"/>
</antcall>
</target>
<target name="distclean" depends="dist.clean"
description="Removes all distributions. Binaries and documentation are untouched."/>
<target name="replacestarr"
description="Replaces the Starr compiler and library by fresh ones built from current sources and tests them.">
<fail message="This target is not available on Windows. Use 'ant replacestarrwin' instead.">
<condition>
<os family="windows"/>
</condition>
</fail>
<antcall target="locker.clean"/>
<antcall target="pack.done"/>
<antcall target="starr.done"/>
<antcall target="locker.clean"/>
<antcall target="test.done"/>
</target>
<target name="replacestarr-opt"
description="Replaces the Starr compiler and library by fresh, optimised ones built from current sources and tests them.">
<antcall target="replacestarr">
<param name="scalac.args.optimise" value="-optimise"/>
</antcall>
</target>
<!-- Ant on Windows is not able to delete jar files that are referenced in any <path>.
See ticket 1290 on trac. -->
<target name="replacestarrwin"
description="Creates a new Starr on Windows. Manually execute 'ant locker.clean build' first!">
<fail message="This target is only available on Windows. Use 'ant replacestarr' instead.">
<condition>
<not><os family="windows"/></not>
</condition>
</fail>
<echo message="CAUTION: Make sure to execute 'ant locker.clean build' prior to calling 'replacestarrwin'."/>
<antcall target="starr.done"/>
<antcall target="locker.clean"/>
<antcall target="test.done"/>
</target>
<target name="replacelocker"
description="Replaces the Locker compiler and library by fresh ones built from current sources.">
<antcall target="palo.clean"/>
<antcall target="unlocklocker"/>
</target>
<target name="replacelocker-opt"
description="Replaces the Locker compiler and library by fresh, optimised ones built from current sources.">
<antcall target="replacelocker">
<param name="scalac.args.optimise" value="-optimise"/>
</antcall>
</target>
<target name="unlocklocker"
description="Unlocks Locker, allowing its compiler and library to be rebuilt">
<antcall target="locker.unlock"/>
<antcall target="palo.done"/>
</target>
<target name="newlibs"
description="Requires libraries (MSIL, FJBG) to be rebuilt. Add this target before any other if class file format is incompatible.">
<property name="libs.outdated" value="yes"/>
</target>
<target name="newforkjoin"
description="Requires forkjoin library to be rebuilt. Add this target before any other if class file format is incompatible.">
<property name="forkjoin.outdated" value="yes"/>
</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="lib-ant.dir" value="${lib.dir}/ant"/>
<property name="src.dir" value="${basedir}/src"/>
<property name="partest.dir" value="${basedir}/test"/>
<!-- For developers: any jars placed in this dir will be added to the classpath
of all targets and copied into quick/pack/etc builds. -->
<property name="lib-extra.dir" value="${lib.dir}/extra"/>
<!-- Loads custom properties definitions -->
<property file="${basedir}/build.properties"/>
<!-- Generating version number -->
<property file="${basedir}/build.number"/>
<!-- Additional command line arguments for scalac. They are added to all build targets -->
<property name="scalac.args" value=""/>
<property name="javac.args" value=""/>
<!-- 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="jline.jar" value="${lib.dir}/jline.jar"/>
<property name="ant.jar" value="${ant.home}/lib/ant.jar"/>
<property name="scalacheck.jar" value="${lib.dir}/scalacheck.jar"/>
<!-- Sets location of build folders -->
<property name="build.dir" value="${basedir}/build"/>
<property name="build-locker.dir" value="${build.dir}/locker"/>
<property name="build-palo.dir" value="${build.dir}/palo"/>
<property name="build-quick.dir" value="${build.dir}/quick"/>
<property name="build-pack.dir" value="${build.dir}/pack"/>
<property name="build-strap.dir" value="${build.dir}/strap"/>
<property name="build-docs.dir" value="${build.dir}/scaladoc"/>
<property name="build-libs.dir" value="${build.dir}/libs"/>
<property name="dists.dir" value="${basedir}/dists"/>
<property name="copyright.string" value="Copyright 2002-2011, LAMP/EPFL"/>
<property name="partest.version.number" value="0.9.2"/>
<!-- These are NOT the flags used to run SuperSabbus, but the ones written
into the script runners created with scala.tools.ant.ScalaTool -->
<property name="java.flags" value="-Xmx256M -Xms32M"/>
<property name="jvm.opts" value=""/>
<!-- if ANT_OPTS is already set by the environment, it will be unaltered,
but if it is unset it will take this default value. -->
<property name="env.ANT_OPTS" value="-Xms1536M -Xmx1536M -Xss1M -XX:MaxPermSize=192M -XX:+UseParallelGC" />
<!-- to find max heap usage: -Xaprof ; currently at 980M for locker.comp -->
<echo message="Forking with JVM opts: ${env.ANT_OPTS} ${jvm.opts}" />
<property
name="scalacfork.jvmargs"
value="${env.ANT_OPTS} ${jvm.opts}"/>
<!-- ===========================================================================
INITIALISATION
============================================================================ -->
<condition property="starr.absent">
<not><available file="${lib.dir}/scala-library.jar"/></not>
</condition>
<target name="init.starr" if="starr.absent">
<echo level="warn" message="Downloading bootstrap libs. (To do this by hand, run ./pull-binary-libs.sh)"/>
<exec osfamily="unix" vmlauncher="false" executable="./pull-binary-libs.sh" failifexecutionfails="true" />
<exec osfamily="windows" vmlauncher="false" executable="pull-binary-libs.sh" failifexecutionfails="true" />
</target>
<!-- Determines OSGi string + maven extension. -->
<target name="init.hasbuildnum">
<condition property="version.hasbuildnum">
<not><equals arg1="${version.bnum}" arg2="0"/></not>
</condition>
</target>
<target name="init.build.snapshot" unless="build.release">
<property name="maven.version.suffix" value="-SNAPSHOT"/>
</target>
<target name="init.build.release" if="build.release" depends="init.hasbuildnum, init.build.snapshot">
<property name="maven.version.suffix" value=""/>
</target>
<target name="init.build.nopatch.release" unless="version.hasbuildnum" depends="init.hasbuildnum">
<property name="version.suffix" value=""/>
</target>
<!-- funny thing, ant is. Can only specify *one* property in if check. Guaranteed that both are true here,
since properties are immutable. -->
<target name="init.build.patch.release" if="version.hasbuildnum" depends="init.build.nopatch.release">
<property name="version.suffix" value="-${version.bnum}"/>
</target>
<target name="init.build.suffix.done" depends="init.build.release, init.build.patch.release"/>
<target name="init.version.git" depends="init.build.suffix.done">
<!-- Find out whether we are running on Windows -->
<condition property="os.win">
<os family="windows"/>
</condition>
<exec osfamily="unix" executable="tools/get-scala-commit-sha" outputproperty="git.commit.sha" failifexecutionfails="false" />
<exec osfamily="unix" executable="tools/get-scala-commit-date" outputproperty="git.commit.date" failifexecutionfails="false" />
<!-- some default in case something went wrong getting the revision -->
<property name="git.commit.sha" value="unknown"/>
<property name="git.commit.date" value="unknown"/>
<!-- We use the git describe to determine the OSGi modifier for our build. -->
<property
name="maven.version.number"
value="${version.major}.${version.minor}.${version.patch}${version.suffix}${maven.version.suffix}"/>
<property
name="osgi.version.number"
value="${version.major}.${version.minor}.${version.patch}.v${git.commit.date}${version.suffix}-${git.commit.sha}"/>
</target>
<target name="init.version.snapshot" unless="build.release" depends="init.version.git">
<property
name="version.number"
value="${version.major}.${version.minor}.${version.patch}${version.suffix}-${git.commit.date}-${git.commit.sha}"/>
</target>
<target name="init.version.release" if="build.release" depends="init.version.git">
<property
name="version.number"
value="${maven.version.number}"/>
</target>
<target name="init.version.done" depends="init.version.release, init.version.snapshot"/>
<target name="init" depends="init.starr, init.version.done">
<!-- scalac.args.optimise is selectively overridden in certain antcall tasks. -->
<property name="scalac.args.optimise" value=""/>
<!-- scalac.args.quickonly are added to quick.* targets but not others (particularly, locker.)
This is to facilitate testing new command line options which do not yet exist in starr. -->
<property name="scalac.args.quickonly" value=""/>
<property name="scalac.args.all" value="${scalac.args} ${scalac.args.optimise}"/>
<property name="scalac.args.quick" value="${scalac.args.all} ${scalac.args.quickonly}"/>
<!-- Setting-up Ant contrib tasks -->
<taskdef resource="net/sf/antcontrib/antlib.xml" classpath="${lib.dir}/ant/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>
<property name="init.avail" value="yes"/>
<!-- Local libs (developer use.) -->
<mkdir dir="${lib-extra.dir}"/>
<path id="lib.extra">
<!-- needs ant 1.7.1 -->
<!-- <fileset dir="${lib-extra.dir}" erroronmissingdir="false"> -->
<fileset dir="${lib-extra.dir}">
<include name="**/*.jar"/>
</fileset>
</path>
<!-- Auxiliary libs placed on every classpath. -->
<path id="aux.libs">
<fileset dir="${lib.dir}">
<include name="fjbg.jar"/>
<include name="msil.jar"/>
<include name="forkjoin.jar"/>
</fileset>
<pathelement location="${ant.jar}"/>
<path refid="lib.extra"/>
</path>
<!-- And print-out what we are building -->
<echo message=" build time: ${time.human}" />
<echo message=" java version: ${java.vm.name} ${java.version}" />
<echo message=" java args: ${env.ANT_OPTS} ${jvm.opts}" />
<echo message=" javac args: ${javac.args}" />
<echo message=" scalac args: ${scalac.args}" />
<echo message=" git date: ${git.commit.date}" />
<echo message=" git hash: ${git.commit.sha}" />
<echo message=" maven version: ${maven.version.number}"/>
<echo message=" OSGi version: ${osgi.version.number}" />
<echo message="canonical version: ${version.number}" />
<!-- Define tasks that can be run with Starr -->
<path id="starr.classpath">
<pathelement location="${lib.starr.jar}"/>
<pathelement location="${comp.starr.jar}"/>
<path refid="aux.libs"/>
</path>
<!-- What to have on the compilation path when compiling during certain phases -->
<path id="quick.compilation.path">
<pathelement location="${build-quick.dir}/classes/library"/>
<pathelement location="${lib.dir}/forkjoin.jar"/>
<path refid="lib.extra"/>
</path>
<path id="strap.compilation.path">
<pathelement location="${build-strap.dir}/classes/library"/>
<pathelement location="${lib.dir}/forkjoin.jar"/>
<path refid="lib.extra"/>
</path>
<taskdef resource="scala/tools/ant/sabbus/antlib.xml" classpathref="starr.classpath"/>
</target>
<!-- ===========================================================================
LOCAL REFERENCE BUILD (LOCKER)
============================================================================ -->
<target name="locker.start" depends="init">
<condition property="locker.available">
<available file="${build-locker.dir}/all.complete"/>
</condition>
</target>
<target name="locker.pre-lib" depends="locker.start" unless="locker.available">
<condition property="locker.lib.needed">
<not><available file="${build-locker.dir}/library.complete"/></not>
</condition>
</target>
<target name="locker.lib" depends="locker.pre-lib" if="locker.lib.needed">
<stopwatch name="locker.lib.timer"/>
<mkdir dir="${build-locker.dir}/classes/library"/>
<javac
srcdir="${src.dir}/library"
destdir="${build-locker.dir}/classes/library"
classpath="${build-locker.dir}/classes/library"
includes="**/*.java"
target="1.5" source="1.5">
<compilerarg line="${javac.args}"/>
</javac>
<!-- NOTE: Potential problem with maximal command line length on Windows
(32768 characters for XP, since executed with Java's "exec"). See
src/build/msil.xml in msil branch for more details. -->
<scalacfork
destdir="${build-locker.dir}/classes/library"
compilerpathref="starr.classpath"
srcpath="${src.dir}/library"
params="${scalac.args.all}"
srcdir="${src.dir}/library"
jvmargs="${scalacfork.jvmargs}">
<include name="**/*.scala"/>
<compilationpath>
<pathelement location="${build-locker.dir}/classes/library"/>
<pathelement location="${lib.dir}/forkjoin.jar"/>
</compilationpath>
</scalacfork>
<propertyfile file="${build-locker.dir}/classes/library/library.properties">
<entry key="version.number" value="${version.number}"/>
<entry key="maven.version.number" value="${maven.version.number}"/>
<entry key="osgi.version.number" value="${osgi.version.number}"/>
<entry key="copyright.string" value="${copyright.string}"/>
</propertyfile>
<copy todir="${build-locker.dir}/classes/library">
<fileset dir="${src.dir}/library">
<include name="**/*.tmpl"/>
<include name="**/*.xml"/>
<include name="**/*.js"/>
<include name="**/*.css"/>
</fileset>
</copy>
<touch file="${build-locker.dir}/library.complete" verbose="no"/>
<stopwatch name="locker.lib.timer" action="total"/>
</target>
<target name="locker.pre-comp" depends="locker.lib" unless="locker.available">
<condition property="locker.comp.needed">
<not><available file="${build-locker.dir}/compiler.complete"/></not>
</condition>
</target>
<target name="locker.comp" depends="locker.pre-comp" if="locker.comp.needed">
<stopwatch name="locker.comp.timer"/>
<mkdir dir="${build-locker.dir}/classes/compiler"/>
<scalacfork
destdir="${build-locker.dir}/classes/compiler"
compilerpathref="starr.classpath"
params="${scalac.args.all}"
srcdir="${src.dir}/compiler"
jvmargs="${scalacfork.jvmargs}">
<include name="**/*.scala"/>
<compilationpath>
<pathelement location="${build-locker.dir}/classes/library"/>
<pathelement location="${build-locker.dir}/classes/compiler"/>
<path refid="aux.libs"/>
<pathelement location="${jline.jar}"/>
</compilationpath>
</scalacfork>
<propertyfile file="${build-locker.dir}/classes/compiler/compiler.properties">
<entry key="version.number" value="${version.number}"/>
<entry key="maven.version.number" value="${maven.version.number}"/>
<entry key="osgi.version.number" value="${osgi.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="**/*.html"/>
<include name="**/*.css"/>
<include name="**/*.properties"/>
<include name="**/*.swf"/>
<include name="**/*.png"/>
<include name="**/*.gif"/>
</fileset>
</copy>
<touch file="${build-locker.dir}/compiler.complete" verbose="no"/>
<stopwatch name="locker.comp.timer" action="total"/>
</target>
<target name="locker.done" depends="locker.comp">
<touch file="${build-locker.dir}/all.complete" verbose="no"/>
<path id="locker.classpath">
<pathelement location="${build-locker.dir}/classes/library"/>
<pathelement location="${build-locker.dir}/classes/compiler"/>
<path refid="aux.libs"/>
</path>
</target>
<target name="locker.clean" depends="palo.clean">
<delete dir="${build-locker.dir}" includeemptydirs="yes" quiet="yes" failonerror="no"/>
</target>
<target name="locker.unlock">
<delete file="${build-locker.dir}/all.complete"/>
<delete file="${build-locker.dir}/library.complete"/>
<delete file="${build-locker.dir}/compiler.complete"/>
</target>
<!-- ===========================================================================
PACKED LOCKER BUILD (PALO)
============================================================================ -->
<target name="palo.start" depends="locker.done"/>
<target name="palo.pre-lib" depends="palo.start">
<uptodate
property="palo.lib.available"
targetfile="${build-palo.dir}/lib/scala-library.jar"
srcfile="${build-locker.dir}/library.complete"/>
</target>
<target name="palo.lib" depends="palo.pre-lib" unless="palo.lib.available">
<mkdir dir="${build-palo.dir}/lib"/>
<jar destfile="${build-palo.dir}/lib/scala-library.jar">
<fileset dir="${build-locker.dir}/classes/library"/>
</jar>
</target>
<target name="palo.pre-comp" depends="palo.lib">
<uptodate
property="palo.comp.available"
targetfile="${build-palo.dir}/lib/scala-compiler.jar"
srcfile="${build-locker.dir}/compiler.complete"/>
</target>
<target name="palo.comp" depends="palo.pre-comp" unless="palo.comp.available">
<mkdir dir="${build-palo.dir}/lib"/>
<jar destfile="${build-palo.dir}/lib/scala-compiler.jar" manifest="${basedir}/META-INF/MANIFEST.MF">
<fileset dir="${build-locker.dir}/classes/compiler"/>
<!-- filemode / dirmode: see trac ticket #1294 -->
</jar>
</target>
<target name="palo.done" depends="palo.comp">
</target>
<target name="palo.clean" depends="quick.clean">
<delete dir="${build-palo.dir}" includeemptydirs="yes" quiet="yes" failonerror="no"/>
</target>
<!-- ===========================================================================
QUICK BUILD (QUICK)
============================================================================ -->
<target name="quick.start" depends="locker.done"/>
<target name="quick.pre-lib" depends="quick.start">
<uptodate property="quick.lib.available" targetfile="${build-quick.dir}/library.complete">
<srcfiles dir="${src.dir}">
<include name="library/**"/>
<include name="dbc/**"/>
<include name="actors/**"/>
<include name="continuations/**"/>
<include name="swing/**"/>
</srcfiles>
</uptodate>
</target>
<target name="quick.lib" depends="quick.pre-lib" unless="quick.lib.available">
<stopwatch name="quick.lib.timer"/>
<mkdir dir="${build-quick.dir}/classes/library"/>
<javac
srcdir="${src.dir}/library"
destdir="${build-quick.dir}/classes/library"
classpath="${build-quick.dir}/classes/library"
includes="**/*.java"
target="1.5" source="1.5">
<compilerarg line="${javac.args}"/>
</javac>
<javac
srcdir="${src.dir}/actors"
destdir="${build-quick.dir}/classes/library"
classpath="${build-quick.dir}/classes/library"
includes="**/*.java"
target="1.5" source="1.5">
<compilerarg line="${javac.args}"/>
</javac>
<scalacfork
destdir="${build-quick.dir}/classes/library"
compilerpathref="locker.classpath"
srcpath="${src.dir}/library"
params="${scalac.args.quick}"
srcdir="${src.dir}/library"
jvmargs="${scalacfork.jvmargs}">
<include name="**/*.scala"/>
<compilationpath refid="quick.compilation.path"/>
</scalacfork>
<scalacfork
destdir="${build-quick.dir}/classes/library"
compilerpathref="locker.classpath"
params="${scalac.args.quick}"
srcdir="${src.dir}/actors"
jvmargs="${scalacfork.jvmargs}">
<include name="**/*.scala"/>
<compilationpath refid="quick.compilation.path"/>
</scalacfork>
<scalacfork
destdir="${build-quick.dir}/classes/library"
compilerpathref="locker.classpath"
params="${scalac.args.quick}"
srcdir="${src.dir}/dbc"
jvmargs="${scalacfork.jvmargs}">
<include name="**/*.scala"/>
<compilationpath refid="quick.compilation.path"/>
</scalacfork>
<scalacfork
destdir="${build-quick.dir}/classes/library"
compilerpathref="locker.classpath"
params="${scalac.args.quick}"
srcdir="${src.dir}/swing"
jvmargs="${scalacfork.jvmargs}">
<include name="**/*.scala"/>
<compilationpath refid="quick.compilation.path"/>
</scalacfork>
<propertyfile file="${build-quick.dir}/classes/library/library.properties">
<entry key="version.number" value="${version.number}"/>
<entry key="maven.version.number" value="${maven.version.number}"/>
<entry key="osgi.version.number" value="${osgi.version.number}"/>
<entry key="copyright.string" value="${copyright.string}"/>
</propertyfile>
<copy todir="${build-quick.dir}/classes/library">
<fileset dir="${src.dir}/library">
<include name="**/*.tmpl"/>
<include name="**/*.xml"/>
<include name="**/*.js"/>
<include name="**/*.css"/>
</fileset>
</copy>
<touch file="${build-quick.dir}/library.complete" verbose="no"/>
<stopwatch name="quick.lib.timer" action="total"/>
</target>
<target name="quick.newlibs" depends="quick.lib" if="libs.outdated">
<antcall target="libs.done" inheritRefs="true"/>
<property name="fjbg.jar" value="${build-libs.dir}/fjbg.jar"/>
<property name="msil.jar" value="${build-libs.dir}/msil.jar"/>
</target>
<target name="quick.libs" depends="quick.newlibs" unless="libs.outdated">
<property name="fjbg.jar" value="${lib.dir}/fjbg.jar"/>
<property name="msil.jar" value="${lib.dir}/msil.jar"/>
</target>
<target name="quick.newforkjoin" depends="quick.libs" if="forkjoin.outdated">
<antcall target="forkjoin.done" inheritRefs="true"/>
<property name="forkjoin.jar" value="${build-libs.dir}/forkjoin.jar"/>
</target>
<target name="quick.forkjoin" depends="quick.newforkjoin" unless="forkjoin.outdated">
<property name="forkjoin.jar" value="${lib.dir}/forkjoin.jar"/>
</target>
<target name="quick.pre-comp" depends="quick.forkjoin">
<uptodate property="quick.comp.available" targetfile="${build-quick.dir}/compiler.complete">
<srcfiles dir="${src.dir}/compiler"/>
</uptodate>
</target>
<target name="quick.comp" depends="quick.pre-comp" unless="quick.comp.available">
<stopwatch name="quick.comp.timer"/>
<mkdir dir="${build-quick.dir}/classes/compiler"/>
<scalacfork
destdir="${build-quick.dir}/classes/compiler"
compilerpathref="locker.classpath"
params="${scalac.args.quick}"
srcdir="${src.dir}/compiler"
jvmargs="${scalacfork.jvmargs}">
<include name="**/*.scala"/>
<compilationpath>
<pathelement location="${build-quick.dir}/classes/library"/>
<pathelement location="${build-quick.dir}/classes/compiler"/>
<path refid="aux.libs"/>
<pathelement location="${jline.jar}"/>
</compilationpath>
</scalacfork>
<propertyfile file="${build-quick.dir}/classes/compiler/compiler.properties">
<entry key="version.number" value="${version.number}"/>
<entry key="maven.version.number" value="${maven.version.number}"/>
<entry key="osgi.version.number" value="${osgi.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"/>
<include name="**/*.html"/>
<include name="**/*.properties"/>
<include name="**/*.swf"/>
<include name="**/*.png"/>
<include name="**/*.gif"/>
<include name="**/*.txt"/>
</fileset>
</copy>
<touch file="${build-quick.dir}/compiler.complete" verbose="no"/>
<stopwatch name="quick.comp.timer" action="total"/>
</target>
<target name="quick.pre-plugins" depends="quick.comp">
<uptodate property="quick.plugins.available" targetfile="${build-quick.dir}/plugins.complete">
<srcfiles dir="${src.dir}/continuations"/>
</uptodate>
</target>
<target name="quick.plugins" depends="quick.pre-plugins" unless="quick.plugins.available">
<stopwatch name="quick.plugins.timer"/>
<mkdir dir="${build-quick.dir}/classes/continuations-plugin"/>
<scalacfork
destdir="${build-quick.dir}/classes/continuations-plugin"
compilerpathref="locker.classpath"
params="${scalac.args.quick}"
srcdir="${src.dir}/continuations/plugin"
jvmargs="${scalacfork.jvmargs}">
<include name="**/*.scala"/>
<compilationpath>
<pathelement location="${build-quick.dir}/classes/library"/>
<pathelement location="${build-quick.dir}/classes/compiler"/>
<pathelement location="${build-quick.dir}/classes/continuations-plugin"/>
<pathelement location="${lib.dir}/forkjoin.jar"/>
</compilationpath>
</scalacfork>
<copy
file="${src.dir}/continuations/plugin/scalac-plugin.xml"
todir="${build-quick.dir}/classes/continuations-plugin"/>
<!-- not very nice to create jar here but needed to load plugin -->
<mkdir dir="${build-quick.dir}/misc/scala-devel/plugins"/>
<jar destfile="${build-quick.dir}/misc/scala-devel/plugins/continuations.jar">
<fileset dir="${build-quick.dir}/classes/continuations-plugin"/>
</jar>
<!-- might split off library part into its own ant target -->
<scalacfork
destdir="${build-quick.dir}/classes/library"
compilerpathref="locker.classpath"
params="${scalac.args.quick} -Xpluginsdir ${build-quick.dir}/misc/scala-devel/plugins -Xplugin-require:continuations -P:continuations:enable"
srcdir="${src.dir}/continuations/library"
jvmargs="${scalacfork.jvmargs}">
<include name="**/*.scala"/>
<compilationpath refid="quick.compilation.path"/>
</scalacfork>
<touch file="${build-quick.dir}/plugins.complete" verbose="no"/>
<stopwatch name="quick.plugins.timer" action="total"/>
</target>
<target name="quick.scalacheck" depends="quick.plugins">
<mkdir dir="${build-quick.dir}/classes/scalacheck"/>
<scalacfork
destdir="${build-quick.dir}/classes/scalacheck"
compilerpathref="locker.classpath"
params="${scalac.args.all}"
srcdir="${src.dir}/scalacheck"
jvmargs="${scalacfork.jvmargs}">
<include name="**/*.scala"/>
<compilationpath>
<pathelement location="${build-quick.dir}/classes/library"/>
<pathelement location="${build-quick.dir}/classes/scalacheck"/>
</compilationpath>
</scalacfork>
</target>
<target name="quick.pre-scalap" depends="quick.scalacheck">
<uptodate property="quick.scalap.available" targetfile="${build-quick.dir}/scalap.complete">
<srcfiles dir="${src.dir}/scalap"/>
</uptodate>
</target>
<target name="quick.scalap" depends="quick.pre-scalap" unless="quick.scalap.available">
<stopwatch name="quick.scalap.timer"/>
<mkdir dir="${build-quick.dir}/classes/scalap"/>
<scalacfork
destdir="${build-quick.dir}/classes/scalap"
compilerpathref="locker.classpath"
params="${scalac.args.quick}"
srcdir="${src.dir}/scalap"
jvmargs="${scalacfork.jvmargs}">
<include name="**/*.scala"/>
<compilationpath>
<pathelement location="${build-quick.dir}/classes/library"/>
<pathelement location="${build-quick.dir}/classes/compiler"/>
<pathelement location="${build-quick.dir}/classes/scalap"/>
<pathelement location="${build-quick.dir}/classes/partest"/>
<pathelement location="${ant.jar}"/>
<pathelement location="${lib.dir}/forkjoin.jar"/>
</compilationpath>
</scalacfork>
<touch file="${build-quick.dir}/scalap.complete" verbose="no"/>
<stopwatch name="quick.scalap.timer" action="total"/>
</target>
<target name="quick.pre-partest" depends="quick.scalap">
<uptodate property="quick.partest.available" targetfile="${build-quick.dir}/partest.complete">
<srcfiles dir="${src.dir}/partest"/>
</uptodate>
</target>
<target name="quick.partest" depends="quick.pre-partest" unless="quick.partest.available">
<stopwatch name="quick.partest.timer"/>
<mkdir dir="${build-quick.dir}/classes/partest"/>
<javac
srcdir="${src.dir}/partest"
destdir="${build-quick.dir}/classes/partest"
target="1.5" source="1.5">
<classpath>
<pathelement location="${build-quick.dir}/classes/library"/>
<pathelement location="${build-quick.dir}/classes/compiler"/>
<pathelement location="${build-quick.dir}/classes/scalap"/>
<pathelement location="${build-quick.dir}/classes/partest"/>
</classpath>
<include name="**/*.java"/>
<compilerarg line="${javac.args}"/>
</javac>
<scalacfork
destdir="${build-quick.dir}/classes/partest"
compilerpathref="locker.classpath"
params="${scalac.args.quick}"
srcdir="${src.dir}/partest"
jvmargs="${scalacfork.jvmargs}">
<include name="**/*.scala"/>
<compilationpath>
<pathelement location="${build-quick.dir}/classes/library"/>
<pathelement location="${build-quick.dir}/classes/compiler"/>
<pathelement location="${build-quick.dir}/classes/scalap"/>
<pathelement location="${build-quick.dir}/classes/partest"/>
<pathelement location="${ant.jar}"/>
<pathelement location="${lib.dir}/forkjoin.jar"/>
<pathelement location="${scalacheck.jar}"/>
</compilationpath>
</scalacfork>
<propertyfile file="${build-quick.dir}/classes/partest/partest.properties">
<entry key="version.number" value="${partest.version.number}"/>
<entry key="copyright.string" value="${copyright.string}"/>
</propertyfile>
<copy todir="${build-quick.dir}/classes/partest">
<fileset dir="${src.dir}/partest">
<include name="**/*.xml"/>
</fileset>
</copy>
<touch file="${build-quick.dir}/partest.complete" verbose="no"/>
<stopwatch name="quick.partest.timer" action="total"/>
</target>
<target name="quick.pre-bin" depends="quick.partest">
<condition property="quick.bin.available">
<isset property="quick.comp.available"/>
</condition>
</target>
<target name="quick.bin" depends="quick.pre-bin" unless="quick.bin.available">
<path id="quick.bin.classpath">
<pathelement location="${build-quick.dir}/classes/library"/>
<pathelement location="${build-quick.dir}/classes/compiler"/>
<pathelement location="${build-quick.dir}/classes/scalap"/>
<path refid="aux.libs"/>
<pathelement location="${jline.jar}"/>
</path>
<taskdef name="quick-bin" classname="scala.tools.ant.ScalaTool" classpathref="quick.bin.classpath"/>
<mkdir dir="${build-quick.dir}/bin"/>
<quick-bin
file="${build-quick.dir}/bin/scala"
class="scala.tools.nsc.MainGenericRunner"
javaFlags="${java.flags}"
classpathref="quick.bin.classpath"/>
<quick-bin
file="${build-quick.dir}/bin/scalac"
class="scala.tools.nsc.Main"
javaFlags="${java.flags}"
classpathref="quick.bin.classpath"/>
<quick-bin
file="${build-quick.dir}/bin/scaladoc"
class="scala.tools.nsc.ScalaDoc"
javaFlags="${java.flags}"
classpathref="quick.bin.classpath"/>
<quick-bin
file="${build-quick.dir}/bin/fsc"
class="scala.tools.nsc.CompileClient"
javaFlags="${java.flags}"
classpathref="quick.bin.classpath"/>
<quick-bin
file="${build-quick.dir}/bin/scalap"
class="scala.tools.scalap.Main"
javaFlags="${java.flags}"
classpathref="quick.bin.classpath"/>
<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"/>
<chmod perm="ugo+rx" file="${build-quick.dir}/bin/scalap"/>
<touch file="${build-quick.dir}/bin.complete" verbose="no"/>
</target>
<target name="quick.done" depends="quick.bin">
<path id="quick.classpath">
<pathelement location="${build-quick.dir}/classes/library"/>
<pathelement location="${build-quick.dir}/classes/compiler"/>
<path refid="aux.libs"/>
</path>
</target>
<target name="quick.clean" depends="libs.clean">
<delete dir="${build-quick.dir}" includeemptydirs="yes" quiet="yes" failonerror="no"/>
</target>
<!-- ===========================================================================
PACKED QUICK BUILD (PACK)
============================================================================ -->
<target name="pack.start" depends="quick.done"/>
<target name="pack.pre-lib" depends="pack.start">
<uptodate
property="pack.lib.available"
targetfile="${build-pack.dir}/lib/scala-library.jar"
srcfile="${build-quick.dir}/library.complete"/>
</target>
<target name="pack.lib" depends="pack.pre-lib" unless="pack.lib.available">
<mkdir dir="${build-pack.dir}/lib"/>
<jar destfile="${build-pack.dir}/lib/scala-library.jar">
<fileset dir="${build-quick.dir}/classes/library">
<exclude name="scala/dbc/**"/>
<exclude name="scala/swing/**"/>
</fileset>
<zipfileset dirmode="755" filemode="644" src="${forkjoin.jar}"/>
</jar>
<jar destfile="${build-pack.dir}/lib/scala-dbc.jar">
<fileset dir="${build-quick.dir}/classes/library">
<include name="scala/dbc/**"/>
</fileset>
</jar>
<jar destfile="${build-pack.dir}/lib/scala-swing.jar">
<fileset dir="${build-quick.dir}/classes/library">
<include name="scala/swing/**"/>
</fileset>
<fileset dir="${src.dir}/swing">
<include name="scala/swing/test/images/**"/>
</fileset>
</jar>
</target>
<target name="pack.pre-comp" depends="pack.lib">
<uptodate
property="pack.comp.available"
targetfile="${build-pack.dir}/lib/scala-compiler.jar"
srcfile="${build-quick.dir}/compiler.complete"/>
</target>
<target name="pack.comp" depends="pack.pre-comp" unless="pack.comp.available">
<mkdir dir="${build-pack.dir}/META-INF"/>
<copy file="META-INF/MANIFEST.MF" toDir="${build-pack.dir}/META-INF"/>
<manifest file="${build-pack.dir}/META-INF/MANIFEST.MF" mode="update">
<attribute name="Bundle-Version" value="${version.number}"/>
</manifest>
<mkdir dir="${build-pack.dir}/lib"/>
<jar destfile="${build-pack.dir}/lib/scala-compiler.jar" manifest="${build-pack.dir}/META-INF/MANIFEST.MF">
<fileset dir="${build-quick.dir}/classes/compiler"/>
<!-- filemode / dirmode: see trac ticket #1294 -->
<zipfileset dirmode="755" filemode="644" src="${fjbg.jar}"/>
<zipfileset dirmode="755" filemode="644" src="${msil.jar}"/>
</jar>
<copy file="${jline.jar}" toDir="${build-pack.dir}/lib"/>
<copy todir="${build-pack.dir}/lib">
<fileset dir="${lib-extra.dir}">
<include name="**/*.jar"/>
</fileset>
</copy>
</target>
<target name="pack.pre-plugins" depends="pack.comp">
<uptodate
property="pack.plugins.available"
targetfile="${build-pack.dir}/misc/scala-devel/plugins/continuations.jar"
srcfile="${build-quick.dir}/plugins.complete"/>
</target>
<target name="pack.plugins" depends="pack.pre-plugins" unless="pack.plugins.available">
<mkdir dir="${build-pack.dir}/misc/scala-devel/plugins"/>
<jar destfile="${build-pack.dir}/misc/scala-devel/plugins/continuations.jar">
<fileset dir="${build-quick.dir}/classes/continuations-plugin"/>
</jar>
</target>
<target name="pack.scalacheck" depends="pack.plugins">
<jar destfile="${build-pack.dir}/lib/scalacheck.jar">
<fileset dir="${build-quick.dir}/classes/scalacheck"/>
</jar>
</target>
<target name="pack.pre-partest" depends="pack.scalacheck">
<uptodate
property="pack.partest.available"
targetfile="${build-pack.dir}/lib/scala-partest.jar"
srcfile="${build-quick.dir}/partest.complete"/>
</target>
<target name="pack.partest" depends="pack.pre-partest" unless="pack.partest.available">
<mkdir dir="${build-pack.dir}/lib"/>
<jar destfile="${build-pack.dir}/lib/scala-partest.jar">
<fileset dir="${build-quick.dir}/classes/partest"/>
</jar>
</target>
<target name="pack.pre-scalap" depends="pack.partest">
<uptodate
property="pack.scalap.available"
targetfile="${build-pack.dir}/lib/scalap.jar"
srcfile="${build-quick.dir}/scalap.complete"/>
</target>
<target name="pack.scalap" depends="pack.pre-scalap" unless="pack.scalap.available">
<mkdir dir="${build-pack.dir}/lib"/>
<jar destfile="${build-pack.dir}/lib/scalap.jar">
<fileset dir="${build-quick.dir}/classes/scalap"/>
<fileset file="${src.dir}/scalap/decoder.properties"/>
</jar>
</target>
<target name="pack.pre-bin" depends="pack.scalap">
<uptodate
property="pack.bin.available"
srcfile="${build-pack.dir}/lib/scala-compiler.jar"
targetfile="${build-pack.dir}/bin.complete"/>
</target>
<target name="pack.bin" depends="pack.pre-bin" unless="pack.bin.available">
<taskdef name="pack-bin" classname="scala.tools.ant.ScalaTool">
<classpath>
<pathelement location="${build-pack.dir}/lib/scala-library.jar"/>
<pathelement location="${build-pack.dir}/lib/scala-compiler.jar"/>
<pathelement location="${build-pack.dir}/lib/jline.jar"/>
</classpath>
</taskdef>
<mkdir dir="${build-pack.dir}/bin"/>
<pack-bin
file="${build-pack.dir}/bin/scala"
class="scala.tools.nsc.MainGenericRunner"
javaFlags="${java.flags}"/>
<pack-bin
file="${build-pack.dir}/bin/scalac"
class="scala.tools.nsc.Main"
javaFlags="${java.flags}"/>
<pack-bin
file="${build-pack.dir}/bin/scaladoc"
class="scala.tools.nsc.ScalaDoc"
javaFlags="${java.flags}"/>
<pack-bin
file="${build-pack.dir}/bin/fsc"
class="scala.tools.nsc.CompileClient"
javaFlags="${java.flags}"/>
<pack-bin
file="${build-pack.dir}/bin/scalap"
class="scala.tools.scalap.Main"
javaFlags="${java.flags}"/>
<chmod perm="ugo+rx" file="${build-pack.dir}/bin/scala"/>
<chmod perm="ugo+rx" file="${build-pack.dir}/bin/scalac"/>
<chmod perm="ugo+rx" file="${build-pack.dir}/bin/scaladoc"/>
<chmod perm="ugo+rx" file="${build-pack.dir}/bin/fsc"/>
<chmod perm="ugo+rx" file="${build-pack.dir}/bin/scalap"/>
<touch file="${build-pack.dir}/bin.complete" verbose="no"/>
</target>
<target name="pack.done" depends="pack.bin">
<path id="pack.classpath">
<pathelement location="${build-pack.dir}/lib/scala-library.jar"/>
<pathelement location="${build-pack.dir}/lib/scala-compiler.jar"/>
<pathelement location="${build-pack.dir}/lib/scala-partest.jar"/>
<pathelement location="${build-pack.dir}/lib/scalap.jar"/>
<pathelement location="${ant.jar}"/>
<pathelement location="${jline.jar}"/>
<path refid="lib.extra"/>
</path>
<taskdef resource="scala/tools/ant/antlib.xml" classpathref="pack.classpath"/>
<taskdef resource="scala/tools/partest/antlib.xml" classpathref="pack.classpath"/>
</target>
<target name="pack.clean" depends="strap.clean">
<delete dir="${build-pack.dir}" includeemptydirs="yes" quiet="yes" failonerror="no"/>
</target>
<!-- ===========================================================================
BOOTSTRAPPING BUILD (STRAP)
============================================================================ -->
<target name="strap.start" depends="pack.done"/>
<target name="strap.pre-lib" depends="strap.start">
<uptodate property="strap.lib.available" targetfile="${build-strap.dir}/library.complete">
<srcfiles dir="${src.dir}">
<include name="library/**"/>
<include name="dbc/**"/>
<include name="actors/**"/>
<include name="swing/**"/>
</srcfiles>
</uptodate>
</target>
<target name="strap.lib" depends="strap.pre-lib" unless="strap.lib.available">
<stopwatch name="strap.lib.timer"/>
<mkdir dir="${build-strap.dir}/classes/library"/>
<javac
srcdir="${src.dir}/library"
destdir="${build-strap.dir}/classes/library"
classpath="${build-strap.dir}/classes/library"
includes="**/*.java"
target="1.5" source="1.5">
<compilerarg line="${javac.args}"/>
</javac>
<javac
srcdir="${src.dir}/actors"
destdir="${build-strap.dir}/classes/library"
classpath="${build-strap.dir}/classes/library"
includes="**/*.java"
target="1.5" source="1.5">
<compilerarg line="${javac.args}"/>
</javac>
<scalacfork
destdir="${build-strap.dir}/classes/library"
compilerpathref="pack.classpath"
srcpath="${src.dir}/library"
params="${scalac.args.all}"
srcdir="${src.dir}/library"
jvmargs="${scalacfork.jvmargs}">
<include name="**/*.scala"/>
<compilationpath refid="strap.compilation.path"/>
</scalacfork>
<scalacfork
destdir="${build-strap.dir}/classes/library"
compilerpathref="pack.classpath"
params="${scalac.args.all}"
srcdir="${src.dir}/actors"
jvmargs="${scalacfork.jvmargs}">
<include name="**/*.scala"/>
<compilationpath refid="strap.compilation.path"/>
</scalacfork>
<scalacfork
destdir="${build-strap.dir}/classes/library"
compilerpathref="pack.classpath"
params="${scalac.args.all}"
srcdir="${src.dir}/dbc"
jvmargs="${scalacfork.jvmargs}">
<include name="**/*.scala"/>
<compilationpath refid="strap.compilation.path"/>
</scalacfork>
<scalacfork
destdir="${build-strap.dir}/classes/library"
compilerpathref="pack.classpath"
params="${scalac.args.all}"
srcdir="${src.dir}/swing"
jvmargs="${scalacfork.jvmargs}">
<include name="**/*.scala"/>
<compilationpath refid="strap.compilation.path"/>
</scalacfork>
<propertyfile file="${build-strap.dir}/classes/library/library.properties">
<entry key="version.number" value="${version.number}"/>
<entry key="maven.version.number" value="${maven.version.number}"/>
<entry key="osgi.version.number" value="${osgi.version.number}"/>
<entry key="copyright.string" value="${copyright.string}"/>
</propertyfile>
<copy todir="${build-strap.dir}/classes/library">
<fileset dir="${src.dir}/library">
<include name="**/*.tmpl"/>
<include name="**/*.xml"/>
<include name="**/*.js"/>
<include name="**/*.css"/>
</fileset>
</copy>
<touch file="${build-strap.dir}/library.complete" verbose="no"/>
<stopwatch name="strap.lib.timer" action="total"/>
</target>
<target name="strap.pre-comp" depends="strap.lib">
<uptodate property="strap.comp.available" targetfile="${build-strap.dir}/compiler.complete">
<srcfiles dir="${src.dir}/compiler"/>
</uptodate>
</target>
<target name="strap.comp" depends="strap.pre-comp" unless="strap.comp.available">
<stopwatch name="strap.comp.timer"/>
<mkdir dir="${build-strap.dir}/classes/compiler"/>
<scalacfork
destdir="${build-strap.dir}/classes/compiler"
compilerpathref="pack.classpath"
params="${scalac.args.all}"
srcdir="${src.dir}/compiler"
jvmargs="${scalacfork.jvmargs}">
<include name="**/*.scala"/>
<compilationpath>
<pathelement location="${build-strap.dir}/classes/library"/>
<pathelement location="${build-strap.dir}/classes/compiler"/>
<path refid="aux.libs"/>
<pathelement location="${jline.jar}"/>
</compilationpath>
</scalacfork>
<propertyfile file="${build-strap.dir}/classes/compiler/compiler.properties">
<entry key="version.number" value="${version.number}"/>
<entry key="maven.version.number" value="${maven.version.number}"/>
<entry key="osgi.version.number" value="${osgi.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"/>
<include name="**/*.html"/>
<include name="**/*.properties"/>
<include name="**/*.swf"/>
<include name="**/*.png"/>
<include name="**/*.gif"/>
<include name="**/*.txt"/>
</fileset>
</copy>
<touch file="${build-strap.dir}/compiler.complete" verbose="no"/>
<stopwatch name="strap.comp.timer" action="total"/>
</target>
<target name="strap.pre-plugins" depends="strap.comp">
<uptodate property="strap.plugins.available" targetfile="${build-strap.dir}/plugins.complete">
<srcfiles dir="${src.dir}/continuations"/>
</uptodate>
</target>
<target name="strap.plugins" depends="strap.pre-plugins" unless="strap.plugins.available">
<stopwatch name="strap.plugins.timer"/>
<mkdir dir="${build-strap.dir}/classes/continuations-plugin"/>
<scalacfork
destdir="${build-strap.dir}/classes/continuations-plugin"
compilerpathref="pack.classpath"
params="${scalac.args.all}"
srcdir="${src.dir}/continuations/plugin"
jvmargs="${scalacfork.jvmargs}">
<include name="**/*.scala"/>
<compilationpath>
<pathelement location="${build-strap.dir}/classes/library"/>
<pathelement location="${build-strap.dir}/classes/compiler"/>
<pathelement location="${build-strap.dir}/classes/continuations-plugin"/>
<pathelement location="${lib.dir}/forkjoin.jar"/>
</compilationpath>
</scalacfork>
<copy
file="${src.dir}/continuations/plugin/scalac-plugin.xml"
todir="${build-strap.dir}/classes/continuations-plugin"/>
<!-- not very nice to create jar here but needed to load plugin -->
<mkdir dir="${build-strap.dir}/misc/scala-devel/plugins"/>
<jar destfile="${build-strap.dir}/misc/scala-devel/plugins/continuations.jar">
<fileset dir="${build-strap.dir}/classes/continuations-plugin"/>
</jar>
<!-- might split off library part into its own ant target -->
<scalacfork
destdir="${build-strap.dir}/classes/library"
compilerpathref="pack.classpath"
params="${scalac.args.all} -Xpluginsdir ${build-strap.dir}/misc/scala-devel/plugins -Xplugin-require:continuations -P:continuations:enable"
srcdir="${src.dir}/continuations/library"
jvmargs="${scalacfork.jvmargs}">
<include name="**/*.scala"/>
<compilationpath refid="strap.compilation.path"/>
</scalacfork>
<touch file="${build-strap.dir}/plugins.complete" verbose="no"/>
<stopwatch name="strap.plugins.timer" action="total"/>
</target>
<target name="strap.scalacheck" depends="strap.plugins">
<mkdir dir="${build-strap.dir}/classes/scalacheck"/>
<scalacfork
destdir="${build-strap.dir}/classes/scalacheck"
compilerpathref="pack.classpath"
params="${scalac.args.all}"
srcdir="${src.dir}/scalacheck"
jvmargs="${scalacfork.jvmargs}">
<include name="**/*.scala"/>
<compilationpath>
<pathelement location="${build-strap.dir}/classes/library"/>
</compilationpath>
</scalacfork>
</target>
<target name="strap.pre-scalap" depends="strap.scalacheck">
<uptodate property="strap.scalap.available" targetfile="${build-strap.dir}/scalap.complete">
<srcfiles dir="${src.dir}/scalap"/>
</uptodate>
</target>
<target name="strap.scalap" depends="strap.pre-scalap" unless="strap.scalap.available">
<stopwatch name="strap.scalap.timer"/>
<mkdir dir="${build-strap.dir}/classes/scalap"/>
<scalacfork
destdir="${build-strap.dir}/classes/scalap"
compilerpathref="pack.classpath"
params="${scalac.args.all}"
srcdir="${src.dir}/scalap"
jvmargs="${scalacfork.jvmargs}">
<include name="**/*.scala"/>
<compilationpath>
<pathelement location="${build-strap.dir}/classes/library"/>
<pathelement location="${build-strap.dir}/classes/compiler"/>
<pathelement location="${build-strap.dir}/classes/scalap"/>
<pathelement location="${build-strap.dir}/classes/partest"/>
<pathelement location="${ant.jar}"/>
<pathelement location="${lib.dir}/forkjoin.jar"/>
</compilationpath>
</scalacfork>
<touch file="${build-strap.dir}/scalap.complete" verbose="no"/>
<stopwatch name="strap.scalap.timer" action="total"/>
</target>
<target name="strap.pre-partest" depends="strap.scalap">
<uptodate property="strap.partest.available" targetfile="${build-strap.dir}/partest.complete">
<srcfiles dir="${src.dir}/partest"/>
</uptodate>
</target>
<target name="strap.partest" depends="strap.pre-partest" unless="strap.partest.available">
<stopwatch name="strap.partest.timer"/>
<mkdir dir="${build-strap.dir}/classes/partest"/>
<javac
srcdir="${src.dir}/partest"
destdir="${build-strap.dir}/classes/partest"
target="1.5" source="1.5">
<classpath>
<pathelement location="${build-strap.dir}/classes/library"/>
<pathelement location="${build-strap.dir}/classes/compiler"/>
<pathelement location="${build-strap.dir}/classes/scalap"/>
<pathelement location="${build-strap.dir}/classes/partest"/>
</classpath>
<include name="**/*.java"/>
<compilerarg line="${javac.args}"/>
</javac>
<scalacfork
destdir="${build-strap.dir}/classes/partest"
compilerpathref="pack.classpath"
params="${scalac.args.all}"
srcdir="${src.dir}/partest"
jvmargs="${scalacfork.jvmargs}">
<include name="**/*.scala"/>
<compilationpath>
<pathelement location="${build-strap.dir}/classes/library"/>
<pathelement location="${build-strap.dir}/classes/compiler"/>
<pathelement location="${build-strap.dir}/classes/scalap"/>
<pathelement location="${build-strap.dir}/classes/partest"/>
<pathelement location="${ant.jar}"/>
<pathelement location="${lib.dir}/forkjoin.jar"/>
<pathelement location="${scalacheck.jar}"/>
</compilationpath>
</scalacfork>
<copy todir="${build-strap.dir}/classes/partest">
<fileset dir="${src.dir}/partest">
<include name="**/*.xml"/>
</fileset>
</copy>
<touch file="${build-strap.dir}/partest.complete" verbose="no"/>
<stopwatch name="strap.partest.timer" action="total"/>
</target>
<target name="strap.done" depends="strap.partest"/>
<target name="strap.clean">
<delete dir="${build-strap.dir}" includeemptydirs="yes" quiet="yes" failonerror="no"/>
</target>
<!-- ===========================================================================
LIBRARIES (MSIL, FJBG maybe later)
============================================================================ -->
<target name="libs.start"/>
<target name="libs.pre-forkjoin" depends="libs.start">
<property name="java6.home" value="/home/linuxsoft/apps/java-1.6"/>
<fail message="Compiling forkjoin.jar requires java 1.6. Please set the property `java6.home` in build.properties or using `-Djava6.home=/path/to/java6`">
<condition><not>
<available file="${java6.home}/bin/javac"/>
</not></condition>
</fail>
<uptodate property="libs.forkjoin.available" targetfile="${build-libs.dir}/forkjoin.complete">
<srcfiles dir="${src.dir}/forkjoin">
<include name="**/*.java"/>
<include name="**/*.scala"/>
</srcfiles>
</uptodate>
</target>
<target name="libs.forkjoin" depends="libs.pre-forkjoin" unless="libs.forkjoin.available">
<mkdir dir="${build-libs.dir}/classes/forkjoin"/>
<javac
executable="${java6.home}/bin/javac"
fork="yes"
compiler="javac1.6"
srcdir="${src.dir}/forkjoin"
destdir="${build-libs.dir}/classes/forkjoin"
classpath="${build-libs.dir}/classes/forkjoin"
includes="**/*.java"
debug="true"
target="1.5" source="1.5">
<compilerarg line="${javac.args}"/>
</javac>
<touch file="${build-libs.dir}/forkjoin.complete" verbose="no"/>
</target>
<target name="libs.pre-forkjoinpack" depends="libs.forkjoin">
</target>
<target name="libs.forkjoinpack" depends="libs.pre-forkjoinpack" unless="libs.forkjoinpack.available">
<jar destfile="${build-libs.dir}/forkjoin.jar">
<fileset dir="${build-libs.dir}/classes/forkjoin"/>
</jar>
</target>
<target name="libs.pre-msil" depends="libs.start">
<uptodate property="libs.msil.available" targetfile="${build-libs.dir}/msil.complete">
<srcfiles dir="${src.dir}/msil">
<include name="**/*.java"/>
<include name="**/*.scala"/>
</srcfiles>
</uptodate>
</target>
<target name="libs.msil" depends="libs.pre-msil" unless="libs.msil.available">
<mkdir dir="${build-libs.dir}/classes/msil"/>
<javac
srcdir="${src.dir}/msil"
destdir="${build-libs.dir}/classes/msil"
classpath="${build-libs.dir}/classes/msil"
includes="**/*.java"
excludes="**/tests/**"
debug="true"
target="1.5" source="1.4">
<compilerarg line="${javac.args}"/>
</javac>
<scalacfork
destdir="${build-libs.dir}/classes/msil"
compilerpathref="locker.classpath"
params="${scalac.args.all}"
srcdir="${src.dir}/msil"
jvmargs="${scalacfork.jvmargs}">
<include name="**/*.scala"/>
<compilationpath>
<pathelement location="${build-quick.dir}/classes/library"/>
<pathelement location="${build-libs.dir}/classes/msil"/>
</compilationpath>
</scalacfork>
<touch file="${build-libs.dir}/msil.complete" verbose="no"/>
</target>
<target name="libs.pre-msilpack" depends="libs.msil">
</target>
<target name="libs.msilpack" depends="libs.pre-msilpack" unless="libs.msilpack.available">
<jar destfile="${build-libs.dir}/msil.jar">
<fileset dir="${build-libs.dir}/classes/msil"/>
</jar>
</target>
<target name="libs.pre-fjbg" depends="libs.start">
<uptodate property="libs.fjbg.available" targetfile="${build-libs.dir}/fjbg.complete">
<srcfiles dir="${src.dir}/fjbg">
<include name="**/*.java"/>
<include name="**/*.scala"/>
</srcfiles>
</uptodate>
</target>
<target name="libs.fjbg" depends="libs.pre-fjbg" unless="libs.fjbg.available">
<mkdir dir="${build-libs.dir}/classes/fjbg"/>
<javac
srcdir="${src.dir}/fjbg"
destdir="${build-libs.dir}/classes/fjbg"
classpath="${build-libs.dir}/classes/fjbg"
includes="**/*.java"
debug="true"
target="1.5" source="1.4">
<compilerarg line="${javac.args}"/>
</javac>
<touch file="${build-libs.dir}/fjbg.complete" verbose="no"/>
</target>
<target name="libs.pre-fjbgpack" depends="libs.fjbg">
</target>
<target name="libs.fjbgpack" depends="libs.pre-fjbgpack" unless="libs.fjbgpack.available">
<jar destfile="${build-libs.dir}/fjbg.jar">
<fileset dir="${build-libs.dir}/classes/fjbg"/>
</jar>
</target>
<target name="libs.done" depends="libs.msilpack, libs.fjbgpack"/>
<target name="forkjoin.done" depends="libs.forkjoinpack"/>
<target name="libs.clean" depends="pack.clean">
<delete dir="${build-libs.dir}" includeemptydirs="yes" quiet="yes" failonerror="no"/>
</target>
<!-- ===========================================================================
DOCUMENTATION
============================================================================ -->
<target name="docs.start" depends="pack.done">
<macrodef name="doc-uptodate-check">
<attribute name="name" />
<attribute name="srcdir" />
<element name="source-includes" optional="yes" />
<sequential>
<uptodate property="docs.@{name}.available" targetfile="${build-docs.dir}/@{name}.complete">
<srcfiles dir="@{srcdir}">
<source-includes/>
</srcfiles>
</uptodate>
</sequential>
</macrodef>
<!-- Set the github commit scaladoc sources point to -->
<!-- For releases, look for the tag with the same name as the maven version -->
<condition property="scaladoc.git.commit" value="v${maven.version.number}">
<isset property="build.release"/>
</condition>
<!-- For snapshots, if we know the commit, point scaladoc to that particular commit instead of master -->
<condition property="scaladoc.git.commit" value="${git.commit.sha}">
<not><equals arg1="${git.commit.sha}" arg2="unknown"/></not>
</condition>
<!-- Fallback: point scaladoc to master -->
<property name="scaladoc.git.commit" value="master"/>
<!-- Compute the URL and show it -->
<property name="scaladoc.url" value="https://github.com/scala/scala/tree/${scaladoc.git.commit}/src"/>
<echo message="Scaladoc will point to ${scaladoc.url} for source files."/>
</target>
<target name="docs.pre-lib" depends="docs.start">
<doc-uptodate-check name="library" srcdir="${src.dir}">
<source-includes>
<include name="library/**"/>
<include name="dbc/**"/>
<include name="actors/**"/>
<include name="swing/**"/>
</source-includes>
</doc-uptodate-check>
</target>
<target name="docs.lib" depends="docs.pre-lib" unless="docs.library.available">
<stopwatch name="docs.lib.timer"/>
<mkdir dir="${build-docs.dir}/library"/>
<scaladoc
destdir="${build-docs.dir}/library"
doctitle="Scala Standard Library"
docversion="${version.number}"
docfooter="epfl"
docsourceurl="${scaladoc.url}€{FILE_PATH}.scala#L1"
docUncompilable="${src.dir}/library-aux"
sourcepath="${src.dir}"
classpathref="pack.classpath"
docRootContent="${build-docs.dir}/library/lib/rootdoc.txt">
<src>
<files includes="${src.dir}/actors"/>
<files includes="${src.dir}/library/scala"/>
<files includes="${src.dir}/swing"/>
<files includes="${src.dir}/continuations/library"/>
</src>
<include name="**/*.scala"/>
<exclude name="reflect/Code.scala"/>
<exclude name="reflect/Print.scala"/>
<exclude name="reflect/Symbol.scala"/>
<exclude name="reflect/Tree.scala"/>
<exclude name="reflect/Type.scala"/>
<exclude name="runtime/*$.scala"/>
<exclude name="runtime/ScalaRunTime.scala"/>
<exclude name="runtime/StringAdd.scala"/>
<exclude name="scala/swing/test/**"/>
</scaladoc>
<touch file="${build-docs.dir}/library.complete" verbose="no"/>
<stopwatch name="docs.lib.timer" action="total"/>
</target>
<target name="docs.pre-man" depends="docs.lib">
<doc-uptodate-check name="manual" srcdir="${src.dir}/manual"/>
</target>
<target name="docs.manmaker" depends="docs.pre-man" unless="docs.manual.available">
<mkdir dir="${build.dir}/manmaker/classes"/>
<scalac
destdir="${build.dir}/manmaker/classes"
classpathref="pack.classpath"
srcdir="${src.dir}/manual"
includes="**/*.scala"
addparams="${scalac.args.all}"/>
<path id="manual.classpath">
<pathelement location="${build-pack.dir}/lib/scala-library.jar"/>
<pathelement location="${build.dir}/manmaker/classes"/>
</path>
</target>
<target name="docs.man" depends="docs.manmaker" unless="docs.manual.available">
<mkdir dir="${build-docs.dir}/manual/man/man1"/>
<mkdir dir="${build-docs.dir}/manual/html"/>
<mkdir dir="${build-docs.dir}/manual/genman/man1"/>
<taskdef name="genman"
classname="scala.tools.docutil.ManMaker"
classpathref="manual.classpath"/>
<genman command="fsc, scala, scalac, scaladoc, scalap"
htmlout="${build-docs.dir}/manual/html"
manout="${build-docs.dir}/manual/genman"/>
<!-- On Windows source and target files can't be the same ! -->
<fixcrlf
srcdir="${build-docs.dir}/manual/genman"
destdir="${build-docs.dir}/manual/man"
eol="unix" includes="**/*.1"/>
<copy todir="${build-docs.dir}/manual/html">
<fileset dir="${src.dir}/manual/scala/tools/docutil/resources">
<include name="**/*.html"/>
<include name="**/*.css"/>
<include name="**/*.gif"/>
<include name="**/*.png"/>
</fileset>
</copy>
<touch file="${build-docs.dir}/manual.complete" verbose="no"/>
</target>
<target name="docs.pre-comp" depends="docs.man">
<doc-uptodate-check name="compiler" srcdir="${src.dir}/compiler"/>
</target>
<target name="docs.comp" depends="docs.pre-comp" unless="docs.compiler.available">
<stopwatch name="docs.comp.timer"/>
<mkdir dir="${build-docs.dir}/compiler"/>
<scaladoc
destdir="${build-docs.dir}/compiler"
doctitle="Scala Compiler"
docversion="${version.number}"
docsourceurl="${scaladoc.url}€{FILE_PATH}.scala#L1"
sourcepath="${src.dir}"
classpathref="pack.classpath"
srcdir="${src.dir}/compiler">
<include name="**/*.scala"/>
</scaladoc>
<touch file="${build-docs.dir}/compiler.complete" verbose="no"/>
<stopwatch name="docs.comp.timer" action="total"/>
</target>
<target name="docs.pre-jline" depends="docs.start">
<doc-uptodate-check name="jline" srcdir="${src.dir}/jline/src/main/java" />
</target>
<target name="docs.jline" depends="docs.pre-jline" unless="docs.jline.available">
<stopwatch name="docs.jline.timer"/>
<mkdir dir="${build-docs.dir}/jline"/>
<scaladoc
destdir="${build-docs.dir}/jline"
doctitle="Scala JLine"
docversion="${version.number}"
sourcepath="${src.dir}"
classpathref="pack.classpath"
srcdir="${src.dir}/jline/src/main/java">
<include name="**/*.scala"/>
<include name="**/*.java"/>
</scaladoc>
<touch file="${build-docs.dir}/jline.complete" verbose="no"/>
<stopwatch name="docs.jline.timer" action="total"/>
</target>
<target name="docs.pre-scalap" depends="docs.start">
<doc-uptodate-check name="scalap" srcdir="${src.dir}/scalap" />
</target>
<target name="docs.scalap" depends="docs.pre-scalap" unless="docs.scalap.available">
<stopwatch name="docs.scalap.timer"/>
<mkdir dir="${build-docs.dir}/scalap"/>
<scaladoc
destdir="${build-docs.dir}/scalap"
doctitle="Scalap"
docversion="${version.number}"
docsourceurl="${scaladoc.url}€{FILE_PATH}.scala#L1"
sourcepath="${src.dir}"
classpathref="pack.classpath"
srcdir="${src.dir}/scalap">
<include name="**/*.scala"/>
</scaladoc>
<touch file="${build-docs.dir}/scalap.complete" verbose="no"/>
<stopwatch name="docs.scalap.timer" action="total"/>
</target>
<target name="docs.pre-partest" depends="docs.start">
<doc-uptodate-check name="partest" srcdir="${src.dir}/partest" />
</target>
<target name="docs.partest" depends="docs.pre-partest" unless="docs.partest.available">
<stopwatch name="docs.partest.timer"/>
<mkdir dir="${build-docs.dir}/scala-partest"/>
<scaladoc
destdir="${build-docs.dir}/scala-partest"
doctitle="Scala Parallel Testing Framework"
docversion="${version.number}"
sourcepath="${src.dir}"
classpathref="pack.classpath"
srcdir="${src.dir}/partest">
<include name="**/*.scala"/>
</scaladoc>
<touch file="${build-docs.dir}/partest.complete" verbose="no"/>
<stopwatch name="docs.partest.timer" action="total"/>
</target>
<target name="docs.pre-continuations-plugin" depends="docs.start">
<doc-uptodate-check name="continuations-plugin" srcdir="${src.dir}/continuations/plugin" />
</target>
<target name="docs.continuations-plugin" depends="docs.pre-continuations-plugin" unless="docs.continuations-plugin.available">
<stopwatch name="docs.continuations-plugin.timer"/>
<mkdir dir="${build-docs.dir}/continuations-plugin"/>
<scaladoc
destdir="${build-docs.dir}/continuations-plugin"
doctitle="Delimited Continuations Compiler Plugin"
docversion="${version.number}"
sourcepath="${src.dir}"
classpathref="pack.classpath"
srcdir="${src.dir}/continuations/plugin">
<include name="**/*.scala"/>
</scaladoc>
<touch file="${build-docs.dir}/continuations-plugin.complete" verbose="no"/>
<stopwatch name="docs.continuations-plugin.timer" action="total"/>
</target>
<target name="docs.done" depends="docs.man"/>
<target name="docs.all" depends="docs.jline, docs.comp, docs.man, docs.lib, docs.scalap, docs.partest, docs.continuations-plugin"/>
<target name="docs.clean">
<delete dir="${build-docs.dir}" includeemptydirs="yes" quiet="yes" failonerror="no"/>
<delete dir="${build.dir}/manmaker" includeemptydirs="yes" quiet="yes" failonerror="no"/>
</target>
<!-- ===========================================================================
BOOTRAPING TEST AND TEST SUITE
============================================================================ -->
<target name="test.stability" depends="strap.done">
<same dir="${build-quick.dir}" todir="${build-strap.dir}" failondifferent="yes">
<exclude name="**/*.properties"/>
<exclude name="bin/**"/>
<exclude name="*.complete"/>
<exclude name="misc/scala-devel/plugins/*.jar"/>
</same>
</target>
<!-- this target will run only those tests found in test/debug -->
<target name="test.debug">
<antcall target="test.suite">
<param name="partest.srcdir" value="debug" />
</antcall>
</target>
<target name="test.run" depends="pack.done">
<property name="partest.srcdir" value="files" />
<partest showlog="yes" erroronfailed="yes" javacmd="${java.home}/bin/java"
timeout="1200000"
srcdir="${partest.srcdir}"
scalacopts="${scalac.args.optimise}">
<compilationpath>
<path refid="pack.classpath"/>
<pathelement location="${pack.dir}/lib/scala-swing.jar"/>
<fileset dir="${partest.dir}/files/lib" includes="*.jar" />
</compilationpath>
<runtests dir="${partest.dir}/${partest.srcdir}/run" includes="*.scala"/>
<jvmtests dir="${partest.dir}/${partest.srcdir}/jvm" includes="*.scala"/>
</partest>
</target>
<target name="test.suite" depends="pack.done">
<property name="partest.srcdir" value="files" />
<partest showlog="yes" erroronfailed="yes" javacmd="${java.home}/bin/java"
timeout="2400000"
srcdir="${partest.srcdir}"
scalacopts="${scalac.args.optimise}">
<compilationpath>
<path refid="pack.classpath"/>
<pathelement location="${pack.dir}/lib/scala-swing.jar"/>
<fileset dir="${partest.dir}/files/lib" includes="*.jar" />
</compilationpath>
<postests dir="${partest.dir}/${partest.srcdir}/pos" includes="*.scala"/>
<negtests dir="${partest.dir}/${partest.srcdir}/neg" includes="*.scala"/>
<runtests dir="${partest.dir}/${partest.srcdir}/run" includes="*.scala"/>
<jvmtests dir="${partest.dir}/${partest.srcdir}/jvm" includes="*.scala"/>
<residenttests dir="${partest.dir}/${partest.srcdir}/res" includes="*.res"/>
<buildmanagertests dir="${partest.dir}/${partest.srcdir}/buildmanager" includes="*"/>
<scalaptests dir="${partest.dir}/${partest.srcdir}/scalap" includes="**/*.scala"/>
<scalachecktests dir="${partest.dir}/${partest.srcdir}/scalacheck">
<include name="*.scala"/>
</scalachecktests>
<specializedtests dir="${partest.dir}/${partest.srcdir}/specialized">
<include name="*.scala"/>
</specializedtests>
<presentationtests dir="${partest.dir}/${partest.srcdir}/presentation">
<include name="*/*.scala"/>
</presentationtests>
<!-- <scripttests dir="${partest.dir}/${partest.srcdir}/script" includes="*.scala"/> -->
</partest>
</target>
<target name="test.continuations.suite" depends="pack.done">
<property name="partest.srcdir" value="files" />
<partest showlog="yes" erroronfailed="yes" javacmd="${java.home}/bin/java"
timeout="2400000"
srcdir="${partest.srcdir}"
scalacopts="${scalac.args.optimise} -Xpluginsdir ${build-quick.dir}/misc/scala-devel/plugins -Xplugin-require:continuations -P:continuations:enable">
<compilationpath>
<path refid="pack.classpath"/>
<fileset dir="${partest.dir}/files/lib" includes="*.jar" />
</compilationpath>
<negtests dir="${partest.dir}/${partest.srcdir}/continuations-neg" includes="*.scala"/>
<runtests dir="${partest.dir}/${partest.srcdir}/continuations-run" includes="*.scala"/>
</partest>
</target>
<target name="test.scaladoc" depends="pack.done">
<partest erroronfailed="yes" scalacopts="${scalac.args.optimise}">
<compilationpath>
<path refid="pack.classpath"/>
</compilationpath>
<scalachecktests dir="test/scaladoc/scala">
<include name="*.scala"/>
</scalachecktests>
</partest>
</target>
<target name="test.done" depends="test.suite, test.continuations.suite, test.scaladoc, test.stability"/>
<!-- ===========================================================================
DISTRIBUTION
============================================================================ -->
<target name="dist.start" depends="docs.done, pack.done">
<property name="dist.dir" value="${dists.dir}/scala-${version.number}"/>
</target>
<target name="dist.base" depends="dist.start">
<mkdir dir="${dist.dir}/lib"/>
<copy toDir="${dist.dir}/lib">
<fileset dir="${build-pack.dir}/lib"/>
</copy>
<mkdir dir="${dist.dir}/bin"/>
<copy toDir="${dist.dir}/bin">
<fileset dir="${build-pack.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"/>
<chmod perm="ugo+rx" file="${dist.dir}/bin/scalap"/>
<mkdir dir="${dist.dir}/misc/scala-devel/plugins"/>
<copy toDir="${dist.dir}/misc/scala-devel/plugins">
<fileset dir="${build-pack.dir}/misc/scala-devel/plugins"/>
</copy>
</target>
<target name="dist.doc" depends="dist.base">
<mkdir dir="${dist.dir}/doc/scala-devel-docs"/>
<copy file="${docs.dir}/LICENSE" toDir="${dist.dir}/doc"/>
<copy file="${docs.dir}/README" toDir="${dist.dir}/doc"/>
<mkdir dir="${dist.dir}/doc/scala-devel-docs/api"/>
<copy toDir="${dist.dir}/doc/scala-devel-docs/api">
<fileset dir="${build-docs.dir}/library"/>
</copy>
<mkdir dir="${dist.dir}/doc/scala-devel-docs/examples"/>
<copy toDir="${dist.dir}/doc/scala-devel-docs/examples">
<fileset dir="${docs.dir}/examples"/>
</copy>
<mkdir dir="${dist.dir}/doc/scala-devel-docs/tools"/>
<copy toDir="${dist.dir}/doc/scala-devel-docs/tools">
<fileset dir="${build-docs.dir}/manual/html"/>
</copy>
<copy file="${src.dir}/swing/doc/README"
toFile="${dist.dir}/doc/scala-devel-docs/README.scala-swing"/>
</target>
<target name="dist.man" depends="dist.doc">
<mkdir dir="${dist.dir}/man"/>
<copy toDir="${dist.dir}/man">
<fileset dir="${build-docs.dir}/manual/man"/>
</copy>
</target>
<target name="dist.src" depends="dist.man">
<mkdir dir="${dist.dir}/src"/>
<jar destfile="${dist.dir}/src/scala-library-src.jar">
<fileset dir="${src.dir}/library"/>
<fileset dir="${src.dir}/actors"/>
<fileset dir="${src.dir}/continuations/library"/>
</jar>
<jar destfile="${dist.dir}/src/scala-dbc-src.jar">
<fileset dir="${src.dir}/dbc"/>
</jar>
<jar destfile="${dist.dir}/src/scala-swing-src.jar">
<fileset dir="${src.dir}/swing"/>
</jar>
<jar destfile="${dist.dir}/src/scala-compiler-src.jar">
<fileset dir="${src.dir}/compiler"/>
</jar>
<jar destfile="${dist.dir}/src/scalap-src.jar">
<fileset dir="${src.dir}/scalap"/>
</jar>
<!-- Needed for Maven distribution -->
<jar destfile="${dist.dir}/src/scala-partest-src.jar">
<fileset dir="${src.dir}/partest"/>
</jar>
</target>
<target name="dist.latest.unix" depends="dist.src" unless="os.win">
<symlink link="${dists.dir}/latest" resource="${dist.dir}" overwrite="yes"/>
</target>
<target name="dist.latest.win" depends="dist.src" if="os.win">
<copy todir="${dists.dir}/latest">
<fileset dir="${dist.dir}"/>
</copy>
</target>
<target name="dist.latest" depends="dist.latest.unix,dist.latest.win"/>
<target name="dist.done" depends="dist.latest"/>
<target name="dist.clean">
<delete dir="${dists.dir}" includeemptydirs="yes" quiet="yes" failonerror="no"/>
</target>
<!-- ===========================================================================
TEST AND DISTRIBUTION BUNDLE (ALL)
============================================================================ -->
<target name="all.done" depends="dist.done, test.done"/>
<target name="all.clean" depends="locker.clean, docs.clean, dist.clean"/>
<!-- ===========================================================================
STABLE REFERENCE (STARR)
============================================================================ -->
<!-- Does not use any properties other than ${basedir}, so that it can
run without 'init' (when using 'replacestarrwin') -->
<target name="starr.start">
<fail message="Library in build/pack not available">
<condition><not><and>
<available file="${basedir}/build/pack/lib/scala-library.jar"/>
</and></not></condition>
</fail>
<fail message="Compiler in build/quick not available">
<condition><not><and>
<available file="${basedir}/build/quick/classes/compiler"/>
<available file="${basedir}/build/quick/compiler.complete"/>
</and></not></condition>
</fail>
</target>
<target name="starr.clean" depends="starr.start">
<delete file="${basedir}/lib/scala-library.jar"/>
<delete file="${basedir}/lib/scala-compiler.jar"/>
<delete file="${basedir}/lib/scala-library-src.jar"/>
</target>
<target name="starr.lib" depends="starr.start">
<jar destfile="${basedir}/lib/scala-library.jar">
<fileset dir="${basedir}/build/quick/classes/library"/>
</jar>
</target>
<target name="starr.comp" depends="starr.lib">
<jar destfile="${basedir}/lib/scala-compiler.jar">
<fileset dir="${basedir}/build/quick/classes/compiler"/>
</jar>
</target>
<target name="starr.src" depends="starr.comp">
<jar destfile="${basedir}/lib/scala-library-src.jar">
<fileset dir="${basedir}/src/library"/>
<fileset dir="${basedir}/src/actors"/>
<fileset dir="${basedir}/src/swing"/>
<fileset dir="${basedir}/src/dbc"/>
</jar>
</target>
<target name="starr.libs" depends="starr.src" if="libs.outdated">
<copy toDir="${lib.dir}" overwrite="yes">
<fileset dir="${build-libs.dir}">
<include name="fjbg.jar"/>
<include name="msil.jar"/>
<include name="forkjoin.jar"/>
</fileset>
</copy>
</target>
<target name="starr.done" depends="starr.libs"/>
<!-- ===========================================================================
FORWARDED TARGETS FOR PACKAGING
============================================================================ -->
<target name="distpack" depends="dist.done, docs.all">
<ant antfile="${src.dir}/build/pack.xml" target="pack-all.done" inheritall="yes" inheritrefs="yes"/>
</target>
<target name="distpack-maven" depends="dist.done, docs.all">
<ant antfile="${src.dir}/build/pack.xml" target="pack-maven.done" inheritall="yes" inheritrefs="yes"/>
</target>
<target name="distpack-opt"
description="Builds an optimised distribution.">
<antcall target="distpack">
<param name="scalac.args.optimise" value="-optimise"/>
</antcall>
</target>
<target name="distpack-maven-opt"
description="Builds an optimised maven distribution.">
<antcall target="distpack-maven">
<param name="scalac.args.optimise" value="-optimise"/>
</antcall>
</target>
<!-- Used by the scala-installer script -->
<target name="allallclean" depends="all.clean"/>
<!-- ===========================================================================
FORWARDED TARGETS FOR NIGHTLY BUILDS
============================================================================ -->
<target name="nightly">
<antcall target="nightly-nopt">
<param name="scalac.args.optimise" value="-optimise"/>
</antcall>
</target>
<target name="nightly-nopt" depends="all.done, docs.all">
<!-- cannot antcall all.done, the properties defined in there (dist.dir) are not returned. need depends. -->
<ant antfile="${src.dir}/build/pack.xml" target="pack-all.done" inheritall="yes" inheritrefs="yes"/>
</target>
<target name="nightly.checkinit">
<antcall target="nightly-nopt">
<param name="scalac.args.optimise" value="-Xcheckinit"/>
</antcall>
</target>
<target name="nightly.checkall">
<antcall target="nightly-nopt">
<param name="partest.scalacopts" value="-Ycheck:all"/>
</antcall>
</target>
<!-- ===========================================================================
POSITIONS
============================================================================ -->
<target name="test.positions" depends="quick.comp">
<antcall target="test.positions.tests.sub" inheritRefs="true">
<param name="test.tests.srcs" value="${partest.dir}/files/positions"/>
</antcall>
<antcall target="test.positions.sub" inheritRefs="true">
<param name="test.srcs" value="${src.dir}/compiler"/>
</antcall>
<antcall target="test.positions.sub" inheritRefs="true">
<param name="test.srcs" value="${src.dir}/library"/>
</antcall>
<antcall target="test.positions.sub" inheritRefs="true">
<param name="test.srcs" value="${src.dir}/actors"/>
</antcall>
<antcall target="test.positions.sub" inheritRefs="true">
<param name="test.srcs" value="${src.dir}/dbc"/>
</antcall>
<antcall target="test.positions.sub" inheritRefs="true">
<param name="test.srcs" value="${src.dir}/swing"/>
</antcall>
<antcall target="test.positions.sub" inheritRefs="true">
<param name="test.srcs" value="${src.dir}/partest"/>
</antcall>
<antcall target="test.positions.sub" inheritRefs="true">
<param name="test.srcs" value="${src.dir}/scalap"/>
</antcall>
<antcall target="test.positions.tests.sub" inheritRefs="true">
<param name="test.tests.srcs" value="${partest.dir}/files/pos"/>
</antcall>
<antcall target="test.positions.tests.sub" inheritRefs="true">
<param name="test.tests.srcs" value="${partest.dir}/files/run"/>
</antcall>
<antcall target="test.positions.tests.sub" inheritRefs="true">
<param name="test.tests.srcs" value="${partest.dir}/files/neg"/>
</antcall>
</target>
<target name="test.positions.sub">
<echo message="Validating positions for: ${test.srcs}"/>
<if>
<isfileselected file="${test.srcs}">
<type type="dir"/>
</isfileselected>
<then>
<property name="srcdir" value="${test.srcs}"/>
<property name="srcs" value="**/*.scala"/>
</then>
<else>
<dirname property="srcdir" file="${test.srcs}"/>
<basename property="srcs" file="${test.srcs}"/>
</else>
</if>
<scalacfork
destdir=""
compilerpathref="locker.classpath"
srcpath="${srcdir}"
params="-Xprint-pos -Yide-debug"
srcdir="${srcdir}"
jvmargs="${scalacfork.jvmargs}">
<include name="${srcs}"/>
<compilationpath>
<pathelement location="${build-quick.dir}/classes/library"/>
</compilationpath>
</scalacfork>
</target>
<target name="test.positions.tests.sub">
<foreach target="test.positions.sub"
inheritAll="true"
inheritRefs="true"
param="test.srcs">
<path>
<fileset dir="${test.tests.srcs}" includes="*.scala"/>
<dirset dir="${test.tests.srcs}">
<include name="*"/>
</dirset>
</path>
</foreach>
</target>
<!-- ===========================================================================
MISCELLANEOUS
============================================================================ -->
<target name="yourkit.init">
<property name="yourkit.home" value="/Applications/YourKit.app"/>
<property name="yourkit.api.jar" value="${yourkit.home}/lib/yjp-controller-api-redist.jar"/>
<property name="yourkit.agent" value="${yourkit.home}/bin/mac/libyjpagent.jnilib"/>
<property name="yourkit.jvm.opts" value="-agentpath:${yourkit.agent}"/>
<property name="yourkit.scalac.opts" value="-Yprofile:all"/>
</target>
<!-- Builds yourkit wrapper/jar and copies into lib/extra. -->
<target name="yourkit.build" depends="locker.done,yourkit.init">
<copy file="${yourkit.api.jar}" todir="${lib-extra.dir}"/>
<property name="yourkit.build.dir" value="${build-quick.dir}/classes/yourkit"/>
<mkdir dir="${yourkit.build.dir}"/>
<scalacfork
destdir="${yourkit.build.dir}"
compilerpathref="locker.classpath"
params="${scalac.args.all}"
srcdir="${src.dir}/yourkit"
jvmargs="${scalacfork.jvmargs}">
<include name="**/*.scala"/>
<compilationpath>
<path refid="locker.classpath"/>
</compilationpath>
</scalacfork>
<jar destfile="${lib-extra.dir}/scalac-yourkit.jar">
<fileset dir="${yourkit.build.dir}"/>
</jar>
</target>
<!-- Builds quick.lib/comp with profiling enabled. -->
<target name="yourkit.run" depends="yourkit.build">
<antcall target="clean"/>
<ant target="quick.lib" inheritall="false" inheritrefs="false">
<property name="jvm.opts" value="${yourkit.jvm.opts}"/>
<property name="scalac.args" value="${yourkit.scalac.opts}"/>
</ant>
<ant target="quick.comp" inheritall="false" inheritrefs="false">
<property name="jvm.opts" value="${yourkit.jvm.opts}"/>
<property name="scalac.args" value="${yourkit.scalac.opts}"/>
</ant>
<antcall target="build"/>
</target>
<target name="graph.init">
<taskdef name="vizant" classname="vizant.Vizant" classpath="${lib-ant.dir}/vizant.jar"/>
</target>
<target name="graph.clean" depends="graph.init">
<vizant antfile="${ant.file}" outfile="${ant.project.name}.dot" from="starr.clean"/>
</target>
<target name="graph.all" depends="graph.init">
<vizant antfile="${ant.file}" outfile="${ant.project.name}.dot" from="all.done"/>
</target>
<target name="graph.sabbus" depends="graph.init">
<vizant antfile="${ant.file}" outfile="${ant.project.name}.dot"/>
</target>
</project>
Jump to Line
Something went wrong with that request. Please try again.