summaryrefslogtreecommitdiff
path: root/build.xml
diff options
context:
space:
mode:
authorGilles Dubochet <gilles.dubochet@epfl.ch>2009-09-21 19:24:41 +0000
committerGilles Dubochet <gilles.dubochet@epfl.ch>2009-09-21 19:24:41 +0000
commit0f10ffedc8d0cdf8410cc6fc143a08a9333c9832 (patch)
treee933f41b1faa1d1c53c357c7664b4714daccefab /build.xml
parent4c29e778f1c95d60f24310c1898fa2fdf295db0f (diff)
downloadscala-0f10ffedc8d0cdf8410cc6fc143a08a9333c9832.tar.gz
scala-0f10ffedc8d0cdf8410cc6fc143a08a9333c9832.tar.bz2
scala-0f10ffedc8d0cdf8410cc6fc143a08a9333c9832.zip
SABBUS now builds FJBG, which sources are now p...
SABBUS now builds FJBG, which sources are now part of the Scala module.
Diffstat (limited to 'build.xml')
-rw-r--r--build.xml122
1 files changed, 95 insertions, 27 deletions
diff --git a/build.xml b/build.xml
index 3b8b20edec..b20b1d836a 100644
--- a/build.xml
+++ b/build.xml
@@ -3,7 +3,7 @@
<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. Use PackSabbus to package it for different install management tools such as Sbaz.
+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>
<!-- ===========================================================================
@@ -12,11 +12,15 @@ 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.optimise">
+
+ <target name="build-opt"
+ description="Builds the optimised Scala compiler and library. Executables are in 'build/pack/bin'.">
<property name="scalac.args.optimise" value="-optimise"/>
<antcall target="build"/>
</target>
- <target name="optimise" depends="build.optimise"/>
+
+ <target name="build.optimise"><antcall target="build"/></target> <!-- for compat, remove when unused -->
+ <target name="optimise"><antcall target="build"/></target> <!-- for compat, remove when unused -->
<target name="clean" depends="quick.clean"
description="Removes binaries of compiler and library. Distributions are untouched."/>
@@ -43,11 +47,15 @@ END-USER TARGETS
<antcall target="docs.clean"/>
<antcall target="all.done"/>
</target>
- <target name="dist.optimise">
+
+ <target name="dist-opt"
+ description="Makes a new optimised distribution and tests it. Will remove existing binaries and documentation.">
<property name="scalac.args.optimise" value="-optimise"/>
<antcall target="dist"/>
</target>
+ <target name="dist.optimise"><antcall target="optdist"/></target> <!-- for compat, remove when unused -->
+
<target name="fastdist" depends="dist.done"
description="Makes a new distribution without testing it or removing partially build elements"/>
<target name="fastdist.optimise">
@@ -58,8 +66,8 @@ END-USER TARGETS
<target name="distclean" depends="dist.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.">
+ <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 newstarrwin' instead.">
<condition>
<os family="windows"/>
@@ -71,15 +79,19 @@ END-USER TARGETS
<antcall target="locker.clean"/>
<antcall target="test.done"/>
</target>
- <target name="newstarr.optimise">
+
+ <target name="replacestarr-opt"
+ description="Replaces the Starr compiler and library by fresh, optimised ones built from current sources and tests them.">
<property name="scalac.args.optimise" value="-optimise"/>
<antcall target="newstarr"/>
</target>
+
+ <target name="newstarr.optimise"><antcall target="optnewstarr"/></target> <!-- for compat, remove when unused -->
<!-- Ant on Windows is not able to delete jar files that are referenced in any <path>.
See ticket 1290 on trac. -->
<target name="newstarrwin"
- description="Creates a new Starr on Windows. Manually execute 'ant locker.clean build' first!">
+ 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 newstarr' instead.">
<condition>
<not><os family="windows"/></not>
@@ -91,8 +103,8 @@ END-USER TARGETS
<antcall target="test.done"/>
</target>
- <target name="freshlocker"
- description="Replaces the Locker compiler and library by one built from current sources.">
+ <target name="replacelocker"
+ description="Replaces the Locker compiler and library by fresh ones built from current sources.">
<antcall target="palo.clean"/>
<antcall target="palo.done"/>
</target>
@@ -100,20 +112,24 @@ END-USER TARGETS
<property name="scalac.args.optimise" value="-optimise"/>
<antcall target="freshlocker"/>
</target>
+
+ <target name="replacelocker-opt"
+ description="Replaces the Locker compiler and library by fresh, optimised ones built from current sources.">
+ <property name="scalac.args.optimise" value="-optimise"/>
+ <antcall target="replacelocker"/>
+ </target>
+
+ <target name="newlocker.optimise"><antcall target="replacelocker"/></target> <!-- for compat, remove when unused -->
- <target name="newlocker"
- description="Unlocks the Locker compiler and library and lets them be updated by Scalac.">
+ <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="newlocker.optimise">
- <property name="scalac.args.optimise" value="-optimise"/>
- <antcall target="newlocker"/>
- </target>
<target name="newlibs"
- description="Forces compiler libraries (MSIL) to be rebuilt. Add this target before any other if class file format is incompatible.">
- <property name="libs.msil.outdated" value="yes"/>
+ description="Requires compiler libraries (MSIL and FJBG) to be rebuilt. Add this target before any other if class file format is incompatible.">
+ <property name="libs.outdated" value="yes"/>
</target>
<!-- ===========================================================================
@@ -349,7 +365,7 @@ LOCAL REFERENCE BUILD (LOCKER)
<delete dir="${build-locker.dir}" includeemptydirs="yes" quiet="yes" failonerror="no"/>
</target>
- <target name="locker.unlock" depends="quick.clean">
+ <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"/>
@@ -512,13 +528,13 @@ QUICK BUILD (QUICK)
<stopwatch name="quick.lib.timer" action="total"/>
</target>
- <target name="quick.newlibs" depends="quick.lib" if="libs.msil.outdated">
+ <target name="quick.newlibs" depends="quick.lib" if="libs.outdated">
<antcall target="libs.done"/>
- <property name="fjbg.jar" value="${lib.dir}/fjbg.jar"/>
+ <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.msil.outdated">
+ <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>
@@ -1121,7 +1137,53 @@ LIBRARIES (MSIL, FJBG maybe later)
</jar>
</target>
- <target name="libs.done" depends="libs.msilpack"/>
+ <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"
+ target="1.5" source="1.4">
+ <compilerarg line="${javac.args}"/>
+ </javac>
+ <!-- For now, JFBG is written in pure Java
+ <scalacfork
+ destdir="${build-libs.dir}/classes/fjbg"
+ compilerpathref="locker.classpath"
+ srcpath="${src.dir}/fjbg"
+ params="${scalac.args.all}"
+ srcdir="${src.dir}/fjbg"
+ jvmargs="${scalacfork.jvmargs}">
+ <include name="**/*.scala"/>
+ <compilationpath>
+ <pathelement location="${build-quick.dir}/classes/library"/>
+ <pathelement location="${build-libs.dir}/classes/fjbg"/>
+ </compilationpath>
+ </scalacfork>
+ -->
+ <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="libs.clean" depends="pack.clean">
<delete dir="${build-libs.dir}" includeemptydirs="yes" quiet="yes" failonerror="no"/>
@@ -1425,27 +1487,33 @@ STABLE REFERENCE (STARR)
<delete file="${basedir}/lib/scala-library-src.jar"/>
</target>
- <target name="starr.lib" depends="starr.clean">
+ <target name="starr.lib" depends="starr.start">
<copy file="${basedir}/build/pack/lib/scala-library.jar"
- toFile="${basedir}/lib/scala-library.jar"/>
+ toFile="${basedir}/lib/scala-library.jar"
+ overwrite="yes"/>
</target>
<target name="starr.comp" depends="starr.lib">
+ <delete file="${basedir}/lib/scala-compiler.jar"/>
<jar destfile="${basedir}/lib/scala-compiler.jar">
<fileset dir="${basedir}/build/quick/classes/compiler"/>
</jar>
</target>
<target name="starr.src" depends="starr.comp">
+ <delete file="${basedir}/lib/scala-library-src.jar"/>
<jar destfile="${basedir}/lib/scala-library-src.jar">
<fileset dir="${basedir}/src/library"/>
<fileset dir="${basedir}/src/actors"/>
</jar>
</target>
- <target name="starr.libs" depends="starr.src" if="libs.msil.outdated">
+ <target name="starr.libs" depends="starr.src" if="libs.outdated">
<copy toDir="${lib.dir}" overwrite="yes">
- <fileset dir="${build-libs.dir}" includes="*.jar"/>
+ <fileset dir="${build-libs.dir}">
+ <include name="fjbg.jar"/>
+ <include name="msil.jar"/>
+ </fileset>
</copy>
</target>