2005-10-11 17:39:32 +08:00
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id$ -->
2005-10-13 21:57:02 +08:00
2005-12-19 21:49:03 +08:00
<project name= "scala-core" default= "build" >
<description >
2006-05-11 23:29:25 +08:00
I am SABBUS for Scala core, the build system for the Scala compiler and core
2005-12-19 21:49:03 +08:00
library. Please check the 'docs/README' file for more information about me.
</description>
2006-03-02 22:01:45 +08:00
2006-03-15 07:54:05 +08:00
<echo level= "info" message= "Running SABBUS for ${ant.project.name}..." />
2005-12-19 21:49:03 +08:00
2005-12-24 02:17:24 +08:00
<!-- ===========================================================================
PROPERTIES
============================================================================ -->
2006-03-02 22:01:45 +08:00
2005-12-19 21:49:03 +08:00
<property environment= "env" />
<!-- Prevents system classpath from being used -->
<property name= "build.sysclasspath" value= "ignore" />
2006-05-11 23:29:25 +08:00
<!-- Defines the repository layout -->
2005-12-19 21:49:03 +08:00
<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" />
2006-05-11 23:29:25 +08:00
<!-- Loads custom properties definitions -->
<property name= "properties.file" value= "${basedir}/build.properties" />
2006-05-13 00:27:50 +08:00
<property file= "${properties.file}" />
2006-05-11 23:29:25 +08:00
<!-- Defines the product being built -->
2006-07-25 23:01:32 +08:00
<property name= "vendor.name" value= "LAMP/EPFL" />
2007-01-30 00:53:19 +08:00
<property name= "copyright.string" value= "(c) 2002-2007 ${vendor.name}" />
2007-10-02 01:06:37 +08:00
<property name= "java.flags" value= "-Xmx256M -Xms16M" />
2006-03-09 05:37:50 +08:00
<property name= "number.file" value= "${basedir}/build.number" />
2006-05-11 23:29:25 +08:00
<!-- Configuring how the compiler is run -->
2006-02-27 22:03:57 +08:00
<property name= "nsc.log-files" value= "no" />
2006-05-11 23:29:25 +08:00
<property name= "nsc.excludes.file" value= "${basedir}/build.excludes" />
2006-01-10 02:28:11 +08:00
<property name= "nsc.params" value= "" />
2006-05-11 23:29:25 +08:00
<!-- 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" />
2007-02-07 00:06:34 +08:00
<property name= "msil.jar" value= "${lib.dir}/msil.jar" />
2005-12-19 21:49:03 +08:00
<property name= "ant.jar" value= "${ant.home}/lib/ant.jar" />
2007-07-17 19:31:53 +08:00
<property name= "jline.jar" value= "${lib.dir}/jline.jar" />
2005-12-24 02:17:24 +08:00
<property name= "ant-contrib.jar" value= "${lib.dir}/ant-contrib.jar" />
2007-07-17 19:31:53 +08:00
2006-05-11 23:29:25 +08:00
<!-- Sets location of build folders -->
2005-12-20 01:17:19 +08:00
<property name= "build.dir" value= "${basedir}/build" />
<property name= "locker.dir" value= "${build.dir}/locker" />
<property name= "quick.dir" value= "${build.dir}/quick" />
<property name= "strap.dir" value= "${build.dir}/strap" />
2007-11-23 01:16:07 +08:00
<property name= "optimised.dir" value= "${build.dir}/optimised" />
2006-05-11 23:29:25 +08:00
<property name= "api-lib.dir" value= "${build.dir}/api-library" />
<property name= "api-comp.dir" value= "${build.dir}/api-compiler" />
2006-06-12 22:18:13 +08:00
<property name= "tooldocs.dir" value= "${build.dir}/tooldocs" />
2006-05-11 23:29:25 +08:00
<property name= "examples.dir" value= "${build.dir}/examples" />
2007-06-13 20:14:52 +08:00
<property name= "cldc.dir" value= "${build.dir}/cldc" />
2007-11-23 01:16:07 +08:00
<property name= "android.dir" value= "${build.dir}/android" />
2007-02-10 01:09:49 +08:00
<property name= "msil.dir" value= "${build.dir}/msil" />
2007-06-18 16:26:33 +08:00
<property name= "mono.dir" value= "${src.dir}/mono" />
2007-11-28 18:26:16 +08:00
2006-05-11 23:29:25 +08:00
<!-- Sets location and structure of the distribution -->
2005-12-20 01:17:19 +08:00
<property name= "dist.dir" value= "${basedir}/dists" />
2006-05-11 23:29:25 +08:00
<property name= "lib.jar.name" value= "scala-library.jar" />
<property name= "dbc.jar.name" value= "scala-dbc.jar" />
<property name= "comp.jar.name" value= "scala-compiler.jar" />
2007-09-11 23:41:12 +08:00
<property name= "partest.jar.name" value= "scala-partest.jar" />
2006-08-24 21:16:02 +08:00
<property name= "libsrc.jar.name" value= "scala-library-src.jar" />
<property name= "dbcsrc.jar.name" value= "scala-dbc-src.jar" />
2007-09-11 23:41:12 +08:00
<property name= "parsrc.jar.name" value= "scala-partest-src.jar" />
2006-08-24 21:16:02 +08:00
<property name= "compsrc.jar.name" value= "scala-compiler-src.jar" />
2006-05-11 23:29:25 +08:00
<property name= "scala.exec.name" value= "scala" />
2006-02-16 17:43:31 +08:00
<property name= "scalac.exec.name" value= "scalac" />
2006-03-08 18:08:40 +08:00
<property name= "scaladoc.exec.name" value= "scaladoc" />
2006-06-07 00:52:36 +08:00
<property name= "fsc.exec.name" value= "fsc" />
2007-01-30 00:53:19 +08:00
<property name= "comp.prop.name" value= "compiler.properties" />
2007-05-11 21:16:31 +08:00
<property name= "lib.prop.name" value= "library.properties" />
2007-11-14 01:49:56 +08:00
<property name= "par.prop.name" value= "partest.properties" />
2007-11-28 18:26:16 +08:00
2007-08-11 01:32:31 +08:00
<!-- if available, faster stability checking -->
<property name= "stability.tool" value= "/home/linuxsoft/apps/stability/stability" />
2007-11-28 18:26:16 +08:00
<!-- Sets location of Android installation -->
<condition property= "android.home" value= "${unix.android.home}" >
<and > <os family= "unix" /> <isset property= "unix.android.home" /> </and>
</condition>
<condition property= "android.home" value= "${win.android.home}" >
<and > <os family= "windows" /> <isset property= "win.android.home" /> </and>
</condition>
<property name= "android.home" value= "${env.ANDROID_HOME}" />
2005-12-24 02:17:24 +08:00
<!-- ===========================================================================
2007-05-02 00:18:11 +08:00
ANT INITIALISATION
2005-12-24 02:17:24 +08:00
============================================================================ -->
2005-12-23 02:21:56 +08:00
2007-04-12 22:49:30 +08:00
<target name= "ant-init" >
2006-05-11 23:29:25 +08:00
<!-- Making sure lib/ contains everything that is needed -->
<fail message= "A required library is missing in 'lib/'. The README file describes what should be there." >
2005-12-19 21:49:03 +08:00
<condition > <not > <and >
2006-05-11 23:29:25 +08:00
<available file= "${lib.starr.jar}" />
<available file= "${comp.starr.jar}" />
<available file= "${fjbg.jar}" />
2007-02-07 00:06:34 +08:00
<available file= "${msil.jar}" />
2006-05-11 23:29:25 +08:00
<available file= "${ant-contrib.jar}" />
2005-12-19 21:49:03 +08:00
</and> </not> </condition>
</fail>
2006-05-11 23:29:25 +08:00
<!-- Setting - up Ant contrib tasks -->
<taskdef resource= "net/sf/antcontrib/antlib.xml"
classpath="${ant-contrib.jar}"/>
2006-12-15 22:34:27 +08:00
<fail message= "External library ${ant-contrib.jar} requires the optional Ant tasks to be installed" >
<condition > <not > <and >
2006-12-17 15:54:53 +08:00
<available file= "${ant.home}/lib/ant-nodeps.jar" />
2006-12-15 22:34:27 +08:00
</and> </not> </condition>
</fail>
2007-04-03 19:13:36 +08:00
</target>
2007-05-02 00:18:11 +08:00
<!-- ===========================================================================
INITIALISATION
============================================================================ -->
2007-04-12 22:49:30 +08:00
<target name= "init" depends= "ant-init" unless= "init.avail" >
2006-05-11 23:29:25 +08:00
<!-- Making sure enough memory is available -->
<propertyregex
property="memory.set" input="${env.ANT_OPTS}" select="\1"
regexp="-Xmx([1-9][0-9]{3,}|[6-9][0-9]{2}|5[2-9][0-9]|51[2-9])(M|m)"/>
<fail
unless="memory.set"
message="SABBUS requires additional memory. Please set the 'ANT_OPTS' environment property to '-Xmx512M' or more."/>
2007-05-10 22:06:54 +08:00
<propertyregex
property="memory.info" input="${env.ANT_OPTS}" defaultValue=""
select=" (raise to 600 MB for performance)"
regexp="-Xmx([1-5][0-9]{2})(M|m)"/>
2006-05-11 23:29:25 +08:00
<!-- This is the start time for the distribution -->
<stopwatch name= "timer.dist" />
<tstamp prefix= "time" >
<format property= "human" pattern= "EEEE, d MMMM yyyy, HH:mm:ss (zz)" />
<format property= "short" pattern= "yyyyMMdd-HHmmss" />
</tstamp>
<!-- Finding out what system architecture is being used -->
<condition property= "os.win" > <os family= "windows" /> </condition>
<if > <isset property= "os.win" /> <then >
<exec
executable="cygpath" vmlauncher="no"
errorproperty="cygpath.err" outputproperty="cygpath.out">
<arg value= "--windir" />
</exec>
<condition property= "os.cygwin" >
<equals arg1= "${cygpath.err}" arg2= "" />
</condition>
</then> </if>
<condition property= "os.unix" > <or >
<os family= "unix" />
<os family= "mac" />
<isset property= "os.cygwin" />
</or> </condition>
2005-12-24 02:17:24 +08:00
<if > <isset property= "os.cygwin" />
2006-03-06 22:12:09 +08:00
<then > <property name= "os.type" value= "Cygwin" /> </then>
2005-12-24 02:17:24 +08:00
<elseif > <isset property= "os.win" />
2006-03-06 22:12:09 +08:00
<then > <property name= "os.type" value= "Windows" /> </then>
2005-12-24 02:17:24 +08:00
</elseif>
<elseif > <isset property= "os.unix" />
2006-03-06 22:12:09 +08:00
<then > <property name= "os.type" value= "UNIX" /> </then>
2005-12-24 02:17:24 +08:00
</elseif>
2006-05-11 23:29:25 +08:00
<else > <fail > System environment could not be determined</fail> </else>
2005-12-24 02:17:24 +08:00
</if>
2007-01-31 22:31:04 +08:00
<!-- Setting flag for Java versions 1.4.x -->
2007-02-01 00:50:32 +08:00
<condition property= "java14" >
2007-01-31 22:31:04 +08:00
<contains string= "${java.version}" substring= "1.4" />
</condition>
2006-05-11 23:29:25 +08:00
<!-- Finding out SVN revision -->
2007-03-28 17:26:13 +08:00
<exec
executable="svn" vmlauncher="no"
errorproperty="svn.err" outputproperty="svn.out">
<arg line= " info ${basedir}" />
</exec>
2007-02-01 01:38:08 +08:00
<propertyregex
2007-03-28 17:26:13 +08:00
property="svn.number" input="${svn.out}" select="\1"
regexp="Revision: ([0-9]+)"
2007-02-01 01:38:08 +08:00
defaultValue="x"/>
2006-03-09 23:16:53 +08:00
<property name= "init.avail" value= "yes" />
2006-05-11 23:29:25 +08:00
<!-- Printing out some information about what environment I am running in -->
<echo level= "info"
2007-05-10 22:06:54 +08:00
message="OS: ${os.type} (${os.name} ${os.arch} ${os.version});"/>
2006-05-11 23:29:25 +08:00
<echo level= "info"
2007-05-10 22:06:54 +08:00
message="Java: ${java.vm.name} ${java.vm.version} ('${java.home}');"/>
2006-05-11 23:29:25 +08:00
<echo level= "info"
2007-05-10 22:06:54 +08:00
message="Memory: ${memory.set} MB${memory.info};"/>
2006-05-11 23:29:25 +08:00
<echo level= "info"
2007-05-10 22:06:54 +08:00
message="Ant: ${ant.version}."/>
2006-01-21 00:38:11 +08:00
</target>
2006-03-02 22:01:45 +08:00
2006-05-11 23:29:25 +08:00
<!-- ===========================================================================
SETUP
============================================================================ -->
2006-01-21 00:38:11 +08:00
<target name= "setup" depends= "init" >
2007-05-02 00:18:11 +08:00
<!-- Creating class - pathes -->
<path id= "starr.classpath" >
<pathelement location= "${lib.starr.jar}" />
<pathelement location= "${comp.starr.jar}" />
<pathelement location= "${fjbg.jar}" />
<pathelement location= "${msil.jar}" />
<pathelement location= "${ant.jar}" />
2007-07-17 19:31:53 +08:00
<pathelement location= "${jline.jar}" />
2007-05-02 00:18:11 +08:00
</path>
2006-05-11 23:29:25 +08:00
<!-- Creating boot - level tasks -->
2006-03-06 22:12:09 +08:00
<taskdef
name="starr"
classname="scala.tools.ant.Scalac"
2006-05-11 23:29:25 +08:00
classpathref="starr.classpath"/>
2006-03-06 22:12:09 +08:00
<taskdef
name="starrtool"
classname="scala.tools.ant.ScalaTool"
2006-05-11 23:29:25 +08:00
classpathref="starr.classpath" />
<!-- Removing any outdated stuff -->
2006-01-21 00:15:13 +08:00
<if >
<and >
<available file= "${locker.dir}/complete" />
<not > <uptodate targetfile= "${locker.dir}/complete" >
<srcfiles dir= "${lib.dir}" includes= "scala-*.jar" />
</uptodate> </not>
</and>
<then >
2006-05-11 23:29:25 +08:00
<echo level= "warning"
message="STARR updated: LOCKER is obsolete and will be rebuilt."/>
2006-03-06 22:12:09 +08:00
<runtarget target= "clean.build" />
2006-01-21 00:15:13 +08:00
</then>
</if>
2006-05-11 23:29:25 +08:00
<!-- Finding out what is available -->
<available property= "excludes.avail" file= "${nsc.excludes.file}" />
2006-01-21 00:15:13 +08:00
<condition property= "locker.avail" >
<available file= "${locker.dir}/complete" />
</condition>
2006-05-11 23:29:25 +08:00
<!-- Generating version number -->
2006-03-09 23:16:53 +08:00
<property file= "${number.file}" />
2006-03-06 22:12:09 +08:00
<property
2006-03-09 23:16:53 +08:00
name="version.number"
2006-08-04 20:00:04 +08:00
value="${version.major}.${version.minor}.${version.patch}.${svn.number}.${time.short}"/>
2006-05-11 23:29:25 +08:00
<!-- And print - out what we are building -->
<echo level= "info" message= "Build number is '${version.number}'" />
<echo level= "info" message= "Built ${time.human} from SVN revision ${svn.number}" />
2005-12-19 21:49:03 +08:00
</target>
2006-03-02 22:01:45 +08:00
2006-01-21 00:38:11 +08:00
<target name= "setup.locker" depends= "setup, build.locker" >
2006-05-11 23:29:25 +08:00
<path id= "locker.classpath" >
<pathelement location= "${locker.dir}/lib/library" />
<pathelement location= "${locker.dir}/lib/compiler" />
<pathelement location= "${fjbg.jar}" />
2007-02-07 00:06:34 +08:00
<pathelement location= "${msil.jar}" />
2006-05-11 23:29:25 +08:00
</path>
2006-03-06 22:12:09 +08:00
<taskdef
name="locker"
classname="scala.tools.ant.Scalac"
2006-05-11 23:29:25 +08:00
classpathref="locker.classpath"/>
2005-12-19 21:49:03 +08:00
</target>
2006-03-02 22:01:45 +08:00
2006-01-21 00:38:11 +08:00
<target name= "setup.quick" depends= "setup, build" >
2006-05-11 23:29:25 +08:00
<path id= "quick.classpath" >
<pathelement location= "${quick.dir}/lib/library" />
<pathelement location= "${quick.dir}/lib/compiler" />
<pathelement location= "${fjbg.jar}" />
2007-02-07 00:06:34 +08:00
<pathelement location= "${msil.jar}" />
2006-05-11 23:29:25 +08:00
</path>
2006-03-06 22:12:09 +08:00
<taskdef
2006-05-11 23:29:25 +08:00
name="quick" classname="scala.tools.ant.Scalac"
classpathref="quick.classpath"/>
2006-03-06 22:12:09 +08:00
<taskdef
2006-05-11 23:29:25 +08:00
name="quicksbaz" classname="scala.tools.ant.ScalaBazaar"
classpathref="quick.classpath"/>
2006-03-09 00:29:16 +08:00
<taskdef
2006-05-11 23:29:25 +08:00
name="quickdoc" classname="scala.tools.ant.Scaladoc"
2006-09-21 21:13:43 +08:00
classpathref="quick.classpath"/>
2005-12-19 21:49:03 +08:00
</target>
2005-12-24 02:17:24 +08:00
<!-- ===========================================================================
BUILD SUPPORT MACROS
============================================================================ -->
2006-03-02 22:01:45 +08:00
2006-01-09 21:07:02 +08:00
<macrodef name= "build.support" >
<attribute name= "build.dir" />
<sequential >
2006-05-11 23:29:25 +08:00
<copy todir= "@{build.dir}/lib/library" >
<fileset dir= "${src.dir}/library" >
2006-01-09 21:07:02 +08:00
<include name= "**/*.tmpl" />
<include name= "**/*.xml" />
2006-03-09 00:29:16 +08:00
<include name= "**/*.js" />
<include name= "**/*.css" />
2006-01-09 21:07:02 +08:00
</fileset>
</copy>
2006-05-11 23:29:25 +08:00
<copy todir= "@{build.dir}/lib/compiler" >
<fileset dir= "${src.dir}/compiler" >
2006-01-09 21:07:02 +08:00
<include name= "**/*.tmpl" />
<include name= "**/*.xml" />
2006-03-09 00:29:16 +08:00
<include name= "**/*.js" />
<include name= "**/*.css" />
2006-01-09 21:07:02 +08:00
</fileset>
</copy>
</sequential>
</macrodef>
2006-03-02 22:01:45 +08:00
2006-01-21 00:15:13 +08:00
<macrodef name= "build.links" >
<attribute name= "build.dir" />
<sequential >
2006-05-11 23:29:25 +08:00
<if > <not > <available file= "@{build.dir}/lib/fjbg.jar" /> </not> <then >
2006-07-15 01:00:28 +08:00
<if > <isset property= "os.win" /> <then >
<copy file= "${fjbg.jar}" tofile= "@{build.dir}/lib/fjbg.jar" />
</then> <else >
2006-05-11 23:29:25 +08:00
<symlink
link="@{build.dir}/lib/fjbg.jar"
resource="${fjbg.jar}" overwrite="yes" failonerror="no"/>
</else> </if>
</then> </if>
2007-02-07 00:06:34 +08:00
<if > <not > <available file= "@{build.dir}/lib/msil.jar" /> </not> <then >
<if > <isset property= "os.win" /> <then >
<copy file= "${msil.jar}" tofile= "@{build.dir}/lib/msil.jar" />
</then> <else >
<symlink
link="@{build.dir}/lib/msil.jar"
resource="${msil.jar}" overwrite="yes" failonerror="no"/>
</else> </if>
</then> </if>
2007-07-17 19:31:53 +08:00
<if > <not > <available file= "@{build.dir}/lib/jline.jar" /> </not> <then >
<if > <isset property= "os.win" /> <then >
<copy file= "${jline.jar}" tofile= "@{build.dir}/lib/jline.jar" />
</then> <else >
<symlink
link="@{build.dir}/lib/jline.jar"
resource="${jline.jar}" overwrite="yes" failonerror="no"/>
</else> </if>
</then> </if>
2006-01-21 00:15:13 +08:00
</sequential>
</macrodef>
2005-12-22 09:50:44 +08:00
2005-12-24 02:17:24 +08:00
<!-- ===========================================================================
BUILD LOCAL REFERENCE (LOCKER) LAYER
============================================================================ -->
2006-01-21 00:15:13 +08:00
2006-03-20 23:58:47 +08:00
<target name= "newlocker"
2006-03-06 22:12:09 +08:00
depends="clean.unfreeze, build.locker"
2006-05-11 23:29:25 +08:00
description="Rebuilds LOCKER from the current sources"/>
2006-03-02 22:01:45 +08:00
2006-01-21 00:38:11 +08:00
<target name= "build.locker" depends= "setup" unless= "locker.avail" >
2005-12-24 02:17:24 +08:00
<property name= "built.locker" value= "yes" />
2006-03-02 22:01:45 +08:00
<stopwatch name= "timer.locker" />
2006-05-11 23:29:25 +08:00
<!-- Build library -->
2007-03-29 19:13:45 +08:00
<if > <and >
<isset property= "os.unix" />
<isset property= "build.resource" /> </and>
<then >
<symlink
link="${build.dir}"
resource="${build.resource}" overwrite="yes" failonerror="no"/>
2007-04-03 19:13:36 +08:00
<touch file= "${build.dir}/is_symlink" verbose= "no" />
2007-03-29 19:13:45 +08:00
</then> </if>
2006-05-11 23:29:25 +08:00
<mkdir dir= "${locker.dir}/lib/library" />
2006-04-10 19:02:41 +08:00
<javac
2006-05-11 23:29:25 +08:00
srcdir="${src.dir}/library"
destdir="${locker.dir}/lib/library"
source="1.4" target="1.4" deprecation="yes"
classpath="${locker.dir}/lib/library"
includes="**/*.java"/>
2006-03-06 22:12:09 +08:00
<starr
2006-05-11 23:29:25 +08:00
srcdir="${src.dir}/library"
destdir="${locker.dir}/lib/library"
2007-04-25 00:25:09 +08:00
usepredefs="no"
addparams="${nsc.params}"
deprecation="yes" unchecked="yes"
2006-05-11 23:29:25 +08:00
classpath="${locker.dir}/lib/library"
includes="scala/Predef.scala"/>
2006-03-06 22:12:09 +08:00
<starr
2006-05-11 23:29:25 +08:00
srcdir="${src.dir}/library"
destdir="${locker.dir}/lib/library"
2007-04-25 00:25:09 +08:00
addparams="${nsc.params}"
2007-04-10 23:53:35 +08:00
deprecation="yes" unchecked="yes"
2006-05-11 23:29:25 +08:00
classpath="${locker.dir}/lib/library">
2005-12-19 21:49:03 +08:00
<include name= "**/*.scala" />
<exclude name= "scala/Predef.scala" />
2006-03-20 23:58:47 +08:00
<exclude name= "scala/dbc/**" />
2006-06-21 20:35:21 +08:00
<exclude name= "scala/actors/**" />
2006-05-11 23:29:25 +08:00
<excludesfile name= "${nsc.excludes.file}" if= "excludes.avail" />
2005-12-19 21:49:03 +08:00
</starr>
2007-05-11 21:16:31 +08:00
<echo
file="${locker.dir}/lib/library/${lib.prop.name}"
message="version.number=${version.number}${line.separator}"
append="false"
/>
<echo
file="${locker.dir}/lib/library/${lib.prop.name}"
message="copyright.string=${copyright.string}${line.separator}"
append="true"
/>
2006-05-11 23:29:25 +08:00
<!-- Build compiler -->
<mkdir dir= "${locker.dir}/lib/compiler" />
2006-03-06 22:12:09 +08:00
<starr
2006-05-11 23:29:25 +08:00
srcdir="${src.dir}/compiler"
2006-10-24 19:46:11 +08:00
destdir="${locker.dir}/lib/compiler"
2007-04-25 00:25:09 +08:00
addparams="${nsc.params}"
2007-04-10 23:53:35 +08:00
deprecation="yes" unchecked="yes">
2005-12-19 21:49:03 +08:00
<classpath >
2006-05-11 23:29:25 +08:00
<pathelement location= "${locker.dir}/lib/library" />
<pathelement location= "${locker.dir}/lib/compiler" />
2006-05-08 23:15:42 +08:00
<pathelement location= "${fjbg.jar}" />
2007-02-07 00:06:34 +08:00
<pathelement location= "${msil.jar}" />
2005-12-19 21:49:03 +08:00
<pathelement location= "${ant.jar}" />
2007-07-17 19:31:53 +08:00
<pathelement location= "${jline.jar}" />
2005-12-19 21:49:03 +08:00
</classpath>
<include name= "**/*.scala" />
2006-05-11 23:29:25 +08:00
<excludesfile name= "${nsc.excludes.file}" if= "excludes.avail" />
2005-12-19 21:49:03 +08:00
</starr>
2007-01-30 00:53:19 +08:00
<echo
file="${locker.dir}/lib/compiler/${comp.prop.name}"
message="version.number=${version.number}${line.separator}"
append="false"
/>
<echo
file="${locker.dir}/lib/compiler/${comp.prop.name}"
message="copyright.string=${copyright.string}${line.separator}"
append="true"
/>
2006-05-11 23:29:25 +08:00
<!-- Timing the build -->
2006-03-02 22:01:45 +08:00
<stopwatch name= "timer.locker" action= "total" />
2006-05-11 23:29:25 +08:00
<!-- Copy support files to build folder and links external libraries -->
2006-01-09 21:07:02 +08:00
<build.support build.dir= "${locker.dir}" />
2006-03-30 20:42:03 +08:00
<build.links build.dir= "${locker.dir}" />
2006-05-11 23:29:25 +08:00
<!-- Build executable files -->
2006-03-30 20:42:03 +08:00
<taskdef
name="lockertool"
classname="scala.tools.ant.ScalaTool"
2006-05-11 23:29:25 +08:00
classpathref="locker.classpath"/>
<mkdir dir= "${locker.dir}/bin" />
2006-03-30 20:42:03 +08:00
<lockertool
2006-05-11 23:29:25 +08:00
file="${locker.dir}/bin/${scala.exec.name}"
2006-03-30 20:42:03 +08:00
version="${version.number}"
2006-06-15 23:43:19 +08:00
copyright="${copyright.string}"
name="Scala code runner"
class="scala.tools.nsc.MainGenericRunner"
2007-10-01 17:09:59 +08:00
javaFlags="${java.flags}"/>
2006-03-30 20:42:03 +08:00
<lockertool
2006-05-11 23:29:25 +08:00
file="${locker.dir}/bin/${scalac.exec.name}"
2006-03-30 20:42:03 +08:00
name="Scala compiler"
class="scala.tools.nsc.Main"
version="${version.number}"
2006-05-11 23:29:25 +08:00
copyright="${copyright.string}"
2007-10-01 17:09:59 +08:00
javaFlags="${java.flags}"/>
2006-03-30 20:42:03 +08:00
<lockertool
2006-05-11 23:29:25 +08:00
file="${locker.dir}/bin/${scaladoc.exec.name}"
2006-03-30 20:42:03 +08:00
name="Scala doc generator"
class="scala.tools.nsc.Main"
2007-07-16 20:16:33 +08:00
toolflags="-Ydoc"
2006-03-30 20:42:03 +08:00
version="${version.number}"
2006-05-11 23:29:25 +08:00
copyright="${copyright.string}"
2007-10-01 17:09:59 +08:00
javaFlags="${java.flags}"/>
2006-06-07 00:52:36 +08:00
<lockertool
file="${locker.dir}/bin/${fsc.exec.name}"
name="Fast Scala compiler"
class="scala.tools.nsc.CompileClient"
version="${version.number}"
copyright="${copyright.string}"
2007-10-01 17:09:59 +08:00
javaFlags="${java.flags}"/>
2006-05-11 23:29:25 +08:00
<chmod perm= "ugo+rx"
file="${locker.dir}/bin/${scalac.exec.name}"/>
<chmod perm= "ugo+rx"
file="${locker.dir}/bin/${scala.exec.name}"/>
<chmod perm= "ugo+rx"
file="${locker.dir}/bin/${scaladoc.exec.name}"/>
2006-06-07 00:52:36 +08:00
<chmod perm= "ugo+rx"
file="${locker.dir}/bin/${fsc.exec.name}"/>
2006-07-15 01:33:32 +08:00
<fixcrlf
srcdir="${locker.dir}/bin"
eol="dos"
includes="**/*.bat"/>
2006-05-18 23:48:23 +08:00
<!-- Mark LOCKER as being completely built -->
2006-01-21 00:15:13 +08:00
<touch file= "${locker.dir}/complete" verbose= "no" />
2005-12-19 21:49:03 +08:00
</target>
2005-12-24 02:17:24 +08:00
<!-- ===========================================================================
BUILD QUICK-TEST LAYER
============================================================================ -->
2006-03-02 22:01:45 +08:00
2006-05-11 23:29:25 +08:00
<target name= "build" depends= "setup.locker"
description="Builds a quick-test (QUICK) version of the compiler">
2006-03-02 22:01:45 +08:00
<stopwatch name= "timer.quick" />
2006-05-11 23:29:25 +08:00
<!-- Build library -->
<mkdir dir= "${quick.dir}/lib/library" />
2006-04-10 19:02:41 +08:00
<javac
2006-05-11 23:29:25 +08:00
srcdir="${src.dir}/library"
destdir="${quick.dir}/lib/library"
source="1.4" target="1.4" deprecation="yes"
classpath="${quick.dir}/lib/library"
includes="**/*.java"/>
2006-03-06 22:12:09 +08:00
<locker
2006-05-11 23:29:25 +08:00
srcdir="${src.dir}/library"
destdir="${quick.dir}/lib/library"
2007-04-25 00:25:09 +08:00
usepredefs="no"
addparams="${nsc.params}"
2007-04-10 23:53:35 +08:00
deprecation="yes" unchecked="yes"
2006-03-06 22:12:09 +08:00
scalacdebugging="${nsc.log-files}"
2006-05-11 23:29:25 +08:00
classpath="${quick.dir}/lib/library"
includes="scala/Predef.scala"/>
2006-03-06 22:12:09 +08:00
<locker
2006-05-11 23:29:25 +08:00
srcdir="${src.dir}/library"
destdir="${quick.dir}/lib/library"
2007-04-10 23:53:35 +08:00
addparams="${nsc.params}"
deprecation="yes" unchecked="yes"
2006-03-06 22:12:09 +08:00
scalacdebugging="${nsc.log-files}"
2006-05-11 23:29:25 +08:00
classpath="${quick.dir}/lib/library">
2005-12-19 21:49:03 +08:00
<include name= "**/*.scala" />
<exclude name= "scala/Predef.scala" />
2006-03-20 23:58:47 +08:00
<exclude name= "scala/dbc/**" />
2006-06-21 20:35:21 +08:00
<exclude name= "scala/actors/**" />
2006-05-11 23:29:25 +08:00
<excludesfile name= "${nsc.excludes.file}" if= "excludes.avail" />
2006-03-20 23:58:47 +08:00
</locker>
2007-05-11 21:16:31 +08:00
<echo
file="${quick.dir}/lib/library/${lib.prop.name}"
message="version.number=${version.number}${line.separator}"
append="false"
/>
<echo
file="${quick.dir}/lib/library/${lib.prop.name}"
message="copyright.string=${copyright.string}${line.separator}"
append="true"
/>
2006-05-11 23:29:25 +08:00
<!-- Build DBC -->
<mkdir dir= "${quick.dir}/lib/dbc" />
2006-03-20 23:58:47 +08:00
<locker
2006-05-11 23:29:25 +08:00
srcdir="${src.dir}/dbc"
destdir="${quick.dir}/lib/dbc"
2007-04-10 23:53:35 +08:00
addparams="${nsc.params}"
deprecation="yes" unchecked="yes"
2006-05-11 23:29:25 +08:00
scalacdebugging="${nsc.log-files}">
2006-03-20 23:58:47 +08:00
<classpath >
2006-05-11 23:29:25 +08:00
<pathelement location= "${quick.dir}/lib/library" />
<pathelement location= "${quick.dir}/lib/dbc" />
2006-03-20 23:58:47 +08:00
</classpath>
<include name= "scala/dbc/**/*.scala" />
2006-05-11 23:29:25 +08:00
<excludesfile name= "${nsc.excludes.file}" if= "excludes.avail" />
2005-12-19 21:49:03 +08:00
</locker>
2006-06-21 20:35:21 +08:00
<!-- Build actors library -->
<mkdir dir= "${quick.dir}/lib/actors" />
2007-02-19 19:33:47 +08:00
<javac
srcdir="${src.dir}/actors"
destdir="${quick.dir}/lib/actors"
source="1.4" target="1.4" deprecation="yes"
classpath="${quick.dir}/lib/actors"
includes="scala/actors/**/*.java"/>
2006-06-21 20:35:21 +08:00
<locker
srcdir="${src.dir}/actors"
destdir="${quick.dir}/lib/actors"
2007-04-10 23:53:35 +08:00
addparams="${nsc.params}"
deprecation="yes" unchecked="yes"
2006-06-21 20:35:21 +08:00
scalacdebugging="${nsc.log-files}">
<classpath >
<pathelement location= "${quick.dir}/lib/library" />
<pathelement location= "${quick.dir}/lib/actors" />
</classpath>
<include name= "scala/actors/**/*.scala" />
<excludesfile name= "${nsc.excludes.file}" if= "excludes.avail" />
</locker>
2006-05-11 23:29:25 +08:00
<!-- Build compiler -->
<mkdir dir= "${quick.dir}/lib/compiler" />
2006-03-06 22:12:09 +08:00
<locker
2006-05-11 23:29:25 +08:00
srcdir="${src.dir}/compiler"
destdir="${quick.dir}/lib/compiler"
2007-04-11 01:13:47 +08:00
addparams="${nsc.params}"
deprecation="yes" unchecked="yes"
2006-05-11 23:29:25 +08:00
scalacdebugging="${nsc.log-files}">
2005-12-19 21:49:03 +08:00
<classpath >
2006-05-11 23:29:25 +08:00
<pathelement location= "${quick.dir}/lib/library" />
<pathelement location= "${quick.dir}/lib/compiler" />
2006-05-08 23:15:42 +08:00
<pathelement location= "${fjbg.jar}" />
2007-02-07 00:06:34 +08:00
<pathelement location= "${msil.jar}" />
2005-12-19 21:49:03 +08:00
<pathelement location= "${ant.jar}" />
2007-07-17 19:31:53 +08:00
<pathelement location= "${jline.jar}" />
2005-12-19 21:49:03 +08:00
</classpath>
<include name= "**/*.scala" />
2006-05-11 23:29:25 +08:00
<excludesfile name= "${nsc.excludes.file}" if= "excludes.avail" />
2005-12-19 21:49:03 +08:00
</locker>
2007-01-30 00:53:19 +08:00
<echo
file="${quick.dir}/lib/compiler/${comp.prop.name}"
message="version.number=${version.number}${line.separator}"
append="false"
/>
<echo
file="${quick.dir}/lib/compiler/${comp.prop.name}"
message="copyright.string=${copyright.string}${line.separator}"
append="true"
/>
2007-09-11 23:41:12 +08:00
<!-- Build partest -->
<mkdir dir= "${quick.dir}/lib/partest" />
2007-11-23 01:16:07 +08:00
<locker
2007-09-11 23:41:12 +08:00
srcdir="${src.dir}/partest"
destdir="${quick.dir}/lib/partest"
addparams="${nsc.params}"
deprecation="yes" unchecked="yes">
<classpath >
<pathelement location= "${quick.dir}/lib/library" />
<pathelement location= "${quick.dir}/lib/compiler" />
<pathelement location= "${quick.dir}/lib/actors" />
</classpath>
2007-11-23 01:16:07 +08:00
</locker>
2007-11-14 01:49:56 +08:00
<echo
file="${quick.dir}/lib/partest/${par.prop.name}"
message="version.number=${version.number}${line.separator}"
append="false"
/>
<echo
file="${quick.dir}/lib/partest/${par.prop.name}"
message="copyright.string=${copyright.string}${line.separator}"
append="true"
/>
2006-05-11 23:29:25 +08:00
<!-- Timing the build -->
2006-03-02 22:01:45 +08:00
<stopwatch name= "timer.quick" action= "total" />
2006-05-11 23:29:25 +08:00
<!-- Copy support files to build folder and links external libraries -->
2006-01-09 21:07:02 +08:00
<build.support build.dir= "${quick.dir}" />
2006-01-21 00:15:13 +08:00
<build.links build.dir= "${quick.dir}" />
2006-05-11 23:29:25 +08:00
<!-- Build executable files -->
2006-03-30 20:42:03 +08:00
<taskdef
name="quicktool"
classname="scala.tools.ant.ScalaTool"
2006-05-11 23:29:25 +08:00
classpathref="quick.classpath"/>
<mkdir dir= "${quick.dir}/bin" />
2006-03-30 20:42:03 +08:00
<quicktool
2006-05-11 23:29:25 +08:00
file="${quick.dir}/bin/${scala.exec.name}"
2006-03-20 23:58:47 +08:00
version="${version.number}"
2006-05-11 23:29:25 +08:00
copyright="${copyright.string}"
2006-06-15 23:43:19 +08:00
name="Scala code runner"
class="scala.tools.nsc.MainGenericRunner"
2007-10-01 17:09:59 +08:00
javaFlags="${java.flags}"/>
2006-03-30 20:42:03 +08:00
<quicktool
2006-05-11 23:29:25 +08:00
file="${quick.dir}/bin/${scalac.exec.name}"
2006-03-06 22:12:09 +08:00
name="Scala compiler"
class="scala.tools.nsc.Main"
version="${version.number}"
2006-05-11 23:29:25 +08:00
copyright="${copyright.string}"
2007-10-01 17:09:59 +08:00
javaFlags="${java.flags}"/>
2006-03-30 20:42:03 +08:00
<quicktool
2006-05-11 23:29:25 +08:00
file="${quick.dir}/bin/${scaladoc.exec.name}"
2006-03-08 18:08:40 +08:00
name="Scala doc generator"
class="scala.tools.nsc.Main"
2007-07-16 20:16:33 +08:00
toolflags="-Ydoc"
2006-03-08 18:08:40 +08:00
version="${version.number}"
2006-05-11 23:29:25 +08:00
copyright="${copyright.string}"
2007-10-01 17:09:59 +08:00
javaFlags="${java.flags}"/>
2006-06-07 00:52:36 +08:00
<quicktool
file="${quick.dir}/bin/${fsc.exec.name}"
2006-06-09 02:50:25 +08:00
name="Fast Scala compiler"
2006-06-07 00:52:36 +08:00
class="scala.tools.nsc.CompileClient"
version="${version.number}"
copyright="${copyright.string}"/>
2006-05-11 23:29:25 +08:00
<chmod perm= "ugo+rx"
file="${quick.dir}/bin/${scalac.exec.name}"/>
<chmod perm= "ugo+rx"
file="${quick.dir}/bin/${scala.exec.name}"/>
<chmod perm= "ugo+rx"
file="${quick.dir}/bin/${scaladoc.exec.name}"/>
2006-06-07 00:52:36 +08:00
<chmod perm= "ugo+rx"
file="${quick.dir}/bin/${fsc.exec.name}"/>
2006-07-15 01:33:32 +08:00
<fixcrlf
srcdir="${quick.dir}/bin"
eol="dos"
includes="**/*.bat"/>
2005-12-19 21:49:03 +08:00
</target>
2006-03-02 22:01:45 +08:00
2006-01-21 00:18:24 +08:00
<target name= "test.quick" depends= "build" >
2006-06-07 20:52:09 +08:00
<echo level= "info"
2006-05-11 23:29:25 +08:00
message="Ant test bench is not available yet."/>
2006-01-21 00:15:13 +08:00
</target>
2005-12-19 21:49:03 +08:00
2007-06-13 20:14:52 +08:00
<!-- ===========================================================================
CLDC
============================================================================ -->
2007-11-20 02:52:02 +08:00
<property name= "cldcapi.jar" value= "${lib.dir}/cldcapi10.jar" />
2007-11-21 02:35:24 +08:00
<property name= "midpapi.jar" value= "${lib.dir}/midpapi10.jar" />
2007-06-13 20:14:52 +08:00
<target name= "cldc.sources"
description="Create the source directory for the J2ME (CLDC) library"
>
<mkdir dir= "${cldc.dir}/src" />
<copy todir= "${cldc.dir}/src" >
<fileset dir= "${src.dir}/library" includes= "**/*.scala, **/*.java" >
<not >
<present targetdir= "${src.dir}/cldc-library" />
</not>
<exclude name= "**/jcl/**" />
<exclude name= "**/ref/**" />
<exclude name= "**/compat/**" />
<exclude name= "**/concurrent/**" />
<exclude name= "**/runtime/RichFloat.scala" />
<exclude name= "**/runtime/RichDouble.scala" />
<exclude name= "**/util/**" />
<exclude name= "**/xml/**" />
</fileset>
</copy>
<copy todir= "${cldc.dir}/src" >
<fileset dir= "${src.dir}/cldc-library" >
<include name= "**/*.scala" />
<include name= "**/*.java" />
</fileset>
</copy>
</target>
2007-11-28 03:49:42 +08:00
<target name= "cldc.libraries"
2007-06-13 20:14:52 +08:00
depends="setup.quick, cldc.sources"
description="Builds the Scala library for J2ME (CLDC)"
>
2007-11-20 02:52:02 +08:00
<mkdir dir= "${cldc.dir}/lib/library" />
2007-11-22 17:28:19 +08:00
<!-- javac versions > 1.4 do not support 1.1 target anymore -->
2007-06-13 20:14:52 +08:00
<javac
srcdir="${cldc.dir}/src"
2007-11-20 02:52:02 +08:00
destdir="${cldc.dir}/lib/library"
2007-11-22 17:28:19 +08:00
compiler="javac1.4"
2007-06-13 20:14:52 +08:00
source="1.1"
target="1.1"
deprecation="${jc.deprecation}"
>
<bootclasspath >
2007-11-20 02:52:02 +08:00
<pathelement location= "${cldcapi.jar}" />
2007-06-13 20:14:52 +08:00
</bootclasspath>
<include name= "**/*.java" />
<exclude name= "scala/runtime/FloatRef.java" />
<exclude name= "scala/runtime/DoubleRef.java" />
</javac>
<quick
srcdir="${cldc.dir}/src"
2007-11-20 02:52:02 +08:00
destdir="${cldc.dir}/lib/library"
2007-06-13 20:14:52 +08:00
usepredefs="no"
addparams="${nsc.params}"
target="cldc"
scalacdebugging="${nsc.log-files}"
>
<bootclasspath >
2007-11-20 02:52:02 +08:00
<pathelement location= "${cldcapi.jar}" />
2007-06-13 20:14:52 +08:00
</bootclasspath>
<classpath >
<pathelement location= "${cldc.dir}" />
</classpath>
<include name= "scala/Predef.scala" />
</quick>
<quick
srcdir="${cldc.dir}/src"
2007-11-20 02:52:02 +08:00
destdir="${cldc.dir}/lib/library"
2007-06-13 20:14:52 +08:00
target="cldc"
addparams="${nsc.params}"
scalacdebugging="${nsc.log-files}"
>
<bootclasspath >
2007-11-20 02:52:02 +08:00
<pathelement location= "${cldcapi.jar}" />
2007-06-13 20:14:52 +08:00
</bootclasspath>
<classpath >
<pathelement location= "${cldc.dir}" />
</classpath>
<include name= "**/*.scala" />
<exclude name= "scala/Predef.scala" />
<exclude name= "scala/BigInt.scala" />
<exclude name= "scala/collection/mutable/JavaMapAdaptor.scala" />
<exclude name= "scala/collection/mutable/JavaSetAdaptor.scala" />
<exclude name= "scala/collection/mutable/LinkedHashSet.scala" />
<exclude name= "scala/util/Fluid.scala" />
<exclude name= "scala/runtime/BoxedFloatArray.scala" />
<exclude name= "scala/runtime/BoxedDoubleArray.scala" />
<exclude name= "scala/io/**" />
<exclude name= "scala/mobile/**" />
<exclude name= "scala/reflect/**" />
<exclude name= "scala/text/**" />
<exclude name= "scala/testing/**" />
<exclude name= "scala/xml/**" />
<excludesfile name= "${nsc.excludes}" if= "excludes.avail" />
</quick>
2007-11-21 02:35:24 +08:00
<macrodef name= "preverify" >
<attribute name= "srcdir" />
<attribute name= "destdir" />
<sequential >
<exec executable= "preverify" failonerror= "false" >
<arg line= "-classpath ${cldcapi.jar}${path.separator}${midpapi.jar}" />
<arg line= "-target cldc1.0" />
<arg line= "-d @{destdir}" />
<arg value= "@{srcdir}" />
</exec>
</sequential>
</macrodef>
<mkdir dir= "${cldc.dir}/lib/preverified" />
<preverify
srcdir="${cldc.dir}/lib/library"
destdir="${cldc.dir}/lib/preverified"
/>
2007-11-20 02:52:02 +08:00
<jar
2007-11-28 03:49:42 +08:00
destfile="${cldc.dir}/lib/scalaapi10-unverified.jar"
2007-11-20 02:52:02 +08:00
basedir="${cldc.dir}/lib/library"
2007-11-21 02:35:24 +08:00
includes="scala/**/*.class">
<manifest >
<attribute name= "Created-By" value= "${version.number} (${vendor.name})" />
</manifest>
</jar>
<!-- see http://java.sun.com/j2me/docs/uei_specs.pdf -->
<jar
2007-11-28 03:49:42 +08:00
destfile="${cldc.dir}/lib/scalaapi10.jar"
2007-11-21 02:35:24 +08:00
basedir="${cldc.dir}/lib/preverified"
includes="scala/**/*.class">
<manifest >
<attribute name= "Created-By" value= "${version.number} (${vendor.name})" />
<attribute name= "API-Specification-Version" value= "1.0" />
<attribute name= "API" value= "Scala CLDC" />
<attribute name= "API-Name" value= "Scala Connected Limited Device Configuration" />
<attribute name= "API-Type" value= "Configuration" />
</manifest>
</jar>
2007-06-13 20:14:52 +08:00
</target>
2007-11-28 03:49:42 +08:00
<target name= "cldc" depends= "cldc.libraries" >
<!-- exemples ? -->
</target>
2007-11-23 01:16:07 +08:00
<!-- ===========================================================================
ANDROID
============================================================================ -->
<target name= "android.sources"
description="Create the source directory for Android library"
>
<mkdir dir= "${android.dir}/src" />
<copy todir= "${android.dir}/src" >
<fileset dir= "${src.dir}/library" includes= "**/*.scala, **/*.java" >
<not >
<present targetdir= "${src.dir}/android-library" />
</not>
</fileset>
</copy>
<copy todir= "${android.dir}/src" >
<fileset dir= "${src.dir}/android-library" >
<include name= "**/*.scala" />
<include name= "**/*.java" />
</fileset>
</copy>
</target>
2007-12-03 20:53:08 +08:00
<target name= "android.libraries"
2007-11-23 01:16:07 +08:00
depends="setup.quick, android.sources"
description="Builds the Scala library for Android">
<fail message= "Android home is not set or could not find android.jar in ${android.home}" >
<condition > <not >
<available file= "${android.home}/android.jar" />
</not> </condition>
</fail>
2007-11-23 21:21:53 +08:00
<mkdir dir= "${android.dir}/lib/library" />
<javac
srcdir="${android.dir}/src"
destdir="${android.dir}/lib/library"
deprecation="${jc.deprecation}"
>
<bootclasspath >
<pathelement location= "${android.home}/android.jar}" />
</bootclasspath>
<include name= "**/*.java" />
</javac>
2007-11-23 01:16:07 +08:00
<quick
srcdir="${android.dir}/src"
2007-11-23 21:21:53 +08:00
destdir="${android.dir}/lib/library"
2007-11-23 01:16:07 +08:00
usepredefs="no"
addparams="${nsc.params}"
extdirs=""
scalacdebugging="${nsc.log-files}"
>
<bootclasspath >
<pathelement location= "${android.home}/android.jar" />
</bootclasspath>
<include name= "scala/Predef.scala" />
</quick>
<quick
srcdir="${android.dir}/src"
2007-11-23 21:21:53 +08:00
destdir="${android.dir}/lib/library"
2007-11-23 01:16:07 +08:00
extdirs=""
addparams="${nsc.params}"
scalacdebugging="${nsc.log-files}"
>
<bootclasspath >
<pathelement location= "${android.home}/android.jar" />
</bootclasspath>
<classpath >
<pathelement location= "${android.dir}" />
</classpath>
<include name= "**/*.scala" />
<exclude name= "scala/Predef.scala" />
<excludesfile name= "${nsc.excludes}" if= "excludes.avail" />
</quick>
</target>
2007-12-03 20:53:08 +08:00
<target name= "android.build" depends= "android.libraries"
2007-11-28 03:49:42 +08:00
description="Convert this project's .class files into .dex files">
2007-12-03 20:53:08 +08:00
<java jar= "${dx.jar}" fork= "true" failonerror= "true" >
2007-11-28 03:49:42 +08:00
<jvmarg value= "-Djava.ext.dirs=${android.home}${file.separator}tools${file.separator}lib" />
<jvmarg value= "-Xmx384M" />
<arg value= "--dex" />
2007-11-30 18:25:00 +08:00
<arg value= "--output=${android.dir}/lib/scala.dex" />
2007-11-28 03:49:42 +08:00
<arg value= "--locals=full" />
<arg value= "--positions=lines" />
<arg value= "${android.dir}/lib/library" />
</java>
<jar
2007-11-30 18:25:00 +08:00
destfile="${android.dir}/lib/scala-dex.jar"
2007-11-28 03:49:42 +08:00
basedir="${android.dir}/lib"
2007-11-30 18:25:00 +08:00
includes="scala.dex"
2007-11-28 03:49:42 +08:00
/>
<jar
destfile="${android.dir}/lib/scala-android.jar"
basedir="${android.dir}/lib/library"
includes="scala/**/*.class"
/>
</target>
2007-12-03 20:53:08 +08:00
<target name= "android" depends= "init" >
<condition property= "android.supported" >
<and >
<not > <contains string= "${java.version}" substring= "1.4" /> </not>
<contains string= "${java.vendor}" substring= "Sun" />
</and>
</condition>
<if > <isset property= "android.supported" /> <then >
<antcall target= "android.build" >
<param name= "dx.jar" value= "${android.home}/tools/lib/dx.jar" />
</antcall>
</then> <else >
<echo message= "The Android library build requires Sun Java 1.5 or newer" />
</else> </if>
</target>
2007-02-10 01:09:49 +08:00
<!-- ===========================================================================
MSIL
============================================================================ -->
<target name= "msil.sources" >
<mkdir dir= "${msil.dir}/src" />
<copy todir= "${msil.dir}/src" >
<fileset dir= "${src.dir}/library" includes= "**/*.scala" >
<not >
<present targetdir= "${src.dir}/dotnet-library" />
</not>
2007-09-03 23:03:27 +08:00
<exclude name= "scala/collection/jcl/**/*.scala" />
2007-02-10 01:09:49 +08:00
</fileset>
</copy>
<copy todir= "${msil.dir}/src" >
<fileset dir= "${src.dir}/dotnet-library" >
<include name= "**/*.scala" />
</fileset>
</copy>
</target>
2007-06-18 16:36:29 +08:00
<target name= "msil.libraries" depends= "setup.quick, msil.sources" >
2007-02-10 01:09:49 +08:00
<quick srcdir= "${msil.dir}/src" usepredefs= "no" target= "msil"
2007-08-27 18:05:41 +08:00
assemname="${msil.dir}/predef" assemrefs="${lib.dir}"
failonerror="false">
2007-06-11 23:23:21 +08:00
<include name= "scala/Predef.scala" />
<include name= "scala/Console.scala" />
<include name= "scala/Application.scala" />
<include name= "scala/ByNameFunction.scala" />
<include name= "scala/*Annotation.scala" />
<include name= "scala/Function*.scala" />
<include name= "scala/Tuple*.scala" />
<include name= "scala/Product*.scala" />
<include name= "scala/cloneable.scala" />
<include name= "scala/deprecated.scala" />
2007-06-12 00:08:31 +08:00
<include name= "scala/native.scala" />
2007-06-11 23:23:21 +08:00
<include name= "scala/serializable.scala" />
<include name= "scala/transient.scala" />
<include name= "scala/runtime/*.scala" />
2007-07-20 05:11:21 +08:00
<exclude name= "scala/runtime/RichStringBuilder.scala" />
2007-02-10 01:09:49 +08:00
</quick>
2007-06-11 23:23:21 +08:00
<property name= "ilasm.infile" value= "${msil.dir}/predef.msil" />
<property name= "ilasm.outfile" value= "${msil.dir}/predef.dll" />
<if > <isset property= "os.win" />
<then >
<property
name="ilasm.args"
value="/quiet /dll /output=${ilasm.outfile} ${ilasm.infile}"
/>
</then>
<else >
<property
name="ilasm.args"
value="/dll /output:${ilasm.outfile} ${ilasm.infile}"
/>
</else>
</if>
<exec
executable="ilasm" vmlauncher="no">
<!--
errorproperty="ilasm.err" outputproperty="ilasm.out">
-->
<arg line= "${ilasm.args}" />
</exec>
2007-02-10 01:09:49 +08:00
</target>
2007-06-18 16:36:29 +08:00
<target name= "msil" depends= "msil.libraries" >
2007-06-18 16:26:33 +08:00
<copy todir= "${quick.dir}/bin" >
<fileset
dir="${mono.dir}/bin"
2007-06-19 17:31:30 +08:00
includes="scala-net*"
2007-06-18 16:26:33 +08:00
/>
<filterset >
<filter token= "VERSION" value= "${version.number}" />
<filter token= "COPYRIGHT" value= "${copyright.string}" />
<filter token= "NAME" value= "Scala code runner" />
</filterset>
</copy>
2007-06-19 17:31:30 +08:00
<copy todir= "${quick.dir}/bin" >
<fileset
dir="${mono.dir}/bin"
includes="scalac-net*"
/>
<filterset >
<filter token= "VERSION" value= "${version.number}" />
<filter token= "COPYRIGHT" value= "${copyright.string}" />
<filter token= "NAME" value= "Scala compiler" />
</filterset>
</copy>
2007-06-18 16:36:29 +08:00
<chmod perm= "ugo+rx"
2007-06-19 00:40:32 +08:00
dir="${quick.dir}/bin" includes="*-net*"/>
2007-06-18 16:26:33 +08:00
<if > <isset property= "os.win" />
<then >
<copy todir= "${quick.dir}/lib" >
<fileset dir= "${msil.dir}" includes= "*.dll" />
<fileset dir= "${lib.dir}" includes= "*.dll" />
</copy>
</then>
<else >
<symlink
link="${quick.dir}/lib/predef.dll"
resource="${msil.dir}/predef.dll"
overwrite="yes" failonerror="no"/>
<symlink
link="${quick.dir}/lib/scalaruntime.dll"
resource="${lib.dir}/scalaruntime.dll"
overwrite="yes" failonerror="no"/>
<symlink
link="${quick.dir}/lib/mscorlib.dll"
resource="${lib.dir}/mscorlib.dll"
overwrite="yes" failonerror="no"/>
</else>
</if>
</target>
2007-11-23 01:16:07 +08:00
<!-- ===========================================================================
OPTIMIZE
============================================================================ -->
<target name= "optimised" depends= "build.optimised"
description="Build the compiler with optimizations on."/>
<!-- Build the bootstrap layer -->
<target name= "build.optimised" depends= "setup.quick" >
<stopwatch name= "timer.optimised" />
<!-- Build library -->
<mkdir dir= "${optimised.dir}/lib/library" />
<javac
srcdir="${src.dir}/library"
destdir="${optimised.dir}/lib/library"
source="1.4" target="1.4" deprecation="yes"
classpath="${optimised.dir}/lib/library"
includes="**/*.java"/>
<quick
srcdir="${src.dir}/library"
destdir="${optimised.dir}/lib/library"
usepredefs="no" addparams="${nsc.params}"
deprecation="yes" unchecked="yes"
optimise="yes"
classpath="${optimised.dir}/lib/library"
includes="scala/Predef.scala"/>
<quick
srcdir="${src.dir}/library"
destdir="${optimised.dir}/lib/library"
addparams="${nsc.params}"
optimise="yes"
deprecation="yes" unchecked="yes"
classpath="${optimised.dir}/lib/library">
<include name= "**/*.scala" />
<exclude name= "scala/Predef.scala" />
<exclude name= "scala/dbc/**" />
<exclude name= "scala/actors/**" />
<excludesfile name= "${nsc.excludes.file}" if= "excludes.avail" />
</quick>
<echo
file="${optimised.dir}/lib/library/${lib.prop.name}"
message="version.number=${version.number}${line.separator}"
append="false"
/>
<echo
file="${optimised.dir}/lib/library/${lib.prop.name}"
message="copyright.string=${copyright.string}${line.separator}"
append="true"
/>
<!-- Build compiler -->
<mkdir dir= "${optimised.dir}/lib/compiler" />
<quick
srcdir="${src.dir}"
destdir="${optimised.dir}/lib/compiler"
optimise="yes"
addparams="${nsc.params}">
<classpath >
<pathelement location= "${optimised.dir}/lib/library" />
<pathelement location= "${optimised.dir}/lib/compiler" />
<pathelement location= "${fjbg.jar}" />
<pathelement location= "${msil.jar}" />
<pathelement location= "${ant.jar}" />
<pathelement location= "${jline.jar}" />
</classpath>
<include name= "compiler/**/*.scala" />
<include name= "library/scala/List.scala" />
<excludesfile name= "${nsc.excludes.file}" if= "excludes.avail" />
</quick>
<echo
file="${optimised.dir}/lib/compiler/${comp.prop.name}"
message="version.number=${version.number}${line.separator}"
append="false"
/>
<echo
file="${optimised.dir}/lib/compiler/${comp.prop.name}"
message="copyright.string=${copyright.string}${line.separator}"
append="true"
/>
<!-- Timing the build -->
<stopwatch name= "timer.strap" action= "total" />
<!-- Copy support files to build folder and links external libraries -->
<build.support build.dir= "${optimised.dir}" />
<build.links build.dir= "${optimised.dir}" />
<!-- Build executable files -->
<taskdef
name="straptool"
classname="scala.tools.ant.ScalaTool"
classpathref="quick.classpath"/>
<mkdir dir= "${optimised.dir}/bin" />
<straptool
file="${optimised.dir}/bin/${scala.exec.name}"
version="${version.number}"
copyright="${copyright.string}"
name="Scala code runner"
class="scala.tools.nsc.MainGenericRunner"
javaFlags="${java.flags}"/>
<straptool
file="${optimised.dir}/bin/${scalac.exec.name}"
name="Scala compiler"
class="scala.tools.nsc.Main"
version="${version.number}"
copyright="${copyright.string}"
javaFlags="${java.flags}"/>
<straptool
file="${optimised.dir}/bin/${scaladoc.exec.name}"
name="Scala doc generator"
class="scala.tools.nsc.Main"
toolflags="-Ydoc"
version="${version.number}"
copyright="${copyright.string}"
javaFlags="${java.flags}"/>
<straptool
file="${optimised.dir}/bin/${fsc.exec.name}"
name="Fast Scala compiler"
class="scala.tools.nsc.CompileClient"
version="${version.number}"
copyright="${copyright.string}"/>
<chmod perm= "ugo+rx"
file="${optimised.dir}/bin/${scalac.exec.name}"/>
<chmod perm= "ugo+rx"
file="${optimised.dir}/bin/${scala.exec.name}"/>
<chmod perm= "ugo+rx"
file="${optimised.dir}/bin/${scaladoc.exec.name}"/>
<chmod perm= "ugo+rx"
file="${optimised.dir}/bin/${fsc.exec.name}"/>
<fixcrlf
srcdir="${optimised.dir}/bin"
eol="dos"
includes="**/*.bat"/>
</target>
2005-12-24 02:17:24 +08:00
<!-- ===========================================================================
TEST
============================================================================ -->
2006-03-02 22:01:45 +08:00
2007-08-10 23:34:57 +08:00
<target name= "test" depends= "test.stability, test.strap"
description="Tests the build for stability"/>
2006-03-02 22:01:45 +08:00
2006-05-11 23:29:25 +08:00
<!-- Build the bootstrap layer -->
2006-01-21 00:38:11 +08:00
<target name= "build.strap" depends= "setup.quick" >
2006-03-02 22:01:45 +08:00
<stopwatch name= "timer.strap" />
2006-05-11 23:29:25 +08:00
<!-- Build library -->
<mkdir dir= "${strap.dir}/lib/library" />
2006-04-10 19:02:41 +08:00
<javac
2006-05-11 23:29:25 +08:00
srcdir="${src.dir}/library"
destdir="${strap.dir}/lib/library"
source="1.4" target="1.4" deprecation="yes"
classpath="${strap.dir}/lib/library"
includes="**/*.java"/>
2006-03-06 22:12:09 +08:00
<quick
2006-05-11 23:29:25 +08:00
srcdir="${src.dir}/library"
destdir="${strap.dir}/lib/library"
2007-04-10 23:53:35 +08:00
usepredefs="no" addparams="${nsc.params}"
deprecation="yes" unchecked="yes"
2006-05-11 23:29:25 +08:00
classpath="${strap.dir}/lib/library"
includes="scala/Predef.scala"/>
2006-03-06 22:12:09 +08:00
<quick
2006-05-11 23:29:25 +08:00
srcdir="${src.dir}/library"
destdir="${strap.dir}/lib/library"
2007-04-10 23:53:35 +08:00
addparams="${nsc.params}"
deprecation="yes" unchecked="yes"
2006-05-11 23:29:25 +08:00
classpath="${strap.dir}/lib/library">
2005-12-19 21:49:03 +08:00
<include name= "**/*.scala" />
<exclude name= "scala/Predef.scala" />
2006-03-20 23:58:47 +08:00
<exclude name= "scala/dbc/**" />
2006-06-21 20:35:21 +08:00
<exclude name= "scala/actors/**" />
2006-05-11 23:29:25 +08:00
<excludesfile name= "${nsc.excludes.file}" if= "excludes.avail" />
2006-03-20 23:58:47 +08:00
</quick>
2007-05-11 21:16:31 +08:00
<echo
file="${strap.dir}/lib/library/${lib.prop.name}"
message="version.number=${version.number}${line.separator}"
append="false"
/>
<echo
file="${strap.dir}/lib/library/${lib.prop.name}"
message="copyright.string=${copyright.string}${line.separator}"
append="true"
/>
2006-05-11 23:29:25 +08:00
<!-- Build DBC -->
<mkdir dir= "${strap.dir}/lib/dbc" />
2006-03-20 23:58:47 +08:00
<quick
2006-05-11 23:29:25 +08:00
srcdir="${src.dir}/dbc"
destdir="${strap.dir}/lib/dbc"
2007-04-10 23:53:35 +08:00
addparams="${nsc.params}"
deprecation="yes" unchecked="yes">
2006-03-20 23:58:47 +08:00
<classpath >
2006-05-11 23:29:25 +08:00
<pathelement location= "${strap.dir}/lib/library" />
<pathelement location= "${strap.dir}/lib/dbc" />
2006-03-20 23:58:47 +08:00
</classpath>
<include name= "scala/dbc/**/*.scala" />
2006-05-11 23:29:25 +08:00
<excludesfile name= "${nsc.excludes.file}" if= "excludes.avail" />
2005-12-19 21:49:03 +08:00
</quick>
2006-06-21 20:35:21 +08:00
<!-- Build actors library -->
<mkdir dir= "${strap.dir}/lib/actors" />
2007-02-19 19:33:47 +08:00
<javac
srcdir="${src.dir}/actors"
2007-02-19 22:22:00 +08:00
destdir="${strap.dir}/lib/actors"
2007-02-19 19:33:47 +08:00
source="1.4" target="1.4" deprecation="yes"
2007-02-19 22:22:00 +08:00
classpath="${strap.dir}/lib/actors"
2007-02-19 19:33:47 +08:00
includes="scala/actors/**/*.java"/>
2006-06-21 20:35:21 +08:00
<quick
srcdir="${src.dir}/actors"
destdir="${strap.dir}/lib/actors"
addparams="${nsc.params}">
<classpath >
<pathelement location= "${strap.dir}/lib/library" />
<pathelement location= "${strap.dir}/lib/actors" />
</classpath>
<include name= "scala/actors/**/*.scala" />
<excludesfile name= "${nsc.excludes.file}" if= "excludes.avail" />
</quick>
2006-05-11 23:29:25 +08:00
<!-- Build compiler -->
<mkdir dir= "${strap.dir}/lib/compiler" />
2006-03-06 22:12:09 +08:00
<quick
2006-05-11 23:29:25 +08:00
srcdir="${src.dir}/compiler"
destdir="${strap.dir}/lib/compiler"
addparams="${nsc.params}">
2005-12-19 21:49:03 +08:00
<classpath >
2006-05-11 23:29:25 +08:00
<pathelement location= "${strap.dir}/lib/library" />
<pathelement location= "${strap.dir}/lib/compiler" />
2006-05-08 23:15:42 +08:00
<pathelement location= "${fjbg.jar}" />
2007-02-07 00:06:34 +08:00
<pathelement location= "${msil.jar}" />
2005-12-19 21:49:03 +08:00
<pathelement location= "${ant.jar}" />
2007-07-17 19:31:53 +08:00
<pathelement location= "${jline.jar}" />
2005-12-19 21:49:03 +08:00
</classpath>
<include name= "**/*.scala" />
2006-05-11 23:29:25 +08:00
<excludesfile name= "${nsc.excludes.file}" if= "excludes.avail" />
2005-12-19 21:49:03 +08:00
</quick>
2007-01-30 00:53:19 +08:00
<echo
file="${strap.dir}/lib/compiler/${comp.prop.name}"
message="version.number=${version.number}${line.separator}"
append="false"
/>
<echo
file="${strap.dir}/lib/compiler/${comp.prop.name}"
message="copyright.string=${copyright.string}${line.separator}"
append="true"
/>
2007-09-11 23:41:12 +08:00
<!-- Build partest -->
<mkdir dir= "${strap.dir}/lib/partest" />
2007-09-18 17:13:45 +08:00
<quick
2007-09-11 23:41:12 +08:00
srcdir="${src.dir}/partest"
destdir="${strap.dir}/lib/partest"
addparams="${nsc.params}"
deprecation="yes" unchecked="yes">
<classpath >
<pathelement location= "${strap.dir}/lib/library" />
<pathelement location= "${strap.dir}/lib/compiler" />
<pathelement location= "${strap.dir}/lib/actors" />
</classpath>
2007-09-18 17:13:45 +08:00
</quick>
2007-11-14 01:49:56 +08:00
<echo
file="${strap.dir}/lib/partest/${par.prop.name}"
message="version.number=${version.number}${line.separator}"
append="false"
/>
<echo
file="${strap.dir}/lib/partest/${par.prop.name}"
message="copyright.string=${copyright.string}${line.separator}"
append="true"
/>
2006-05-11 23:29:25 +08:00
<!-- Timing the build -->
2006-03-02 22:01:45 +08:00
<stopwatch name= "timer.strap" action= "total" />
2006-05-11 23:29:25 +08:00
<!-- Copy support files to build folder and links external libraries -->
2006-01-09 21:07:02 +08:00
<build.support build.dir= "${strap.dir}" />
2006-01-21 00:15:13 +08:00
<build.links build.dir= "${strap.dir}" />
2006-05-11 23:29:25 +08:00
<!-- Build executable files -->
2006-03-30 20:42:03 +08:00
<taskdef
name="straptool"
classname="scala.tools.ant.ScalaTool"
2006-05-11 23:29:25 +08:00
classpathref="quick.classpath"/>
<mkdir dir= "${strap.dir}/bin" />
2006-03-30 20:42:03 +08:00
<straptool
2006-05-11 23:29:25 +08:00
file="${strap.dir}/bin/${scala.exec.name}"
2006-03-20 23:58:47 +08:00
version="${version.number}"
2006-05-11 23:29:25 +08:00
copyright="${copyright.string}"
2006-06-15 23:43:19 +08:00
name="Scala code runner"
class="scala.tools.nsc.MainGenericRunner"
2007-10-01 17:09:59 +08:00
javaFlags="${java.flags}"/>
2006-03-30 20:42:03 +08:00
<straptool
2006-05-11 23:29:25 +08:00
file="${strap.dir}/bin/${scalac.exec.name}"
2006-03-06 22:12:09 +08:00
name="Scala compiler"
class="scala.tools.nsc.Main"
version="${version.number}"
2006-05-11 23:29:25 +08:00
copyright="${copyright.string}"
2007-10-01 17:09:59 +08:00
javaFlags="${java.flags}"/>
2006-03-30 20:42:03 +08:00
<straptool
2006-05-11 23:29:25 +08:00
file="${strap.dir}/bin/${scaladoc.exec.name}"
2006-03-08 18:08:40 +08:00
name="Scala doc generator"
class="scala.tools.nsc.Main"
2007-07-16 20:16:33 +08:00
toolflags="-Ydoc"
2006-03-08 18:08:40 +08:00
version="${version.number}"
2006-05-11 23:29:25 +08:00
copyright="${copyright.string}"
2007-10-01 17:09:59 +08:00
javaFlags="${java.flags}"/>
2006-06-07 00:52:36 +08:00
<straptool
file="${strap.dir}/bin/${fsc.exec.name}"
2006-06-09 02:50:25 +08:00
name="Fast Scala compiler"
2006-06-07 00:52:36 +08:00
class="scala.tools.nsc.CompileClient"
version="${version.number}"
copyright="${copyright.string}"/>
2006-05-11 23:29:25 +08:00
<chmod perm= "ugo+rx"
file="${strap.dir}/bin/${scalac.exec.name}"/>
<chmod perm= "ugo+rx"
file="${strap.dir}/bin/${scala.exec.name}"/>
<chmod perm= "ugo+rx"
file="${strap.dir}/bin/${scaladoc.exec.name}"/>
2006-06-07 00:52:36 +08:00
<chmod perm= "ugo+rx"
file="${strap.dir}/bin/${fsc.exec.name}"/>
2006-07-15 01:33:32 +08:00
<fixcrlf
srcdir="${strap.dir}/bin"
eol="dos"
includes="**/*.bat"/>
2006-01-21 00:15:13 +08:00
</target>
2006-03-02 22:01:45 +08:00
2006-05-11 23:29:25 +08:00
<!-- Compares quick and test level -->
2006-01-21 00:15:13 +08:00
<target name= "test.stability" depends= "build.strap" >
2007-08-10 23:34:57 +08:00
<if > <available file= "${stability.tool}" />
<then > <!-- use stability tool for fast checking -->
<exec executable= "${stability.tool}" failonerror= "true" >
<arg value= "${quick.dir}" />
<arg value= "${strap.dir}" />
</exec>
</then> <else > <!-- check stability the slow way -->
2005-12-19 21:49:03 +08:00
<checksum totalproperty= "quick.md5" >
2006-05-11 23:29:25 +08:00
<fileset dir= "${quick.dir}/lib" >
<include name= "library/**" />
<include name= "compiler/**" />
2005-12-20 01:17:19 +08:00
</fileset>
2005-12-19 21:49:03 +08:00
</checksum>
2005-12-24 02:17:24 +08:00
<delete quiet= "yes" failonerror= "no" >
2006-03-06 22:12:09 +08:00
<fileset dir= "${quick.dir}" includes= "**/*.MD5" />
2005-12-19 21:49:03 +08:00
</delete>
<checksum totalproperty= "strap.md5" >
2006-05-11 23:29:25 +08:00
<fileset dir= "${strap.dir}/lib" >
<include name= "library/**" />
<include name= "compiler/**" />
2005-12-20 01:17:19 +08:00
</fileset>
2005-12-19 21:49:03 +08:00
</checksum>
2005-12-24 02:17:24 +08:00
<delete quiet= "yes" failonerror= "no" >
2006-03-06 22:12:09 +08:00
<fileset dir= "${strap.dir}" includes= "**/*.MD5" />
2005-12-19 21:49:03 +08:00
</delete>
2006-06-29 20:05:05 +08:00
<fail message= "Build ${version.number} is not stable" >
2005-12-19 21:49:03 +08:00
<condition > <not >
<equals arg1= "${quick.md5}" arg2= "${strap.md5}" />
</not> </condition>
</fail>
2006-06-29 20:05:05 +08:00
<echo level= "info" message= "Build ${version.number} is stable." />
2007-08-10 23:34:57 +08:00
</else> </if>
2005-12-19 21:49:03 +08:00
</target>
2006-03-02 22:01:45 +08:00
2006-01-21 00:15:13 +08:00
<target name= "test.strap" depends= "build.strap" >
2006-06-07 20:52:09 +08:00
<echo level= "info" message= "Ant test bench is not available yet." />
2006-01-21 00:15:13 +08:00
</target>
2005-12-19 21:49:03 +08:00
2005-12-24 02:17:24 +08:00
<!-- ===========================================================================
2006-03-08 00:42:36 +08:00
DOCUMENTATION
2005-12-24 02:17:24 +08:00
============================================================================ -->
2006-03-02 22:01:45 +08:00
2006-05-11 23:29:25 +08:00
<target name= "docs" depends= "setup.quick"
description="Generated the API for library sources">
<mkdir dir= "${api-lib.dir}" />
2006-03-09 00:29:16 +08:00
<quickdoc
2006-05-24 21:59:49 +08:00
srcdir="${src.dir}"
2006-05-11 23:29:25 +08:00
destdir="${api-lib.dir}"
2006-03-09 00:29:16 +08:00
sourcepath=""
2007-04-10 23:53:35 +08:00
deprecation="yes" unchecked="yes"
2006-04-13 00:55:00 +08:00
windowtitle="Scala Library Documentation"
2007-04-26 01:17:03 +08:00
doctitle="< div> Scala ${version.number}< br/> API Specification< /div> "
2007-02-19 22:52:03 +08:00
classpath="${quick.dir}/lib/library${path.separator}${quick.dir}/lib/actors">
2006-05-11 23:29:25 +08:00
<include name= "dbc/**/*.scala" />
2006-06-21 20:35:21 +08:00
<include name= "actors/**/*.scala" />
2006-05-11 23:29:25 +08:00
<include name= "library/**/*.scala" />
<excludesfile name= "${nsc.excludes.file}" if= "excludes.avail" />
2006-03-09 00:29:16 +08:00
</quickdoc>
2005-12-19 21:49:03 +08:00
</target>
2006-04-13 00:55:00 +08:00
2006-05-11 23:29:25 +08:00
<target name= "docs.compiler" depends= "setup.quick"
description="Generated the API for compiler sources">
<mkdir dir= "${api-comp.dir}" />
2006-03-09 05:37:50 +08:00
<quickdoc
2006-05-11 23:29:25 +08:00
srcdir="${src.dir}/compiler"
destdir="${api-comp.dir}"
2006-03-09 05:37:50 +08:00
sourcepath=""
2006-04-13 00:55:00 +08:00
windowtitle="Scala Compiler Documentation"
2007-04-26 01:17:03 +08:00
doctitle="< div> Scala ${version.number}< br/> API Specification< /div> ">
2006-03-09 05:37:50 +08:00
<classpath >
2006-05-11 23:29:25 +08:00
<pathelement location= "${quick.dir}/lib/library" />
<pathelement location= "${quick.dir}/lib/compiler" />
2006-05-08 23:15:42 +08:00
<pathelement location= "${fjbg.jar}" />
2007-02-07 00:06:34 +08:00
<pathelement location= "${msil.jar}" />
2006-03-09 05:37:50 +08:00
<pathelement location= "${ant.jar}" />
2007-07-17 19:31:53 +08:00
<pathelement location= "${jline.jar}" />
2006-03-09 05:37:50 +08:00
</classpath>
<include name= "**/*.scala" />
2006-05-11 23:29:25 +08:00
<excludesfile name= "${nsc.excludes.file}" if= "excludes.avail" />
2006-03-09 05:37:50 +08:00
</quickdoc>
</target>
2005-12-19 21:49:03 +08:00
2006-06-12 22:18:13 +08:00
<target name= "docs.manual" depends= "setup.quick"
description="Generated the manual for the Scala tools">
<mkdir dir= "${tooldocs.dir}/classes" />
<path id= "manual.classpath" >
<pathelement location= "${quick.dir}/lib/library" />
<pathelement location= "${tooldocs.dir}/classes" />
</path>
<quick
srcdir="${src.dir}/manual"
destdir="${tooldocs.dir}/classes"
classpathref="manual.classpath">
<include name= "**/*.scala" />
</quick>
2006-07-11 23:18:11 +08:00
<emit command= "fsc" />
2006-06-12 22:18:13 +08:00
<emit command= "sbaz" />
<emit command= "scala" />
<emit command= "scalac" />
<emit command= "scaladoc" />
<emit command= "scalap" />
<fixcrlf srcdir= "${tooldocs.dir}" eol= "unix" includes= "**/*.1" />
<copy todir= "${tooldocs.dir}" >
<fileset dir= "${src.dir}/manual/scala/tools/docutil/resources" >
<include name= "**/*.html" />
<include name= "**/*.css" />
<include name= "**/*.gif" />
<include name= "**/*.png" />
</fileset>
</copy>
</target>
<macrodef name= "emit" >
<attribute name= "command" />
<sequential >
<java classname= "scala.tools.docutil.EmitHtml"
output="${tooldocs.dir}/@{command}.html"
classpathref="manual.classpath"
fork="true" logError="yes"
>
<arg value= "scala.man1.@{command}" />
</java>
<java classname= "scala.tools.docutil.EmitManPage"
output="${tooldocs.dir}/@{command}.1"
classpathref="manual.classpath"
fork="true" logError="yes"
>
<arg value= "scala.man1.@{command}" />
</java>
</sequential>
</macrodef>
2005-12-24 02:17:24 +08:00
<!-- ===========================================================================
GENERATES A DISTRIBUTION
============================================================================ -->
2006-03-17 03:35:29 +08:00
2006-03-09 23:16:53 +08:00
<target name= "dist.devel" depends= "init" >
<property file= "${number.file}" />
2006-05-11 23:29:25 +08:00
<property name= "version.number"
2006-08-04 20:00:04 +08:00
value="${version.major}.${version.minor}.${version.patch}.${svn.number}"/>
2006-05-11 23:29:25 +08:00
<runtarget target= "pack" />
2006-03-09 23:16:53 +08:00
</target>
2006-03-17 03:35:29 +08:00
2006-03-09 23:16:53 +08:00
<target name= "dist.patch" depends= "init" >
2006-05-11 23:29:25 +08:00
<propertyfile file= "${number.file}" >
2006-03-09 23:16:53 +08:00
<entry key= "version.patch" type= "int" default= "0" operation= "+" />
</propertyfile>
<property file= "${number.file}" />
2006-05-11 23:29:25 +08:00
<property name= "version.number"
2007-03-20 18:13:38 +08:00
value="${version.major}.${version.minor}.${version.patch}${version.suffix}"/>
2006-05-11 23:29:25 +08:00
<runtarget target= "pack" />
2006-03-13 18:36:32 +08:00
</target>
2006-03-17 03:35:29 +08:00
2006-03-13 18:36:32 +08:00
<target name= "dist.minor" depends= "init" >
2006-05-11 23:29:25 +08:00
<propertyfile file= "${number.file}" >
2006-03-09 23:16:53 +08:00
<entry key= "version.minor" type= "int" default= "0" operation= "+" />
<entry key= "version.patch" type= "int" value= "0" />
</propertyfile>
2006-03-13 18:36:32 +08:00
<property file= "${number.file}" />
2006-05-11 23:29:25 +08:00
<property name= "version.number"
2007-03-20 18:13:38 +08:00
value="${version.major}.${version.minor}.${version.patch}${version.suffix}"/>
2006-05-11 23:29:25 +08:00
<runtarget target= "pack" />
2006-03-09 23:16:53 +08:00
</target>
2005-12-23 02:21:56 +08:00
2006-03-20 23:58:47 +08:00
<target name= "dist"
2007-08-11 01:32:31 +08:00
depends="clean.build, test, build.dist"
2007-08-10 23:34:57 +08:00
description="Creates a (stability-)tested, complete Scala distribution *from scratch*"/>
2006-05-24 21:31:53 +08:00
2006-05-11 23:29:25 +08:00
<target name= "pack"
depends="build.archive, build.sbaz"
description="Packs a distribution for SBaz and ZIP/TAR"/>
2006-07-25 23:01:32 +08:00
<target name= "binaries"
2007-08-13 16:54:01 +08:00
depends="setup, build.strap"
2006-07-25 23:01:32 +08:00
description="Creates a binary Scala distribution">
2006-05-11 23:29:25 +08:00
<property name= "dist.current.dir"
2006-07-25 23:01:32 +08:00
value="${dist.dir}/scala-${version.number}"/>
2007-03-29 19:13:45 +08:00
<if > <and >
<isset property= "os.unix" />
<isset property= "dist.resource" /> </and>
<then >
<symlink
link="${dist.dir}"
resource="${dist.resource}" overwrite="yes" failonerror="no"/>
2007-04-03 19:13:36 +08:00
<touch file= "${dist.dir}/is_symlink" verbose= "no" />
2007-03-29 19:13:45 +08:00
</then> </if>
2005-12-22 04:31:59 +08:00
<mkdir dir= "${dist.current.dir}" />
2006-05-11 23:29:25 +08:00
<!-- Copy all requires libraries -->
2005-12-22 04:31:59 +08:00
<mkdir dir= "${dist.current.dir}/lib" />
2007-05-17 02:05:52 +08:00
<property name= "ant.version.number" value= "[1.6" />
<!-- version ::= major('.'minor('.'micro('.'qualifier)?)?)? -->
<!-- see http://www2.osgi.org/javadoc/r4/org/osgi/framework/Version.html -->
<propertyregex
property="osgi.version.number" input="${version.number}"
regexp="([^-]*)(-.*)?" select="\1"
/>
<echo level= "verbose" message= "OSGi version: ${osgi.version.number}" />
2007-05-21 17:28:34 +08:00
<jar destfile= "${dist.current.dir}/lib/${comp.jar.name}" >
2006-05-11 23:29:25 +08:00
<fileset dir= "${strap.dir}/lib/compiler" />
2006-03-09 05:37:50 +08:00
<zipfileset src= "${fjbg.jar}" />
2007-02-07 00:06:34 +08:00
<zipfileset src= "${msil.jar}" />
2005-12-20 01:17:19 +08:00
<manifest >
2005-12-24 02:17:24 +08:00
<attribute name= "Signature-Version" value= "${version.number}" />
2006-07-25 23:01:32 +08:00
<attribute name= "Built-By" value= "${user.name}" />
2007-05-11 21:16:31 +08:00
<attribute name= "Main-Class" value= "scala.tools.nsc.Main" />
2006-07-25 23:01:32 +08:00
<attribute name= "Class-Path" value= "${lib.jar.name}" />
<section name= "scala/tools/nsc" >
<attribute name= "Extension-Name" value= "scala.tools.nsc" />
<attribute name= "Specification-Title" value= "Scala Compiler" />
<attribute name= "Specification-Version" value= "${version.number}" />
<attribute name= "Specification-Vendor" value= "${vendor.name}" />
<attribute name= "Implementation-Title" value= "scala.tools.nsc" />
<attribute name= "Implementation-Version" value= "${version.number}" />
<attribute name= "Implementation-Vendor" value= "${vendor.name}" />
</section>
2007-05-17 02:05:52 +08:00
<attribute name= "Bundle-DocURL" value= "http://www.scala-lang.org/" />
<attribute name= "Bundle-ManifestVersion" value= "2" />
<attribute name= "Bundle-Name" value= "Scala Compiler Bundle" />
<attribute name= "Bundle-SymbolicName" value= "scala_compiler" />
<attribute name= "Bundle-Version" value= "${osgi.version.number}" />
<attribute name= "Bundle-Vendor" value= "${vendor.name}" />
<attribute name= "Export-Package" value= "scala.tools.ant;version="${osgi.version.number}",scala.tools.nsc;version="${osgi.version.number}",scala.tools.nsc.ast;version="${osgi.version.number}",scala.tools.nsc.ast.parser;version="${osgi.version.number}",scala.tools.nsc.backend;version="${osgi.version.number}",scala.tools.nsc.doc;version="${osgi.version.number}",scala.tools.nsc.io;version="${osgi.version.number}",scala.tools.nsc.matching;version="${osgi.version.number}",scala.tools.nsc.models;version="${osgi.version.number}",scala.tools.nsc.symtab;version="${osgi.version.number}",scala.tools.nsc.symtab.classfile;version="${osgi.version.number}",scala.tools.nsc.symtab.clr;version="${osgi.version.number}",scala.tools.nsc.transform;version="${osgi.version.number}",scala.tools.nsc.typechecker;version="${osgi.version.number}",scala.tools.nsc.util;version="${osgi.version.number}",scala.tools.util;version="${osgi.version.number}"" />
<attribute name= "Import-Package" value= "org.apachge.ant.tools;version="${ant.version.number}",org.apachge.ant.tools.taskdefs;version="${ant.version.number}",org.apachge.ant.types;version="${ant.version.number}",org.apachge.ant.tools.util;version="${ant.version.number}",org.xml.sax" />
<attribute name= "Bundle-RequiredExecutionEnvironment" value= "J2SE-1.4" />
2005-12-20 01:17:19 +08:00
</manifest>
</jar>
2007-05-21 17:28:34 +08:00
<jar destfile= "${dist.current.dir}/lib/${lib.jar.name}" >
2006-05-11 23:29:25 +08:00
<fileset dir= "${strap.dir}/lib/library" />
2007-05-01 17:41:21 +08:00
<fileset dir= "${strap.dir}/lib/actors" />
2005-12-24 02:17:24 +08:00
<manifest >
<attribute name= "Signature-Version" value= "${version.number}" />
2006-07-25 23:01:32 +08:00
<attribute name= "Built-By" value= "${user.name}" />
2007-05-15 19:56:51 +08:00
<attribute name= "Main-Class" value= "scala.util.Properties" />
2006-07-25 23:01:32 +08:00
<section name= "scala" >
<attribute name= "Extension-Name" value= "scala" />
<attribute name= "Specification-Title" value= "Scala Library" />
<attribute name= "Specification-Version" value= "${version.number}" />
<attribute name= "Specification-Vendor" value= "${vendor.name}" />
<attribute name= "Implementation-Title" value= "scala" />
<attribute name= "Implementation-Version" value= "${version.number}" />
<attribute name= "Implementation-Vendor" value= "${vendor.name}" />
</section>
2007-05-16 01:00:38 +08:00
<attribute name= "Bundle-DocURL" value= "http://www.scala-lang.org/" />
<attribute name= "Bundle-ManifestVersion" value= "2" />
<attribute name= "Bundle-Name" value= "Scala Library Bundle" />
<attribute name= "Bundle-SymbolicName" value= "scala_library" />
2007-05-16 20:56:00 +08:00
<attribute name= "Bundle-Version" value= "${osgi.version.number}" />
2007-05-16 01:00:38 +08:00
<attribute name= "Bundle-Vendor" value= "${vendor.name}" />
2007-05-17 02:05:52 +08:00
<attribute name= "Export-Package" value= "scala;version="${osgi.version.number}",scala.actors;version="${osgi.version.number}",scala.actors.remote;version="${osgi.version.number}",scala.collection;version="${osgi.version.number}",scala.collection.immutable;version="${osgi.version.number}",scala.collection.jcl;version="${osgi.version.number}",scala.collection.mutable;version="${osgi.version.number}",scala.compat;version="${osgi.version.number}",scala.concurrent;version="${osgi.version.number}",scala.io;version="${osgi.version.number}",scala.mobile;version="${osgi.version.number}",scala.ref;version="${osgi.version.number}",scala.reflect;version="${osgi.version.number}",scala.runtime;version="${osgi.version.number}",scala.testing;version="${osgi.version.number}",scala.text;version="${osgi.version.number}",scala.util;version="${osgi.version.number}",scala.util.automata;version="${osgi.version.number}",scala.util.grammar;version="${osgi.version.number}",scala.util.logging;version="${osgi.version.number}",scala.util.parsing;version="${osgi.version.number}",scala.util.regexp;version="${osgi.version.number}",scala.xml;version="${osgi.version.number}",scala.xml.dtd;version="${osgi.version.number}",scala.xml.factory;version="${osgi.version.number}",scala.xml.parsing;version="${osgi.version.number}",scala.xml.path;version="${osgi.version.number}",scala.xml.pull;version="${osgi.version.number}",scala.xml.transform;version="${osgi.version.number}"" />
<attribute name= "Import-Package" value= "javax.xml.parsers,org.xml.sax,org.xml.sax.helpers" />
2007-05-16 01:00:38 +08:00
<attribute name= "Bundle-RequiredExecutionEnvironment" value= "J2SE-1.4" />
2005-12-24 02:17:24 +08:00
</manifest>
2005-12-20 01:17:19 +08:00
</jar>
2007-05-21 17:28:34 +08:00
<jar destfile= "${dist.current.dir}/lib/${dbc.jar.name}" >
2006-05-11 23:29:25 +08:00
<fileset dir= "${strap.dir}/lib/dbc" />
2006-03-20 23:58:47 +08:00
<manifest >
<attribute name= "Signature-Version" value= "${version.number}" />
2006-07-25 23:01:32 +08:00
<attribute name= "Built-By" value= "${user.name}" />
<attribute name= "Class-Path" value= "${lib.jar.name}" />
<section name= "scala/dbc" >
<attribute name= "Extension-Name" value= "scala.dbc" />
<attribute name= "Specification-Title" value= "Scala DBC Library" />
<attribute name= "Specification-Version" value= "${version.number}" />
<attribute name= "Specification-Vendor" value= "${vendor.name}" />
<attribute name= "Implementation-Title" value= "scala.dbc" />
<attribute name= "Implementation-Version" value= "${version.number}" />
<attribute name= "Implementation-Vendor" value= "${vendor.name}" />
</section>
2007-05-17 02:05:52 +08:00
<attribute name= "Bundle-DocURL" value= "http://www.scala-lang.org/" />
<attribute name= "Bundle-ManifestVersion" value= "2" />
<attribute name= "Bundle-Name" value= "Scala DBC Library Bundle" />
<attribute name= "Bundle-SymbolicName" value= "scala_dbc_library" />
<attribute name= "Bundle-Version" value= "${osgi.version.number}" />
<attribute name= "Bundle-Vendor" value= "${vendor.name}" />
<attribute name= "Export-Package" value= "scala.dbc;version="${osgi.version.number}",scala.dbc.datatype;version="${osgi.version.number}",scala.dbc.exception;version="${osgi.version.number}",scala.dbc.result;version="${osgi.version.number}",scala.dbc.statement;version="${osgi.version.number}",scala.dbc.statement.expression;version="${osgi.version.number}",scala.dbc.syntax;version="${osgi.version.number}",scala.dbc.value;version="${osgi.version.number}",scala.dbc.vendor;version="${osgi.version.number}"" />
<attribute name= "Import-Package" value= "scala;version="${osgi.version.number}",scala.compat;version="${osgi.version.number}"" />
<attribute name= "Bundle-RequiredExecutionEnvironment" value= "J2SE-1.4" />
2006-03-20 23:58:47 +08:00
</manifest>
</jar>
2007-09-11 23:41:12 +08:00
<jar destfile= "${dist.current.dir}/lib/${partest.jar.name}" >
<fileset dir= "${strap.dir}/lib/partest" />
<manifest >
<attribute name= "Signature-Version" value= "${version.number}" />
<attribute name= "Built-By" value= "${user.name}" />
<attribute name= "Main-Class" value= "scala.tools.partest.TestRunner" />
<attribute name= "Class-Path" value= "${lib.jar.name}" />
<section name= "scala/tools/partest" >
<attribute name= "Extension-Name" value= "scala.tools.partest" />
<attribute name= "Specification-Title" value= "Scala Test Utility" />
<attribute name= "Specification-Version" value= "${version.number}" />
<attribute name= "Specification-Vendor" value= "${vendor.name}" />
<attribute name= "Implementation-Title" value= "scala.tools.partest" />
<attribute name= "Implementation-Version" value= "${version.number}" />
<attribute name= "Implementation-Vendor" value= "${vendor.name}" />
</section>
<attribute name= "Bundle-DocURL" value= "http://www.scala-lang.org/" />
<attribute name= "Bundle-ManifestVersion" value= "2" />
<attribute name= "Bundle-Name" value= "Scala Test Bundle" />
<attribute name= "Bundle-SymbolicName" value= "scala_compiler" />
<attribute name= "Bundle-Version" value= "${osgi.version.number}" />
<attribute name= "Bundle-Vendor" value= "${vendor.name}" />
<attribute name= "Export-Package" value= "scala.tools.partest;version="${osgi.version.number}",scala.tools.partest.utils;version="${osgi.version.number}"" />
<attribute name= "Import-Package" value= "javax.swing" />
<attribute name= "Bundle-RequiredExecutionEnvironment" value= "J2SE-1.4" />
</manifest>
</jar>
2007-05-15 17:11:48 +08:00
2006-08-24 21:16:02 +08:00
<!-- build source jars -->
<jar
2007-05-01 17:41:21 +08:00
destfile="${dist.current.dir}/lib/${libsrc.jar.name}">
<fileset dir= "${src.dir}/library" />
<fileset dir= "${src.dir}/actors" />
</jar>
2006-08-24 21:16:02 +08:00
<jar
destfile="${dist.current.dir}/lib/${dbcsrc.jar.name}"
basedir="${src.dir}/dbc"
includes="**/*.scala"
/>
2007-09-11 23:41:12 +08:00
<jar
destfile="${dist.current.dir}/lib/${parsrc.jar.name}"
basedir="${src.dir}/partest"
includes="**/*.scala"
/>
2006-08-24 21:16:02 +08:00
<jar
destfile="${dist.current.dir}/lib/${compsrc.jar.name}"
basedir="${src.dir}/compiler"
includes="**/*.scala"
/>
<!-- Copy executable files -->
2005-12-22 04:31:59 +08:00
<mkdir dir= "${dist.current.dir}/bin" />
2006-05-11 23:29:25 +08:00
<copy todir= "${dist.current.dir}/bin" >
<fileset dir= "${strap.dir}/bin" />
</copy>
<chmod perm= "ugo+rx" file= "${dist.current.dir}/bin/${scalac.exec.name}" />
<chmod perm= "ugo+rx" file= "${dist.current.dir}/bin/${scala.exec.name}" />
<chmod perm= "ugo+rx" file= "${dist.current.dir}/bin/${scaladoc.exec.name}" />
2006-06-07 00:52:36 +08:00
<chmod perm= "ugo+rx" file= "${dist.current.dir}/bin/${fsc.exec.name}" />
2006-07-25 23:01:32 +08:00
<!-- Recreate the 'latest' link to point to this distribution -->
<if > <isset property= "os.win" />
<then >
<copy todir= "${dist.dir}/latest" >
<fileset dir= "${dist.current.dir}" />
</copy>
</then>
<else >
<symlink
link="${dist.dir}/latest"
resource="${dist.current.dir}"
overwrite="yes" failonerror="no"/>
</else>
</if>
</target>
<target name= "build.dist"
2007-11-30 18:25:00 +08:00
depends="binaries,docs,docs.manual"
2006-07-25 23:01:32 +08:00
description="Creates the latest Scala distribution">
2006-05-11 23:29:25 +08:00
<!-- Copy the API, examples and man -->
<copy todir= "${dist.current.dir}/doc/scala" >
2006-03-16 00:59:10 +08:00
<fileset dir= "${docs.dir}" includes= "README,LICENSE" />
</copy>
2006-05-11 23:29:25 +08:00
<copy todir= "${dist.current.dir}/doc/scala/api" >
<fileset dir= "${api-lib.dir}" />
2006-03-09 05:37:50 +08:00
</copy>
2006-05-11 23:29:25 +08:00
<copy todir= "${dist.current.dir}/doc/scala/examples" >
<fileset dir= "${docs.dir}/examples" />
2006-03-09 22:13:01 +08:00
</copy>
2006-06-15 21:23:32 +08:00
<copy todir= "${dist.current.dir}/man/man1" >
2006-06-12 22:18:13 +08:00
<fileset dir= "${tooldocs.dir}" includes= "**/*.1" />
2006-03-09 05:37:50 +08:00
</copy>
2006-06-08 23:11:48 +08:00
<copy todir= "${dist.current.dir}/doc/scala/tools" >
2006-06-12 22:18:13 +08:00
<fileset dir= "${tooldocs.dir}" >
2006-06-08 23:11:48 +08:00
<include name= "**/*.html" />
<include name= "**/*.css" />
<include name= "**/*.gif" />
<include name= "**/*.png" />
</fileset>
</copy>
2006-05-11 23:29:25 +08:00
<stopwatch name= "timer.dist" action= "total" />
</target>
2006-07-25 23:01:32 +08:00
2006-05-11 23:29:25 +08:00
<!-- Create the SBaz packages -->
2007-11-30 18:25:00 +08:00
<target name= "build.sbaz" depends= "build.dist,msil,cldc,android" >
2007-06-18 21:52:54 +08:00
<property name= "sbaz.universe" value= "http://www.scala-lang.org/downloads/packages" />
2006-05-11 23:29:25 +08:00
<mkdir dir= "${dist.dir}" />
<!-- Create the Scala library package -->
2006-01-19 23:22:54 +08:00
<quicksbaz
2006-05-11 23:29:25 +08:00
file="${dist.dir}/scala-library-${version.number}.sbp"
adfile="${dist.dir}/scala-library-${version.number}.advert"
name="scala-library"
2006-03-06 22:12:09 +08:00
version="${version.number}"
2006-03-09 05:37:50 +08:00
desc="The Scala library. This is the minimal requirement to run any Scala program."
2006-05-11 23:29:25 +08:00
link="${sbaz.universe}/scala-library-${version.number}.sbp">
2007-05-01 17:41:21 +08:00
<libset dir= "${dist.current.dir}/lib" includes= "${lib.jar.name},${dbc.jar.name}" />
<srcset dir= "${dist.current.dir}/lib" includes= "${libsrc.jar.name},${dbcsrc.jar.name}" />
2006-01-19 23:22:54 +08:00
</quicksbaz>
2007-12-03 20:53:08 +08:00
<!-- Create the Scala developer package -->
2006-01-19 23:22:54 +08:00
<quicksbaz
2006-05-11 23:29:25 +08:00
file="${dist.dir}/scala-devel-${version.number}.sbp"
adfile="${dist.dir}/scala-devel-${version.number}.advert"
name="scala-devel"
2006-03-06 22:12:09 +08:00
version="${version.number}"
2006-03-09 05:37:50 +08:00
desc="The Scala developper tools. This contains everything that is required to write, test and document new Scala programs, as well as all developper documentation."
2006-05-11 23:29:25 +08:00
depends="scala-library"
link="${sbaz.universe}/scala-devel-${version.number}.sbp">
2006-03-09 05:37:50 +08:00
<binset dir= "${dist.current.dir}/bin" includes= "**" />
<docset dir= "${dist.current.dir}/doc" includes= "**" />
<libset dir= "${dist.current.dir}/lib" includes= "${comp.jar.name}" />
2006-08-24 21:16:02 +08:00
<srcset dir= "${dist.current.dir}/lib" includes= "${compsrc.jar.name}" />
2006-03-09 05:37:50 +08:00
<manset dir= "${dist.current.dir}/man" includes= "**" />
2006-01-19 23:22:54 +08:00
</quicksbaz>
2006-05-11 23:29:25 +08:00
<!-- Creates the empty umbrella Scala package -->
2006-01-19 23:22:54 +08:00
<quicksbaz
2006-05-11 23:29:25 +08:00
file="${dist.dir}/scala-${version.number}.sbp"
adfile="${dist.dir}/scala-${version.number}.advert"
name="scala"
2006-03-06 22:12:09 +08:00
version="${version.number}"
2006-03-09 05:37:50 +08:00
desc="The base Scala package that contains everything needed to start using Scala."
2006-05-11 23:29:25 +08:00
depends="scala-library,scala-devel"
link="${sbaz.universe}/scala-${version.number}.sbp"/>
<!-- Creates the Scala test package -->
2006-03-29 01:43:55 +08:00
<quicksbaz
2006-05-11 23:29:25 +08:00
file="${dist.dir}/scala-test-${version.number}.sbp"
adfile="${dist.dir}/scala-test-${version.number}.advert"
name="scala-test"
2006-03-29 01:43:55 +08:00
version="${version.number}"
desc="The Scala test package contains everything needed to test Scala."
2006-05-11 23:29:25 +08:00
link="${sbaz.universe}/scala-test-${version.number}.sbp">
<binset dir= "${basedir}/test"
2007-12-19 07:06:07 +08:00
includes="clitest,diff/diff.*,diff/lib*.dll,scalatest,scalatest.bat,partest"/>
2006-03-29 01:43:55 +08:00
<miscset
dir="${basedir}/test"
2007-07-27 23:40:35 +08:00
includes="files/**/*.args,files/**/*.check,files/**/*.jar,files/**/*.java,files/**/*.scala,files/cli/**/*.check.*,files/jvm/*.so,files/shootout/*.javaopts,files/shootout/*.runner,files/shootout/*.txt"/>
2007-12-19 07:06:07 +08:00
<srcset dir= "${dist.current.dir}/lib" includes= "${parsrc.jar.name}" />
<libset dir= "${dist.current.dir}/lib" includes= "${partest.jar.name}" />
2006-03-29 01:43:55 +08:00
</quicksbaz>
2007-06-18 21:52:54 +08:00
<!-- Creates the MSIL package -->
<quicksbaz
file="${dist.dir}/scala-msil-${version.number}.sbp"
adfile="${dist.dir}/scala-msil-${version.number}.advert"
name="scala-msil"
version="${version.number}"
desc="The Scala MSIL package contains everything needed to use Scala on .NET."
depends="scala-library,scala-devel"
link="${sbaz.universe}/scala-msil-${version.number}.sbp">
<binset dir= "${quick.dir}/bin" includes= "scala*net*" />
<libset dir= "${quick.dir}/lib" includes= "*.dll" />
</quicksbaz>
2007-11-20 02:52:02 +08:00
<!-- Creates the CLDC package -->
<quicksbaz
file="${dist.dir}/scala-cldc-${version.number}.sbp"
adfile="${dist.dir}/scala-cldc-${version.number}.advert"
name="scala-cldc"
version="${version.number}"
desc="The Scala CLDC package contains everything needed to use Scala on CLDC devices."
link="${sbaz.universe}/scala-cldc-${version.number}.sbp">
<libset dir= "${cldc.dir}/lib" includes= "*.jar" />
</quicksbaz>
2007-11-28 03:49:42 +08:00
<!-- Creates the Android package -->
2007-12-05 18:40:02 +08:00
<if > <isset property= "android.supported" /> <then >
2007-12-14 02:16:14 +08:00
<copy todir= "${dist.current.dir}/doc/scala-android/examples" >
<fileset dir= "${docs.dir}/android-examples" >
<exclude name= "**/R.java" />
</fileset>
</copy>
2007-12-03 20:53:08 +08:00
<quicksbaz
file="${dist.dir}/scala-android-${version.number}.sbp"
adfile="${dist.dir}/scala-android-${version.number}.advert"
name="scala-android"
version="${version.number}"
desc="The Scala Android package contains everything needed to use Scala on Android."
link="${sbaz.universe}/scala-android-${version.number}.sbp">
<libset dir= "${android.dir}/lib" includes= "*.jar" />
2007-12-14 02:16:14 +08:00
<docset dir= "${dist.current.dir}/doc/scala-android" includes= "**" />
2007-12-03 20:53:08 +08:00
</quicksbaz>
2007-12-05 18:40:02 +08:00
</then> </if>
2005-12-19 21:49:03 +08:00
</target>
2005-12-24 02:17:24 +08:00
2006-05-11 23:29:25 +08:00
<target name= "build.archive" depends= "build.dist" >
<tar
destfile="${dist.dir}/scala-${version.number}.tgz"
2006-05-16 00:02:24 +08:00
compression="gzip">
<tarfileset dir= "${dist.current.dir}" includes= "bin/**" mode= "755" />
<tarfileset dir= "${dist.current.dir}" excludes= "bin/**" />
</tar>
2006-05-08 19:53:59 +08:00
<checksum
2006-05-11 23:29:25 +08:00
file="${dist.dir}/scala-${version.number}.tgz"
2006-05-08 19:53:59 +08:00
forceOverwrite="yes"
2006-05-11 23:29:25 +08:00
fileext=".md5"/>
<!-- Create zip archive -->
2006-05-08 19:53:59 +08:00
<zip
2006-05-11 23:29:25 +08:00
basedir="${dist.current.dir}"
destfile="${dist.dir}/scala-${version.number}.zip"/>
2006-05-08 19:53:59 +08:00
<checksum
2006-05-11 23:29:25 +08:00
file="${dist.dir}/scala-${version.number}.zip"
2006-05-08 19:53:59 +08:00
forceOverwrite="yes"
2006-05-11 23:29:25 +08:00
fileext=".md5"/>
2007-03-27 19:24:08 +08:00
<!-- Create source archive -->
<copy todir= "${dist.dir}/scala-${version.number}" >
<fileset
dir="${basedir}"
excludes="build,build/**,dists/**"
/>
</copy>
<tar basedir= "${dist.dir}"
destfile="${dist.dir}/scala-${version.number}-sources.tgz"
compression="gzip"
includes="scala-${version.number}/**"
/>
2006-05-08 19:53:59 +08:00
</target>
2005-12-24 02:17:24 +08:00
<!-- ===========================================================================
CLEAN
============================================================================ -->
2006-03-02 22:01:45 +08:00
2005-12-19 21:49:03 +08:00
<macrodef name= "remove" >
<attribute name= "dir" />
<sequential >
2007-04-03 19:13:36 +08:00
<if >
<available file= "@{dir}/is_symlink" />
<then >
<delete includeemptydirs= "true" quiet= "yes" failonerror= "no" >
<fileset dir= "@{dir}" includes= "**/*" />
</delete>
</then> </if>
2006-05-11 23:29:25 +08:00
<delete dir= "@{dir}" includeemptydirs= "yes" quiet= "yes" failonerror= "no" />
2005-12-19 21:49:03 +08:00
</sequential>
</macrodef>
2006-03-02 22:01:45 +08:00
2007-04-12 22:49:30 +08:00
<target name= "clean" depends= "ant-init" description= "Removes QUICK, STRAP and API build products" >
2006-03-03 22:32:42 +08:00
<remove dir= "${quick.dir}" />
2006-03-06 22:12:09 +08:00
<remove dir= "${strap.dir}" />
2006-03-09 05:37:50 +08:00
<remove dir= "${api.dir}" />
2006-03-06 22:12:09 +08:00
</target>
2007-04-12 22:49:30 +08:00
<target name= "clean.build" depends= "ant-init"
2007-04-03 19:13:36 +08:00
description="Removes all build products">
2006-03-06 22:12:09 +08:00
<remove dir= "${build.dir}" />
2005-12-19 21:49:03 +08:00
</target>
2006-03-02 22:01:45 +08:00
2007-04-13 20:07:34 +08:00
<target name= "clean.msil" depends= "ant-init" description= "Removes all MSIL build products" >
2007-02-13 16:35:18 +08:00
<remove dir= "${msil.dir}" />
</target>
2007-06-13 20:14:52 +08:00
<target name= "clean.cldc" depends= "ant-init" description= "Removes all CLDC build products" >
<remove dir= "${cldc.dir}" />
</target>
2007-04-12 22:49:30 +08:00
<target name= "clean.all" depends= "ant-init"
2006-05-11 23:29:25 +08:00
description="Removes all build products and distributions">
2006-01-21 00:15:13 +08:00
<remove dir= "${build.dir}" />
<remove dir= "${dist.dir}" />
</target>
2006-03-02 22:01:45 +08:00
2006-01-21 00:15:13 +08:00
<target name= "clean.unfreeze" depends= "init" >
2006-05-11 23:29:25 +08:00
<delete file= "${locker.dir}/complete" quiet= "yes" failonerror= "no" />
2006-03-09 05:37:50 +08:00
<remove dir= "${quick.dir}" />
2005-12-19 21:49:03 +08:00
</target>
2005-10-11 17:39:32 +08:00
</project>