Fixed some distribution-related build dependencies and improved the way devel, patch and minor distributions can be requested. Updated README to match current build script.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@6653 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
parent
17f7de8c81
commit
3c4e90560d
29
README
29
README
|
@ -13,6 +13,7 @@ build script or user-created if needed.
|
||||||
scala/
|
scala/
|
||||||
build/ † Temporary staging area for build products.
|
build/ † Temporary staging area for build products.
|
||||||
build.excludes † An optional build configuration file.
|
build.excludes † An optional build configuration file.
|
||||||
|
build.number The version number of the current distribution.
|
||||||
build.properties † An optional build configuration file.
|
build.properties † An optional build configuration file.
|
||||||
build.xml The main Ant build script.
|
build.xml The main Ant build script.
|
||||||
dist/ † The destination folder of Scala distributions.
|
dist/ † The destination folder of Scala distributions.
|
||||||
|
@ -21,17 +22,16 @@ scala/
|
||||||
examples/ Scala example files.
|
examples/ Scala example files.
|
||||||
man/ UNIX manual files.
|
man/ UNIX manual files.
|
||||||
lib/ Pre-compiled libraries for the build.
|
lib/ Pre-compiled libraries for the build.
|
||||||
|
ant-contrib.jar Support libraries for the build tool.
|
||||||
fjbg.jar The Java byte-code generation library.
|
fjbg.jar The Java byte-code generation library.
|
||||||
jaco.jar The JaCo Java compiler.
|
jaco.jar The JaCo Java compiler.
|
||||||
msil.jar The CLR byte-code generation library.
|
|
||||||
scala-compiler.jar The last stable version of the Scala compiler.
|
scala-compiler.jar The last stable version of the Scala compiler.
|
||||||
scala-library.jar The last stable version of the Scala library.
|
scala-library.jar The last stable version of the Scala library.
|
||||||
scala.dll The Scala library for Windows.
|
logs/ † Build tool log files.
|
||||||
README The file you are currently reading.
|
README The file you are currently reading.
|
||||||
sandbox/ † A folder to test code etc.
|
sandbox/ † A folder to test code etc.
|
||||||
src/ All the source files of Scala.
|
src/ All the source files of Scala.
|
||||||
compiler/ The sources of the Scala compiler.
|
compiler/ The sources of the Scala compiler.
|
||||||
exec/ The sources of the executable wrapper-scripts.
|
|
||||||
library/ The sources of the Scala library.
|
library/ The sources of the Scala library.
|
||||||
test/ The Scala test suite.
|
test/ The Scala test suite.
|
||||||
|
|
||||||
|
@ -62,8 +62,7 @@ Part III. Requirements for SABBUS
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
The Scala build system is based on Apache Ant. Most required pre-compiled libraries are part of the repository (in 'lib/'). The following however is assumed to be installed on the build machine:
|
The Scala build system is based on Apache Ant. Most required pre-compiled libraries are part of the repository (in 'lib/'). The following however is assumed to be installed on the build machine:
|
||||||
- A Java runtime environment (JRE) or SDK 1.4 or above (with 1.5 highly
|
- A Java runtime environment (JRE) or SDK 1.4 or above.
|
||||||
recommended for performance reasons).
|
|
||||||
- Apache Ant version 1.6 or above.
|
- Apache Ant version 1.6 or above.
|
||||||
|
|
||||||
Part IV. Common use-cases
|
Part IV. Common use-cases
|
||||||
|
@ -98,15 +97,33 @@ Part IV. Common use-cases
|
||||||
make sure it is stable).
|
make sure it is stable).
|
||||||
- (planned) Runs the test suite.
|
- (planned) Runs the test suite.
|
||||||
|
|
||||||
|
'ant docs'
|
||||||
|
Generates the HTML documentation for the library from the sources using the
|
||||||
|
scaladoc tool in quick.
|
||||||
|
|
||||||
|
'ant docs.compiler'
|
||||||
|
Generates the HTML documentation for the compiler from the sources using the
|
||||||
|
scaladoc tool in quick.
|
||||||
|
|
||||||
'ant dist'
|
'ant dist'
|
||||||
Builds a distribution.
|
Builds a distribution.
|
||||||
- Runs all the tests as above (and refuses to build a distribution if it
|
- Runs all the tests as above (and refuses to build a distribution if it
|
||||||
fails).
|
fails).
|
||||||
- Creates a local distribution in 'dists/latest'.
|
- Creates a local distribution in 'dists/latest'.
|
||||||
- Creates all relevant Scala Bazaar archives and advertisement files.
|
- Creates all relevant Scala Bazaar archives and advertisement files.
|
||||||
- (planned) Creates the IzPack installer.
|
|
||||||
|
'ant dist.devel' or 'ant dist.patch' or 'ant dist.minor'
|
||||||
|
Builds a distribution to be publicly released and manages version numbers.
|
||||||
|
- Patch and Minor versions are public releases. The version number is
|
||||||
|
automatically bumped up and is formatted as 'major.minor.patch'.
|
||||||
|
- Devel versions are betas for semi-public release. Numbers are formatted as
|
||||||
|
'major.minor.patch.svn'. Version '2.3.4.5875' is a beta for either patch
|
||||||
|
'2.3.5' or minor version '2.4.0'.
|
||||||
|
|
||||||
'ant clean'
|
'ant clean'
|
||||||
|
Removes all temporary build files (locker is preserved).
|
||||||
|
|
||||||
|
'ant clean.build'
|
||||||
Removes all build files (including locker).
|
Removes all build files (including locker).
|
||||||
|
|
||||||
'ant clean.all'
|
'ant clean.all'
|
||||||
|
|
151
build.xml
151
build.xml
|
@ -32,17 +32,20 @@ PROPERTIES
|
||||||
<property name="lib.dir" value="${basedir}/lib"/>
|
<property name="lib.dir" value="${basedir}/lib"/>
|
||||||
<property name="src.dir" value="${basedir}/src"/>
|
<property name="src.dir" value="${basedir}/src"/>
|
||||||
<property name="test.dir" value="${basedir}/test"/>
|
<property name="test.dir" value="${basedir}/test"/>
|
||||||
|
<property name="properties" value="${basedir}/build.properties"/>
|
||||||
|
<echo level="verbose" message="properties=${properties}"/>
|
||||||
<!-- User properties -->
|
<!-- User properties -->
|
||||||
<property file="${basedir}/build.properties"/>
|
<property file="${properties}"/>
|
||||||
<!-- General properties -->
|
<!-- General properties -->
|
||||||
<property name="number.file" value="${basedir}/build.number"/>
|
<property name="number.file" value="${basedir}/build.number"/>
|
||||||
<property name="copyright" value="(c) 2002-2006 LAMP/EPFL"/>
|
<property name="copyright" value="(c) 2002-2006 LAMP/EPFL"/>
|
||||||
|
<property name="logs.dir" value="${basedir}/logs"/>
|
||||||
<!-- NSC configuration properties -->
|
<!-- NSC configuration properties -->
|
||||||
<property name="nsc.logging" value="none"/>
|
<property name="nsc.logging" value="none"/>
|
||||||
<property name="nsc.log-files" value="no"/>
|
<property name="nsc.log-files" value="no"/>
|
||||||
<property name="nsc.excludes" value="${basedir}/build.excludes"/>
|
<property name="nsc.excludes" value="${basedir}/build.excludes"/>
|
||||||
<property name="nsc.params" value=""/>
|
<property name="nsc.params" value=""/>
|
||||||
<property name="nsc.timers" value="${basedir}/build.timers"/>
|
<property name="nsc.timers" value="${logs.dir}/build.timers"/>
|
||||||
<!-- SVN configuration properties -->
|
<!-- SVN configuration properties -->
|
||||||
<property name="svn.entries" value="${basedir}/.svn/entries"/>
|
<property name="svn.entries" value="${basedir}/.svn/entries"/>
|
||||||
<!-- Location of pre-compiled libraries properties -->
|
<!-- Location of pre-compiled libraries properties -->
|
||||||
|
@ -166,7 +169,7 @@ INITIALISATION
|
||||||
<pathelement location="${starr.comp.jar}"/>
|
<pathelement location="${starr.comp.jar}"/>
|
||||||
<path refid="common.classpath"/>
|
<path refid="common.classpath"/>
|
||||||
</path>
|
</path>
|
||||||
<!-- Creating boot-level tasks -->
|
<!-- Setting-up Ant contrib tasks -->
|
||||||
<taskdef resource="net/sf/antcontrib/antlib.xml">
|
<taskdef resource="net/sf/antcontrib/antlib.xml">
|
||||||
<classpath>
|
<classpath>
|
||||||
<pathelement location="${ant-contrib.jar}"/>
|
<pathelement location="${ant-contrib.jar}"/>
|
||||||
|
@ -210,6 +213,7 @@ INITIALISATION
|
||||||
<fail>System environment could not be determined</fail>
|
<fail>System environment could not be determined</fail>
|
||||||
</else>
|
</else>
|
||||||
</if>
|
</if>
|
||||||
|
<!-- Printing out some information about what environment I am running in -->
|
||||||
<echo
|
<echo
|
||||||
level="info"
|
level="info"
|
||||||
message="OS: ${os.type} (${os.name} ${os.arch} ${os.version});"
|
message="OS: ${os.type} (${os.name} ${os.arch} ${os.version});"
|
||||||
|
@ -226,6 +230,20 @@ INITIALISATION
|
||||||
level="info"
|
level="info"
|
||||||
message="Ant: ${ant.version}."
|
message="Ant: ${ant.version}."
|
||||||
/>
|
/>
|
||||||
|
<!-- Finding out SVN revision -->
|
||||||
|
<loadfile
|
||||||
|
property="entries"
|
||||||
|
srcFile="${svn.entries}"
|
||||||
|
failonerror="false"
|
||||||
|
/>
|
||||||
|
<propertyregex
|
||||||
|
property="svn.revision"
|
||||||
|
input="${entries}"
|
||||||
|
regexp="revision=\042([0-9]*)\042\.*"
|
||||||
|
select="\1"
|
||||||
|
defaultValue="x"
|
||||||
|
/>
|
||||||
|
<property name="init.avail" value="yes"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="setup" depends="init">
|
<target name="setup" depends="init">
|
||||||
|
@ -267,89 +285,20 @@ INITIALISATION
|
||||||
<condition property="locker.avail">
|
<condition property="locker.avail">
|
||||||
<available file="${locker.dir}/complete"/>
|
<available file="${locker.dir}/complete"/>
|
||||||
</condition>
|
</condition>
|
||||||
<!-- Defining version number -->
|
<!-- Generating version number -->
|
||||||
<loadfile
|
<property file="${number.file}"/>
|
||||||
property="entries"
|
|
||||||
srcFile="${svn.entries}"
|
|
||||||
failonerror="false"
|
|
||||||
/>
|
|
||||||
<propertyregex
|
|
||||||
property="svn.revision"
|
|
||||||
input="${entries}"
|
|
||||||
regexp="revision=\042([0-9]*)\042\.*"
|
|
||||||
select="\1"
|
|
||||||
defaultValue="x"
|
|
||||||
/>
|
|
||||||
<!-- OVER-ENGINEERING ALERT: Calculating version numbers might be over-engineered -->
|
|
||||||
<!-- But deciding of a versioning scheme was hard enough: let's hard code it! -->
|
|
||||||
<if>
|
|
||||||
<not><isset property="release"/></not>
|
|
||||||
<then>
|
|
||||||
<property file="${number.file}"/>
|
|
||||||
<property
|
|
||||||
name="version.number"
|
|
||||||
value="${version.major}.${version.minor}.${version.patch}.${svn.revision}.${time.short}"
|
|
||||||
/>
|
|
||||||
</then>
|
|
||||||
<elseif>
|
|
||||||
<equals arg1="${release}" arg2="devel"/>
|
|
||||||
<then>
|
|
||||||
<property file="${number.file}"/>
|
|
||||||
<property
|
|
||||||
name="version.number"
|
|
||||||
value="${version.major}.${version.minor}.${version.patch}.${svn.revision}"
|
|
||||||
/>
|
|
||||||
</then>
|
|
||||||
</elseif>
|
|
||||||
<elseif>
|
|
||||||
<equals arg1="${release}" arg2="patch"/>
|
|
||||||
<then>
|
|
||||||
<propertyfile
|
|
||||||
file="${number.file}"
|
|
||||||
comment="Version last updated on ${time.human}"
|
|
||||||
>
|
|
||||||
<entry key="version.patch" type="int" default="0" operation="+"/>
|
|
||||||
</propertyfile>
|
|
||||||
<property file="${number.file}"/>
|
|
||||||
<property
|
|
||||||
name="version.number"
|
|
||||||
value="${version.major}.${version.minor}.${version.patch}"
|
|
||||||
/>
|
|
||||||
</then>
|
|
||||||
</elseif>
|
|
||||||
<elseif>
|
|
||||||
<equals arg1="${release}" arg2="minor"/>
|
|
||||||
<then>
|
|
||||||
<propertyfile
|
|
||||||
file="${number.file}"
|
|
||||||
comment="Version last updated on ${time.human}"
|
|
||||||
>
|
|
||||||
<entry key="version.minor" type="int" default="0" operation="+"/>
|
|
||||||
<entry key="version.patch" type="int" value="0"/>
|
|
||||||
</propertyfile>
|
|
||||||
<property file="${number.file}"/>
|
|
||||||
<property
|
|
||||||
name="version.number"
|
|
||||||
value="${version.major}.${version.minor}.${version.patch}"
|
|
||||||
/>
|
|
||||||
</then>
|
|
||||||
</elseif>
|
|
||||||
<else>
|
|
||||||
<fail message="The 'release' property must be set to 'devel', 'minor' or 'major'"/>
|
|
||||||
</else>
|
|
||||||
</if>
|
|
||||||
<!-- End of over-engineering alert -->
|
|
||||||
<echo level="verbose" message="version.number=${version.number}"/>
|
|
||||||
<property
|
<property
|
||||||
name="dist.current.dir"
|
name="version.number"
|
||||||
value="${dist.dir}/${dist.name}-${version.number}"
|
value="${version.major}.${version.minor}.${version.patch}.${svn.revision}.${time.short}"
|
||||||
/>
|
/>
|
||||||
|
<echo level="verbose" message="version.number=${version.number}"/>
|
||||||
|
<!-- Setup timer -->
|
||||||
|
<mkdir dir="${logs.dir}"/>
|
||||||
<echo
|
<echo
|
||||||
file="${nsc.timers}"
|
file="${nsc.timers}"
|
||||||
append="true"
|
append="true"
|
||||||
message="${line.separator}Revision ${svn.revision};${line.separator} built ${time.human};${line.separator} by ${java.vm.name} ${java.vm.version};${line.separator} on ${os.name} ${os.arch} ${os.version}:${line.separator}"
|
message="${line.separator}Revision ${svn.revision};${line.separator} built ${time.human};${line.separator} by ${java.vm.name} ${java.vm.version};${line.separator} on ${os.name} ${os.arch} ${os.version}:${line.separator}"
|
||||||
/>
|
/>
|
||||||
<property name="init.avail" value="yes"/>
|
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="setup.locker" depends="setup, build.locker">
|
<target name="setup.locker" depends="setup, build.locker">
|
||||||
|
@ -916,11 +865,55 @@ DOCUMENTATION
|
||||||
GENERATES A DISTRIBUTION
|
GENERATES A DISTRIBUTION
|
||||||
============================================================================ -->
|
============================================================================ -->
|
||||||
|
|
||||||
|
<target name="dist.devel" depends="init">
|
||||||
|
<property file="${number.file}"/>
|
||||||
|
<property
|
||||||
|
name="version.number"
|
||||||
|
value="${version.major}.${version.minor}.${version.patch}.${svn.revision}"
|
||||||
|
/>
|
||||||
|
<runtarget target="dist"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="dist.patch" depends="init">
|
||||||
|
<propertyfile
|
||||||
|
file="${number.file}"
|
||||||
|
comment="Version last updated on ${time.human}"
|
||||||
|
>
|
||||||
|
<entry key="version.patch" type="int" default="0" operation="+"/>
|
||||||
|
</propertyfile>
|
||||||
|
<property file="${number.file}"/>
|
||||||
|
<property
|
||||||
|
name="version.number"
|
||||||
|
value="${version.major}.${version.minor}.${version.patch}"
|
||||||
|
/>
|
||||||
|
<runtarget target="dist"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="dist.minor" depends="init">
|
||||||
|
<propertyfile
|
||||||
|
file="${number.file}"
|
||||||
|
comment="Version last updated on ${time.human}"
|
||||||
|
>
|
||||||
|
<entry key="version.minor" type="int" default="0" operation="+"/>
|
||||||
|
<entry key="version.patch" type="int" value="0"/>
|
||||||
|
</propertyfile>
|
||||||
|
<property file="${number.file}"/>
|
||||||
|
<property
|
||||||
|
name="version.number"
|
||||||
|
value="${version.major}.${version.minor}.${version.patch}"
|
||||||
|
/>
|
||||||
|
<runtarget target="dist"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
<target
|
<target
|
||||||
name="dist"
|
name="dist"
|
||||||
depends="test, docs"
|
depends="test, docs"
|
||||||
description="Creates a complete Scala distribution"
|
description="Creates a complete Scala distribution"
|
||||||
>
|
>
|
||||||
|
<property
|
||||||
|
name="dist.current.dir"
|
||||||
|
value="${dist.dir}/${dist.name}-${version.number}"
|
||||||
|
/>
|
||||||
<mkdir dir="${dist.current.dir}"/>
|
<mkdir dir="${dist.current.dir}"/>
|
||||||
<!-- Copy all requires libraries -->
|
<!-- Copy all requires libraries -->
|
||||||
<mkdir dir="${dist.current.dir}/lib"/>
|
<mkdir dir="${dist.current.dir}/lib"/>
|
||||||
|
|
Loading…
Reference in New Issue