682 lines
23 KiB
XML
682 lines
23 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!-- This is a simplified build file for Scala on Debian.
|
|
- It takes a lot of shortcuts compared to the
|
|
- standard build file. -->
|
|
<!-- $Id$ -->
|
|
<project name="scala" default="build">
|
|
<property environment="env"/>
|
|
|
|
<!-- Prevents system classpath from being used -->
|
|
<property name="build.sysclasspath" value="ignore"/>
|
|
|
|
<!-- Base properties -->
|
|
<property name="topdir" value="${basedir}/.."/>
|
|
<property name="debian.dir" value="${topdir}/debian"/>
|
|
<property name="docs.dir" value="${topdir}/docs"/>
|
|
<property name="examples.pdir" value="${docs.dir}"/>
|
|
<property name="examples.dir" value="${examples.pdir}/examples"/>
|
|
<property name="lib.dir" value="${topdir}/lib"/>
|
|
<property name="src.dir" value="${topdir}/src"/>
|
|
<property name="properties" value="${debian.dir}/build.properties"/>
|
|
|
|
<!-- User properties -->
|
|
<property file="${properties}"/>
|
|
|
|
<!-- General properties -->
|
|
<property name="copyright.holder" value="LAMP/EPFL"/>
|
|
<property name="copyright.string" value="(c) 2002-2008 ${copyright.holder}"/>
|
|
|
|
|
|
<!-- Javac configuration properties -->
|
|
<property name="jc.source" value="1.4"/>
|
|
<property name="jc.target" value="1.4"/>
|
|
<property name="jc.deprecation" value="true"/>
|
|
|
|
|
|
<!-- Location of pre-compiled libraries -->
|
|
<property name="starr.lib.jar" value="${lib.dir}/scala-library.jar"/>
|
|
<property name="starr.comp.jar" value="${lib.dir}/scala-compiler.jar"/>
|
|
<property name="scala.home" value="${user.home}/sbaz"/>
|
|
|
|
<!--
|
|
<property name="starr.lib.jar" value="${scala.home}/lib/scala-library.jar"/>
|
|
<property name="starr.comp.jar" value="${scala.home}/lib/scala-compiler.jar"/>
|
|
-->
|
|
|
|
<property name="fjbg.jar" value="${lib.dir}/fjbg.jar"/>
|
|
<property name="msil.jar" value="${lib.dir}/msil.jar"/>
|
|
<property name="jline.jar" value="${lib.dir}/jline.jar"/>
|
|
<property name="ant.jar" value="${ant.home}/lib/ant.jar"/>
|
|
|
|
|
|
<!-- Location of build products properties -->
|
|
<property name="build.dir" value="${topdir}/simpbuild"/>
|
|
<property name="api.dir" value="${build.dir}/api"/>
|
|
<property name="tooldocs.dir" value="${build.dir}/manual"/>
|
|
|
|
<!-- Location of source and build elements names properties -->
|
|
<property name="src.lib.dir" value="${src.dir}/library"/>
|
|
<property name="src.comp.dir" value="${src.dir}/compiler"/>
|
|
<property name="src.dbc.dir" value="${src.dir}/dbc"/>
|
|
<property name="src.actors.dir" value="${src.dir}/actors"/>
|
|
<property name="exec.dir.name" value="exec"/>
|
|
|
|
<!-- Location of structure of the distribution properties -->
|
|
<property name="dist.sbaz.dir" value="${build.dir}/sbaz"/>
|
|
<property name="dist.name" value="scala"/>
|
|
|
|
<property name="libsrc.jar.name" value="${dist.name}-library-src.jar"/>
|
|
<property name="dbcsrc.jar.name" value="${dist.name}-dbc-src.jar"/>
|
|
<property name="compsrc.jar.name" value="${dist.name}-compiler-src.jar"/>
|
|
<property name="actorssrc.jar.name" value="${dist.name}-actors-src.jar"/>
|
|
<property name="scala.exec.name" value="${dist.name}"/>
|
|
<property name="scalac.exec.name" value="scalac"/>
|
|
<property name="scaladoc.exec.name" value="scaladoc"/>
|
|
<property name="fsc.exec.name" value="fsc"/>
|
|
|
|
<!-- Shorcut names -->
|
|
<property name="build.lib.dir" value="${build.dir}/library"/>
|
|
<property name="build.comp.dir" value="${build.dir}/compiler"/>
|
|
<property name="build.dbc.dir" value="${build.dir}/dbc"/>
|
|
<property name="build.actors.dir" value="${build.dir}/actors"/>
|
|
<property name="build.jar.dir" value="${build.dir}/lib"/>
|
|
<property name="build.bin.dir" value="${build.dir}/bin"/>
|
|
<property name="build.manual.dir" value="${build.dir}/manual.classes"/>
|
|
<property name="api.lib.pdir" value="${api.dir}/library"/>
|
|
<property name="api.lib.dir" value="${api.lib.pdir}/scala/api"/>
|
|
|
|
<!-- sbaz properties -->
|
|
<property name="sbaz.lib.name" value="${dist.name}-library"/>
|
|
<property name="sbaz.dev.name" value="${dist.name}-devel"/>
|
|
<property name="sbaz.dev.docs.name" value="${dist.name}-devel-docs"/>
|
|
<property name="sbaz.test.name" value="${dist.name}-test"/>
|
|
<property name="sbaz.scala.name" value="${dist.name}"/>
|
|
<property name="sbaz.universe" value="http://www.scala-lang.org/downloads/packages"/>
|
|
|
|
<!-- Testing if everything is in place -->
|
|
<echo level="verbose" message="starr.lib.jar=${starr.lib.jar}"/>
|
|
<fail message="STARR library in 'lib/' is not available">
|
|
<condition><not><and>
|
|
<available
|
|
classname="scala.Predef"
|
|
classpath="${starr.lib.jar}"
|
|
/>
|
|
<available
|
|
classname="scala.List"
|
|
classpath="${starr.lib.jar}"
|
|
/>
|
|
<available
|
|
classname="scala.runtime.ObjectRef"
|
|
classpath="${starr.lib.jar}"
|
|
/>
|
|
</and></not></condition>
|
|
</fail>
|
|
|
|
<echo level="verbose" message="starr.comp.jar=${starr.comp.jar}"/>
|
|
<fail message="STARR compiler in 'lib/' is not available">
|
|
<condition><not>
|
|
<available
|
|
classname="scala.tools.ant.Scalac"
|
|
classpath="${starr.comp.jar}:${starr.lib.jar}"
|
|
/>
|
|
</not></condition>
|
|
</fail>
|
|
|
|
<echo level="verbose" message="fjbg.jar=${fjbg.jar}"/>
|
|
<fail message="FJBG library in 'lib/' is not available">
|
|
<condition><not>
|
|
<available
|
|
classname="ch.epfl.lamp.fjbg.JCode"
|
|
classpath="${fjbg.jar}"
|
|
/>
|
|
</not></condition>
|
|
</fail>
|
|
|
|
<echo level="verbose" message="jline.jar=${jline.jar}"/>
|
|
<fail message="JLine library in 'lib/' is not available">
|
|
<condition><not>
|
|
<available
|
|
classname="jline.ConsoleReader"
|
|
classpath="${jline.jar}"
|
|
/>
|
|
</not></condition>
|
|
</fail>
|
|
|
|
<path id="starr.classpath">
|
|
<pathelement location="${fjbg.jar}"/>
|
|
<pathelement location="${msil.jar}"/>
|
|
<pathelement location="${ant.jar}"/>
|
|
<pathelement location="${starr.lib.jar}"/>
|
|
<pathelement location="${starr.comp.jar}"/>
|
|
<pathelement location="${jline.jar}"/>
|
|
</path>
|
|
|
|
<property name="os.type" value="UNIX"/>
|
|
|
|
<!-- Printing out some information about what environment I am running in -->
|
|
<echo
|
|
level="info"
|
|
message="OS: ${os.type} (${os.name} ${os.arch} ${os.version});"
|
|
/>
|
|
<echo
|
|
level="info"
|
|
message="Java: ${java.version} ('${java.home}');"
|
|
/>
|
|
<echo
|
|
level="info"
|
|
message="JVM: ${java.vm.name} ${java.vm.version};"
|
|
/>
|
|
<echo
|
|
level="info"
|
|
message="Ant: ${ant.version}."
|
|
/>
|
|
|
|
<!-- Generating version number -->
|
|
<property file="${topdir}/build.number"/>
|
|
<property
|
|
name="version.number"
|
|
value="${version.major}.${version.minor}.${version.patch}${version.suffix}"
|
|
/>
|
|
<echo level="verbose" message="version.number=${version.number}"/>
|
|
|
|
<!-- Creating tasks -->
|
|
<taskdef
|
|
name="scalac"
|
|
classname="scala.tools.ant.Scalac"
|
|
classpathref="starr.classpath"
|
|
/>
|
|
<taskdef
|
|
name="scalatool"
|
|
classname="scala.tools.ant.ScalaTool"
|
|
classpathref="starr.classpath"
|
|
/>
|
|
<taskdef
|
|
name="sbaz"
|
|
classname="scala.tools.ant.ScalaBazaar"
|
|
classpathref="starr.classpath"
|
|
/>
|
|
|
|
<macrodef name="emit">
|
|
<attribute name="command"/>
|
|
<sequential>
|
|
<mkdir dir="${tooldocs.dir}"/>
|
|
<mkdir dir="${tooldocs.dir}/man1"/>
|
|
<java classname="scala.tools.docutil.EmitHtml"
|
|
output="${tooldocs.dir}/@{command}.html"
|
|
fork="false" logError="yes"
|
|
failonerror="true"
|
|
>
|
|
<arg value="scala.man1.@{command}"/>
|
|
<classpath>
|
|
<pathelement location="${build.manual.dir}"/>
|
|
<path refid="starr.classpath"/>
|
|
</classpath>
|
|
</java>
|
|
<java classname="scala.tools.docutil.EmitManPage"
|
|
output="${tooldocs.dir}/man1/@{command}.1"
|
|
fork="false" logError="yes"
|
|
failonerror="true"
|
|
>
|
|
<arg value="scala.man1.@{command}"/>
|
|
<classpath>
|
|
<pathelement location="${build.manual.dir}"/>
|
|
<path refid="starr.classpath"/>
|
|
</classpath>
|
|
</java>
|
|
</sequential>
|
|
</macrodef>
|
|
|
|
<target name="build">
|
|
<!-- Build library -->
|
|
<sequential>
|
|
<mkdir dir="${build.lib.dir}"/>
|
|
<javac
|
|
srcdir="${src.lib.dir}"
|
|
destdir="${build.lib.dir}"
|
|
source="${jc.source}"
|
|
target="${jc.target}"
|
|
deprecation="${jc.deprecation}"
|
|
>
|
|
<include name="**/*.java"/>
|
|
</javac>
|
|
<scalac
|
|
srcdir="${src.lib.dir}"
|
|
destdir="${build.lib.dir}"
|
|
deprecation="yes" unchecked="yes"
|
|
>
|
|
<classpath>
|
|
<pathelement location="${build.lib.dir}"/> <!-- XXX ??? -->
|
|
</classpath>
|
|
<include name="scala/Predef.scala"/>
|
|
</scalac>
|
|
<scalac
|
|
srcdir="${src.lib.dir}"
|
|
destdir="${build.lib.dir}"
|
|
deprecation="yes" unchecked="yes"
|
|
>
|
|
<classpath>
|
|
<pathelement location="${build.lib.dir}"/>
|
|
</classpath>
|
|
<include name="**/*.scala"/>
|
|
<exclude name="scala/Predef.scala"/>
|
|
<exclude name="scala/dbc/**"/>
|
|
</scalac>
|
|
</sequential>
|
|
|
|
|
|
<parallel threadsPerProcessor="1">
|
|
<!-- Build compiler -->
|
|
<sequential>
|
|
<mkdir dir="${build.comp.dir}"/>
|
|
<scalac
|
|
srcdir="${src.comp.dir}"
|
|
destdir="${build.comp.dir}"
|
|
deprecation="yes" unchecked="yes"
|
|
>
|
|
<classpath>
|
|
<pathelement location="${build.lib.dir}"/>
|
|
<pathelement location="${ant.jar}"/>
|
|
<path refid="starr.classpath"/>
|
|
</classpath>
|
|
<include name="**/*.scala"/>
|
|
</scalac>
|
|
</sequential>
|
|
|
|
<!-- Build DBC -->
|
|
<sequential>
|
|
<mkdir dir="${build.dbc.dir}"/>
|
|
<scalac
|
|
srcdir="${src.dbc.dir}"
|
|
destdir="${build.dbc.dir}"
|
|
deprecation="yes" unchecked="yes"
|
|
>
|
|
<classpath>
|
|
<pathelement location="${build.lib.dir}"/>
|
|
<pathelement location="${starr.comp.jar}"/>
|
|
</classpath>
|
|
<include name="**/*.scala"/>
|
|
</scalac>
|
|
</sequential>
|
|
|
|
<!-- Build Actors -->
|
|
<sequential>
|
|
<mkdir dir="${build.actors.dir}"/>
|
|
<javac
|
|
srcdir="${src.actors.dir}"
|
|
destdir="${build.actors.dir}"
|
|
source="${jc.source}" target="${jc.target}" deprecation="${jc.deprecation}">
|
|
<include name="**/*.java"/>
|
|
</javac>
|
|
|
|
<scalac
|
|
srcdir="${src.actors.dir}"
|
|
destdir="${build.actors.dir}"
|
|
deprecation="yes" unchecked="yes"
|
|
>
|
|
<classpath>
|
|
<pathelement location="${build.lib.dir}"/>
|
|
</classpath>
|
|
<include name="**/*.scala"/>
|
|
</scalac>
|
|
</sequential>
|
|
</parallel>
|
|
|
|
|
|
<!-- Build jars -->
|
|
<mkdir dir="${build.jar.dir}"/>
|
|
<echo
|
|
file="${build.comp.dir}/compiler.properties"
|
|
message="version.number=${version.number}${line.separator}"
|
|
append="false"
|
|
/>
|
|
<echo
|
|
file="${build.comp.dir}/compiler.properties"
|
|
message="copyright.string=${copyright.string}${line.separator}"
|
|
append="true"
|
|
/>
|
|
<parallel threadsPerProcessor="1">
|
|
<jar destfile="${build.jar.dir}/scala-compiler.jar">
|
|
<fileset dir="${build.comp.dir}"/>
|
|
<zipfileset src="${fjbg.jar}"/>
|
|
<zipfileset src="${msil.jar}"/>
|
|
|
|
<fileset dir="${src.lib.dir}">
|
|
<include name="**/*.tmpl"/>
|
|
<include name="**/*.xml"/>
|
|
<include name="**/*.js"/>
|
|
<include name="**/*.css"/>
|
|
</fileset>
|
|
<fileset dir="${src.comp.dir}">
|
|
<include name="**/*.tmpl"/>
|
|
<include name="**/*.xml"/>
|
|
<include name="**/*.js"/>
|
|
<include name="**/*.css"/>
|
|
<include name="**/*.properties"/>
|
|
</fileset>
|
|
<manifest>
|
|
<attribute name="Signature-Version" value="${version.number}"/>
|
|
<attribute name="Built-By" value="${user.name}"/>
|
|
<attribute name="Main-Class" value="scala.tools.nsc.Main"/>
|
|
<attribute name="Class-Path" value="scala-library.jar"/>
|
|
<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>
|
|
</manifest>
|
|
</jar>
|
|
<echo
|
|
file="${build.lib.dir}/library.properties"
|
|
message="version.number=${version.number}${line.separator}"
|
|
append="false"
|
|
/>
|
|
<echo
|
|
file="${build.lib.dir}/library.properties"
|
|
message="copyright.string=${copyright.string}${line.separator}"
|
|
append="true"
|
|
/>
|
|
<jar destfile="${build.jar.dir}/scala-library.jar">
|
|
<fileset dir="${build.lib.dir}"/>
|
|
<fileset dir="${build.actors.dir}"/>
|
|
<manifest>
|
|
<attribute name="Signature-Version" value="${version.number}"/>
|
|
<attribute name="Built-By" value="${user.name}"/>
|
|
<attribute name="Main-Class" value="scala.runtime.Properties"/>
|
|
<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>
|
|
</manifest>
|
|
</jar>
|
|
<jar destfile="${build.jar.dir}/scala-dbc.jar">
|
|
<fileset dir="${build.dbc.dir}"/>
|
|
<manifest>
|
|
<attribute name="Signature-Version" value="${version.number}"/>
|
|
<attribute name="Built-By" value="${user.name}"/>
|
|
<attribute name="Class-Path" value="scala-library.jar"/>
|
|
<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>
|
|
</manifest>
|
|
</jar>
|
|
</parallel>
|
|
|
|
<!-- build tool scripts -->
|
|
<mkdir dir="${build.bin.dir}"/>
|
|
<scalatool
|
|
file="${build.bin.dir}/${scala.exec.name}"
|
|
version="${version.number}"
|
|
copyright="${copyright}"
|
|
name="Scala code runner"
|
|
class="scala.tools.nsc.MainGenericRunner"
|
|
javaFlags="-Xmx256M -Xms16M"
|
|
/>
|
|
<chmod perm="ugo+rx"
|
|
file="${build.bin.dir}/${scala.exec.name}"/>
|
|
<scalatool
|
|
file="${build.bin.dir}/${scalac.exec.name}"
|
|
name="Scala compiler"
|
|
class="scala.tools.nsc.Main"
|
|
version="${version.number}"
|
|
copyright="${copyright}"
|
|
javaFlags="-Xmx256M -Xms16M"
|
|
/>
|
|
<chmod perm="ugo+rx"
|
|
file="${build.bin.dir}/${scalac.exec.name}"/>
|
|
<scalatool
|
|
file="${build.bin.dir}/${scaladoc.exec.name}"
|
|
name="Scala doc generator"
|
|
class="scala.tools.nsc.Main"
|
|
toolflags="-doc"
|
|
version="${version.number}"
|
|
copyright="${copyright}"
|
|
javaFlags="-Xmx256M -Xms16M"
|
|
/>
|
|
<chmod perm="ugo+rx"
|
|
file="${build.bin.dir}/${scaladoc.exec.name}"/>
|
|
<scalatool
|
|
file="${build.bin.dir}/${fsc.exec.name}"
|
|
name="Fast Scala compiler"
|
|
class="scala.tools.nsc.CompileClient"
|
|
version="${version.number}"
|
|
copyright="${copyright}"
|
|
javaFlags="-Xmx256M -Xms16M"
|
|
/>
|
|
<chmod perm="ugo+rx"
|
|
file="${build.bin.dir}/${fsc.exec.name}"/>
|
|
|
|
<!-- build source jars -->
|
|
<parallel threadsPerProcessor="1">
|
|
<jar
|
|
destfile="${build.jar.dir}/${libsrc.jar.name}"
|
|
includes="**/*.scala">
|
|
<fileset dir="${src.dir}/library"/>
|
|
<fileset dir="${src.dir}/actors"/>
|
|
</jar>
|
|
<jar
|
|
destfile="${build.jar.dir}/${dbcsrc.jar.name}"
|
|
basedir="${src.dbc.dir}"
|
|
includes="**/*.scala"
|
|
/>
|
|
<jar
|
|
destfile="${build.jar.dir}/${compsrc.jar.name}"
|
|
basedir="${src.comp.dir}"
|
|
includes="**/*.scala"
|
|
/>
|
|
</parallel>
|
|
</target>
|
|
|
|
<target name="build.tests" depends="build">
|
|
<mkdir dir="${build.dir}/partest"/>
|
|
<javac
|
|
srcdir="${topdir}/src/partest"
|
|
destdir="${build.dir}/partest"/>
|
|
<scalac
|
|
srcdir="${topdir}/src/partest"
|
|
destdir="${build.dir}/partest"
|
|
deprecation="yes" unchecked="yes">
|
|
<classpath>
|
|
<pathelement location="${build.lib.dir}"/>
|
|
<pathelement location="${build.comp.dir}"/>
|
|
<pathelement location="${build.actors.dir}"/>
|
|
<pathelement location="${build.dir}/partest"/>
|
|
</classpath>
|
|
<include name="**/*.scala"/>
|
|
</scalac>
|
|
|
|
<jar
|
|
destfile="${build.jar.dir}/scala-partest-src.jar"
|
|
basedir="${topdir}/src/partest"
|
|
includes="**/*.scala"
|
|
/>
|
|
<jar
|
|
destfile="${build.jar.dir}/scala-partest.jar"
|
|
basedir="${build.dir}/partest"
|
|
/>
|
|
</target>
|
|
|
|
<target name="docs.lib" depends="build">
|
|
<taskdef
|
|
name="scaladoc"
|
|
classname="scala.tools.ant.Scaladoc">
|
|
<classpath>
|
|
<pathelement location="${build.jar.dir}/scala-library.jar"/>
|
|
<pathelement location="${build.jar.dir}/scala-compiler.jar"/>
|
|
<pathelement location="${fjbg.jar}"/>
|
|
<pathelement location="${msil.jar}"/>
|
|
|
|
</classpath>
|
|
</taskdef>
|
|
|
|
|
|
<mkdir dir="${api.lib.dir}"/>
|
|
<scaladoc
|
|
srcdir="${src.dir}"
|
|
destdir="${api.lib.dir}"
|
|
sourcepath=""
|
|
deprecation="yes" unchecked="yes"
|
|
windowtitle="Scala Library Documentation"
|
|
doctitle="<div>Scala ${version.number}<br/>API Specification</div>"
|
|
>
|
|
<classpath>
|
|
<!-- note: must use non-jarred source directories here or
|
|
scaladoc can crash -->
|
|
<pathelement location="${build.lib.dir}"/>
|
|
<pathelement location="${build.actors.dir}"/>
|
|
<pathelement location="${build.dbc.dir}"/>
|
|
</classpath>
|
|
<include name="dbc/**/*.scala"/>
|
|
<include name="actors/**/*.scala"/>
|
|
<include name="library/**/*.scala"/>
|
|
</scaladoc>
|
|
</target>
|
|
|
|
<target name="docs.manual">
|
|
<mkdir dir="${build.manual.dir}"/>
|
|
<scalac srcdir="${topdir}/src/manual" destdir="${build.manual.dir}"
|
|
deprecation="yes" unchecked="yes">
|
|
<classpath>
|
|
<pathelement location="${build.lib.dir}"/>
|
|
</classpath>
|
|
</scalac>
|
|
<emit command="scala"/>
|
|
<emit command="scalac"/>
|
|
<emit command="scaladoc"/>
|
|
<emit command="scalap"/>
|
|
<emit command="fsc"/>
|
|
<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>
|
|
|
|
<target name="docs" depends="docs.lib, docs.manual"/>
|
|
|
|
<target name="dist" depends="build"> <!-- should build docs manually -->
|
|
<!-- Create the SBaz packages -->
|
|
<mkdir dir="${dist.sbaz.dir}"/>
|
|
<parallel threadsPerProcessor="1">
|
|
<!-- Create the Scala library package -->
|
|
<sbaz
|
|
file="${dist.sbaz.dir}/${sbaz.lib.name}-${version.number}.sbp"
|
|
adfile="${dist.sbaz.dir}/${sbaz.lib.name}-${version.number}.advert"
|
|
name="${sbaz.lib.name}"
|
|
version="${version.number}"
|
|
desc="The Scala library. This is the minimal requirement to run any Scala program."
|
|
link="${sbaz.universe}/${sbaz.lib.name}-${version.number}.sbp"
|
|
>
|
|
<libset dir="${build.jar.dir}" includes="scala-library.jar"/>
|
|
<libset dir="${build.jar.dir}" includes="scala-dbc.jar"/>
|
|
<srcset dir="${build.jar.dir}" includes="${libsrc.jar.name}"/>
|
|
<srcset dir="${build.jar.dir}" includes="${dbcsrc.jar.name}"/>
|
|
</sbaz>
|
|
<!-- Create the Scala developer package -->
|
|
<sbaz
|
|
file="${dist.sbaz.dir}/${sbaz.dev.name}-${version.number}.sbp"
|
|
adfile="${dist.sbaz.dir}/${sbaz.dev.name}-${version.number}.advert"
|
|
name="${sbaz.dev.name}"
|
|
version="${version.number}"
|
|
desc="The Scala developer tools. This contains everything that is required to write, test and document new Scala programs."
|
|
depends="${sbaz.lib.name}"
|
|
link="${sbaz.universe}/${sbaz.dev.name}-${version.number}.sbp"
|
|
>
|
|
<binset dir="${build.bin.dir}" includes="**"/>
|
|
<libset dir="${build.jar.dir}" includes="scala-compiler.jar,${compsrc.jar.name}"/>
|
|
<docset dir="${docs.dir}" includes="README,LICENSE"/>
|
|
</sbaz>
|
|
<!-- Create the Scala developer documentation package -->
|
|
<sbaz
|
|
file="${dist.sbaz.dir}/${sbaz.dev.docs.name}-${version.number}.sbp"
|
|
adfile="${dist.sbaz.dir}/${sbaz.dev.docs.name}-${version.number}.advert"
|
|
name="${sbaz.dev.name}"
|
|
version="${version.number}"
|
|
desc="The Scala developper tools. This contains all developer documentation."
|
|
link="${sbaz.universe}/${sbaz.dev.docs.name}-${version.number}.sbp"
|
|
>
|
|
<manset dir="${tooldocs.dir}" includes="man1/*.1"/>
|
|
<docset dir="${api.lib.pdir}" includes="scala/**"/>
|
|
<docset dir="${tooldocs.dir}" includes="*.html"/>
|
|
</sbaz>
|
|
<!-- Creates the empty umbrella Scala package -->
|
|
<sbaz
|
|
file="${dist.sbaz.dir}/${sbaz.scala.name}-${version.number}.sbp"
|
|
adfile="${dist.sbaz.dir}/${sbaz.scala.name}-${version.number}.advert"
|
|
name="${sbaz.scala.name}"
|
|
version="${version.number}"
|
|
desc="The base Scala package that contains everything needed to start using Scala."
|
|
depends="${sbaz.lib.name},${sbaz.dev.name}"
|
|
link="${sbaz.universe}/${sbaz.scala.name}-${version.number}.sbp"
|
|
/>
|
|
</parallel>
|
|
</target>
|
|
|
|
<target name="dist.tests" depends="build.tests">
|
|
<sbaz
|
|
file="${dist.sbaz.dir}/${sbaz.test.name}-${version.number}.sbp"
|
|
adfile="${dist.sbaz.dir}/${sbaz.test.name}-${version.number}.advert"
|
|
name="${sbaz.test.name}"
|
|
version="${version.number}"
|
|
desc="The Scala test package contains everything needed to test Scala."
|
|
link="${sbaz.universe}/${sbaz.test.name}-${version.number}.sbp"
|
|
>
|
|
<binset
|
|
dir="${topdir}/test"
|
|
includes="scalatest,partest"
|
|
/>
|
|
<miscset
|
|
dir="${topdir}/test"
|
|
includes="files/**"
|
|
/>
|
|
<libset dir="${build.jar.dir}" includes="scala-partest.jar"/>
|
|
<srcset dir="${build.jar.dir}" includes="scala-partest-src.jar"/>
|
|
</sbaz>
|
|
</target>
|
|
|
|
<target name="install" depends="dist">
|
|
<exec executable="sbaz">
|
|
<arg line="-v install -f ${dist.sbaz.dir}/${sbaz.lib.name}-${version.number}.sbp"/>
|
|
</exec>
|
|
<exec executable="sbaz">
|
|
<arg line="-v install -f ${dist.sbaz.dir}/${sbaz.dev.name}-${version.number}.sbp"/>
|
|
</exec>
|
|
<exec executable="sbaz">
|
|
<arg line="-v install -f ${dist.sbaz.dir}/${sbaz.scala.name}-${version.number}.sbp"/>
|
|
</exec>
|
|
</target>
|
|
|
|
<target name="install.tests" depends="dist.tests">
|
|
<exec executable="sbaz">
|
|
<arg line="-v install -f ${dist.sbaz.dir}/${sbaz.test.name}-${version.number}.sbp"/>
|
|
</exec>
|
|
</target>
|
|
|
|
<target name="clean">
|
|
<delete
|
|
dir="${build.dir}"
|
|
includeemptydirs="yes"
|
|
quiet="yes"
|
|
failonerror="no"
|
|
/>
|
|
</target>
|
|
|
|
</project>
|