diff options
author | Gilles Dubochet <gilles.dubochet@epfl.ch> | 2005-10-11 11:53:02 +0000 |
---|---|---|
committer | Gilles Dubochet <gilles.dubochet@epfl.ch> | 2005-10-11 11:53:02 +0000 |
commit | 59a434de1b5fbc24383586d21412d3bd154e1013 (patch) | |
tree | 5596a2abeb39956d2d18c5176159888e0b9104f0 | |
parent | 6f850988f453d6ced9661271ea4a5ed0be83d0e9 (diff) | |
download | scala-59a434de1b5fbc24383586d21412d3bd154e1013.tar.gz scala-59a434de1b5fbc24383586d21412d3bd154e1013.tar.bz2 scala-59a434de1b5fbc24383586d21412d3bd154e1013.zip |
Changed the way to set properties.
-rw-r--r-- | build.properties | 17 | ||||
-rw-r--r-- | build.readme | 107 | ||||
-rw-r--r-- | build.xml | 75 | ||||
-rw-r--r-- | config/build.TEMPLATE.properties | 18 | ||||
-rw-r--r-- | config/build.default.properties (renamed from build.support/build.default) | 3 |
5 files changed, 165 insertions, 55 deletions
diff --git a/build.properties b/build.properties deleted file mode 100644 index fae9e5f2ef..0000000000 --- a/build.properties +++ /dev/null @@ -1,17 +0,0 @@ -# The path to the old Scala library. -oslib.jar=/Developer/Scala/Latest/lib/scala.jar - -# The path to the old Scala tools. -ostools.jar=/Developer/Scala/Latest/lib/tools.jar - -# The path to the Jaco/Pico compiler. -jaco.jar=/Users/dubochet/Documents/Jaco/distrib/pizza/lib/jaco.jar - -# The path to the FJBG byte-code generation library. -fjbg.jar=/Developer/Scala/Stable/lib/fjbg.jar - -# The path to the MSIL byte-code generation library. -msil.jar=/Developer/Scala/MSIL/msil.jar - -# Other custom properties come here -nsc.skip=jvm
\ No newline at end of file diff --git a/build.readme b/build.readme new file mode 100644 index 0000000000..54b2fdb1ff --- /dev/null +++ b/build.readme @@ -0,0 +1,107 @@ +BUILDING NEW SCALA WITH ANT +--------------------------- + +This is version 1.0 of the Scala Ant-based build system SABBUS. + +QUICK START +----------- + +- Copy the 'build.TEMPLATE.properties' file in 'build.support' to + 'build.USER_NAME.properties'. Set all properties in this file. + +- In a terminal window, type: + ANT_OPTS="-Xmx256M" ant distrib + +USAGE GUIDE +----------- + +PREREQUISITES + +The new Scala Ant-based build system (SABBUS) requires the following elements: + - An old Scala distribution. The Scala tools ('tools.jar' must be of a version + that does contain the improved Scalac Ant task at + 'scala.tools.scalac.ant.Scalac'. The scala library ('scala.jar') must contain + all classes required to build NSC. + - A PiCo/JaCo distribution. It must contain the improved PiCo task at + 'jaco.pizza.ant.Pico'. + - Ant version 1.6 or above. + - Java version 1.4 or above (Java 1.5 might not be supported). + +SETTING UP + +The set-up of SABBUS is done entirely in the 'build.properties' file. Make sure +that all values in this file are set and correct. + +Another configuration file exists ('build.support/build.default'). This file +should not be modified as any property declared in 'build.properties' will +override the value set in 'build.default'. + +With a normal Java distribution, the standard memory allocated to the JVM in +insufficient for Scala compilation. The ANT_OPTS environment variable needs to +be set to increase the memory size (either each time as in the quick start +example above, or once and for all in the default shell environment). + +BUILDING NEW SCALA + +The 'build' target builds all the Scala library and tools. It is composed of the +following sub-targets: + - 'build.pico.nslib': + Builds the Java files in Scala (runtime, tools and scala root) with PiCo. + When both a Java file in sources and a Scala file in newsources exist, the + Java file is not compiled (it is considered to have been superseeded by the + Scala file). + - 'build.osc.nstools': + Builds NSC with an existing Scalac (found in path of property + 'ostools.jar'). + - 'build.nsc.nslib': + Builds the new Scala library with the compiler built at target + 'build.osc.nstools'. Depends on 'build.osc.nstools' & 'build.pico.nslib'. + If files should not be compiled at that stage, they can be specified in the + 'build.support/nsc.nslib.excludes' + - 'build.nsc.nstools': + Builds NSC with the compiler built at target 'build.osc.nstools'. Depends + on 'build.osc.nstools' & 'build.pico.nslib'. If files should not be + compiled at that stage, they can be specified in the + 'build.support/nsc.nstools.excludes' + +CONSTRUCTING A DISTRIBUTION + +The 'distrib' target constructs a simple distribution of new Scala from the +latest build. The following steps will be done: + - Creates a standard distribution folder hierarchy. + - Create JAR packages for the library ('nslib.jar'), and the tools, both + compiled with Scalac ('osc-nstools.jar') and with NSC ('nstools.jar'). + - Create script files (bash and bat) to execute the new Scala compiler. + - Adds man files and the documentation to the distribution. + - Generates some symbolic links to simplify navigation (only on UNIX). Amongst + other, a 'latest' link in the 'dist' folder will point to the latest + distribution folder (useful to refer in a permanent way to the latest + distribution on your system). + +CLEANING + +The 'clean' target removes all build and distribution files. + - 'clean.build' only removes build files and does not touch distribution files. + - 'clean.distrib' only removes distribution files. + +DOCUMENTING + +Not implemented yet + +TESTING + +Not implemented yet + +KNOWN BUGS, LIMITATIONS AND PLANNED IMPROVEMENTS +------------------------------------------------ + +- Create NSC executable scripts for UNIX and Windows. +- Create Windows build system. +- Create documentation. +- Support testing. + +HISTORY +------- + +1.0 + First functioning version. Supports clean, build and a limited distrib. @@ -11,22 +11,23 @@ <!-- The system classpath should not be used --> <property name="build.sysclasspath" value="ignore" /> - + <!-- Sets project's properties --> - <!-- Properties in 'build.properties' take precedence over properties - in 'build.default.properties' - --> - <property file="${basedir}/build.properties" /> - <property file="${basedir}/build.support/build.default" /> + <!-- Properties in 'build.${user.name}.properties' take precedence over properties in 'build.default.properties' --> + <echo>Loading properties from '${basedir}/build.support/build.${user.name}.properties'</echo> + <property file="${basedir}/build.support/build.${user.name}.properties"/> + <echo>Loading properties from '${basedir}/build.support/build.default.properties'</echo> + <property file="${basedir}/build.support/build.default.properties"/> <!-- A path containing pre-compiled Scala libraries found typically in a Scala distribution. --> <path id="osc.classpath"> - <pathelement location="${oslib.jar}" /> - <pathelement location="${ostools.jar}" /> - <pathelement location="${fjbg.jar}" /> - <pathelement location="${msil.jar}" /> + <pathelement location="${oslib.jar}"/> + <pathelement location="${oslib.src}"/> + <pathelement location="${ostools.jar}"/> + <pathelement location="${fjbg.jar}"/> + <pathelement location="${msil.jar}"/> </path> <!-- A path containing the Pico library --> @@ -62,16 +63,16 @@ </fail> <taskdef name="osc" classname="scala.tools.scalac.ant.Scalac" classpathref="osc.classpath"/> </target> - + <target name="init.nsc" depends="build.osc.nstools, build.pico.nslib"> <taskdef name="nsc" classname="scala.tools.nsc.ant.NSC$class"> - <classpath> - <pathelement location="${build.osc-nstools.dir}" /> - <pathelement location="${build.nslib.dir}" /> - <pathelement location="${oslib.jar}" /> - <pathelement location="${fjbg.jar}" /> - <pathelement location="${msil.jar}" /> - </classpath> + <classpath> + <pathelement location="${build.osc-nstools.dir}" /> + <pathelement location="${build.nslib.dir}" /> + <pathelement location="${oslib.jar}" /> + <pathelement location="${fjbg.jar}" /> + <pathelement location="${msil.jar}" /> + </classpath> </taskdef> </target> @@ -128,10 +129,10 @@ <osc srcdir="${sources.dir}" destdir="${build.osc-nstools.dir}" force="changed"> <classpath> - <pathelement location="${build.osc-nstools.dir}"/> - <pathelement location="${oslib.jar}"/> - <pathelement location="${fjbg.jar}"/> - <pathelement location="${ant.jar}"/> + <pathelement location="${build.osc-nstools.dir}"/> + <pathelement location="${oslib.jar}"/> + <pathelement location="${fjbg.jar}"/> + <pathelement location="${ant.jar}"/> </classpath> <include name="scala/tools/nsc/**/*.scala"/> <include name="scala/runtime/*.scala"/> @@ -146,14 +147,14 @@ usepredefs="false" stop="${nsc.stop}" skip="${nsc.skip}" check="${nsc.check}" logging="${nsc.logging}"> - <classpath> - <pathelement location="${build.nslib.dir}"/> - <pathelement location="${sources.dir}"/> - <pathelement location="${newsources.dir}"/> - <pathelement location="${fjbg.jar}"/> - </classpath> + <classpath> + <pathelement location="${build.nslib.dir}"/> + <pathelement location="${sources.dir}"/> + <pathelement location="${newsources.dir}"/> + <pathelement location="${fjbg.jar}"/> + </classpath> <include name="scala/Predef.scala"/> - <include name="scala/runtime/ScalaRunTime.scala"/> + <include name="scala/runtime/ScalaRunTime.scala"/> </nsc> <nsc srcdir="${sources.dir}" destdir="${build.nslib.dir}" excludesfile="${nsc.nslib.excludes}" @@ -204,11 +205,11 @@ </condition> <condition property="os.mac"> - <os family="mac"/> + <os family="mac"/> </condition> <condition property="os.win"> - <os family="windows"/> + <os family="windows"/> </condition> <target name="distrib" @@ -216,8 +217,8 @@ description="Creates a (simplified) Scala distribution." /> <target name="distrib.unix" depends="build" if="os.unix"> - <tstamp prefix="start"/> - <property name="distrib.current.dir" value="${distrib.dir}/${distrib.current.prefix}-${start.DSTAMP}-${start.TSTAMP}"/> + <tstamp prefix="start"/> + <property name="distrib.current.dir" value="${distrib.dir}/${distrib.current.prefix}-${start.DSTAMP}-${start.TSTAMP}"/> <mkdir dir="${distrib.current.dir}/share/scala"/> <mkdir dir="${distrib.current.dir}/share/scala/lib"/> <symlink resource="${distrib.current.dir}/share/scala/lib/" link="${distrib.current.dir}/lib" /> @@ -259,7 +260,7 @@ </target> <target name="distrib.win" depends="build" if="os.win"> - <fail>Windows distribution is not supported yet.</fail> + <fail>Windows distribution is not supported yet.</fail> </target> <!-- @@ -267,7 +268,7 @@ TEST ##################################################################### --> - + <target name="test" description="Runs the Scala test suite."> <fail>'test' is not implemented yet.</fail> </target> @@ -277,11 +278,11 @@ DOCS ##################################################################### --> - + <target name="docs" description="Generates all documentation."> <fail>'docs' is not implemented yet.</fail> </target> - + <!-- ##################################################################### CLEAN diff --git a/config/build.TEMPLATE.properties b/config/build.TEMPLATE.properties new file mode 100644 index 0000000000..5c22052057 --- /dev/null +++ b/config/build.TEMPLATE.properties @@ -0,0 +1,18 @@ +# The path to the old Scala library JAR package and source directory. +oslib.jar= +oslib.src= + +# The path to the old Scala tools. +ostools.jar= + +# The path to the Jaco/Pico compiler. +jaco.jar= + +# The path to the FJBG byte-code generation library. +fjbg.jar= + +# The path to the MSIL byte-code generation library. +msil.jar= + +# Other custom properties come here +nsc.skip=
\ No newline at end of file diff --git a/build.support/build.default b/config/build.default.properties index e3511aa4c2..cfce6c53d1 100644 --- a/build.support/build.default +++ b/config/build.default.properties @@ -1,7 +1,7 @@ # These are the default properties for the Scala build script. # DO NOT CHANGE THIS FILE! Changes should be made in the -# 'build.properties' file, that will override the properties in +# 'build.USER_NAME.properties' file, that will override the properties in # this file. nsc.logging=none @@ -12,6 +12,7 @@ nsc.nslib.excludes=${basedir}/build.support/nsc.nslib.excludes nsc.nstools.excludes=${basedir}/build.support/nsc.nstools.excludes oslib.jar=/usr/local/lib/scala.jar +oslib.src=/usr/local/share/scala/src ostools.jar=/usr/local/lib/tools.jar jaco.jar=/usr/local/lib/jaco.jar fjbg.jar=/usr/local/lib/fjbg.jar |