diff options
author | michelou <michelou@epfl.ch> | 2005-09-09 15:41:49 +0000 |
---|---|---|
committer | michelou <michelou@epfl.ch> | 2005-09-09 15:41:49 +0000 |
commit | ce8cd951e79b99ede189120b59e43d7924fd9fb0 (patch) | |
tree | 434db025a1270996c1f002df07190af2f318976d /test-nsc.xml | |
parent | 2bcd0daa548bf8ec6ae7e8a321eb959b42a52a04 (diff) | |
download | scala-ce8cd951e79b99ede189120b59e43d7924fd9fb0.tar.gz scala-ce8cd951e79b99ede189120b59e43d7924fd9fb0.tar.bz2 scala-ce8cd951e79b99ede189120b59e43d7924fd9fb0.zip |
- moved some operations to Ant buildfile.
Diffstat (limited to 'test-nsc.xml')
-rw-r--r-- | test-nsc.xml | 98 |
1 files changed, 62 insertions, 36 deletions
diff --git a/test-nsc.xml b/test-nsc.xml index 2f23e15df5..221040353b 100644 --- a/test-nsc.xml +++ b/test-nsc.xml @@ -1,3 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE project [ <!ENTITY userExcludes ""> ]> @@ -19,47 +20,64 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --> - <!-- %%% properties and taskdefs %%%--> + <property file="build-nsc.properties.${platform}" prefix="nsc." /> - <property file="build-nsc.properties"/> + <property file="developer/${user.name}/custom.properties" /> - <!-- taskdefs to call compilers --> - - <taskdef name="nsc" classname="scala.tools.scala4ant.NscTask$class"/> - - <!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - - test test nsc compiler - - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --> - - <property file="developer/${user.name}/custom.properties"/> + <target name="init.args" if="nscArgs"> + <property name="moreNscArgs" value="${nscArgs}" /> + </target> - <target name="init.args" if="nscArgs"> - <property name="moreNscArgs" value="${nscArgs}"/> - </target> + <target name="init.noargs"> + <property name="moreNscArgs" value="" /> + </target> - <target name="init.noargs"> - <property name="moreNscArgs" value=""/> - </target> + <target name="init" depends="init.args, init.noargs"> + <echo> Hi, I am your helpful test script. Passing options to nsc?</echo> + <echo> Either, add a line to developer/${user.name}/custom.properties</echo> + <echo> nscArgs = -check:term;-debug </echo> + <echo> or set a property nscArgs on the cmd line</echo> + <echo> sh ant-test-nsc.sh -DnscArgs="-check:term;-debug" </echo> + <echo/> + <echo> Note the hyphens, the quotes on the cmd line, no spaces between options, the ';' separator</echo> + </target> + + <target name="check.env"> + <fail> + <condition><not><available file="${nsc.fjbg_jar}" /></not></condition> + Missing library file ${nsc.fjbg_jar}. + Check your property file build-nsc.properties.${platform}. + </fail> + <fail> + <condition><not><available file="${nsc.scala_jar}" /></not></condition> + Missing library file ${nsc.scala_jar}. + Check your property file build-nsc.properties.${platform}. + </fail> + <fail> + <condition><not><available file="${nsc.tools_jar}" /></not></condition> + Missing library file ${nsc.tools_jar}. + Check your property file build-nsc.properties.${platform}. + </fail> + <fail> + <condition><not><available file="${nsc.nsc_jar}" /></not></condition> + Missing library file ${nsc.nsc_jar}. + Check your property file build-nsc.properties.${platform}. + </fail> + <fail> + <condition><not><available file="${nsc.nsc4ant_jar}" /></not></condition> + Missing library file ${nsc.nsc4ant_jar}. + Check your property file build-nsc.properties.${platform}. + </fail> + </target> - <target name="init" depends="init.args, init.noargs"> - <echo> Hi, I am your helpful test script. Passing options to nsc?</echo> - <echo> Either, add a line to developer/${user.name}/custom.properties</echo> - <echo> nscArgs = -check:term;-debug </echo> - <echo> or set a property nscArgs on the cmd line</echo> - <echo> sh ant-test-nsc.sh -DnscArgs="-check:term;-debug" </echo> - <echo/> - <echo> Note the hyphens, the quotes on the cmd line, no spaces between options, the ';' separator</echo> - </target> + <target name="test" depends="init,check.env"> + <mkdir dir="${nsc.nsc_output_dir}" /> - <target name="test" depends="init"> + <taskdef name="nsc" classname="scala.tools.scala4ant.NscTask$class" /> - <mkdir dir="${nsc_output_dir}"/> - <echo>==== running nsc on predef and runtime</echo> - <nsc srcdir="sources" destdir="${nsc_output_dir}" - classpath="sources:newsources:${nsrt_jar}" + <nsc srcdir="sources" destdir="${nsc.nsc_output_dir}" + classpath="sources:newsources:${nsc.nsrt_jar}" nscArgs="-nopredefs;${moreNscArgs}"> <include name="scala/Predef.scala"/> @@ -67,8 +85,8 @@ </nsc> <echo>===== running nsc on the rest</echo> - <nsc srcdir="sources" destdir="${nsc_output_dir}" - classpath="sources:newsources:${nsrt_jar}:${nsc_output_dir}" + <nsc srcdir="sources" destdir="${nsc.nsc_output_dir}" + classpath="sources:newsources:${nsc.nsrt_jar}:${nsc.nsc_output_dir}" nscArgs="${moreNscArgs}" force="true"> <include name="scala/**/*.scala"/> @@ -81,8 +99,16 @@ &userExcludes; </nsc> - <jar destfile="${jars_dir}/nsrt.jar" basedir="${nsc_output_dir}" update="true"/> + <!-- couldn't get parameter "update" to work on Windows (mics) --> + <jar destfile="${nsc.nsrt_jar}"> + <fileset dir="${nsc.tools_util_runtime_dir}" /> + <fileset dir="${nsc.nsc_output_dir}" /> + </jar> + + </target> + <target name="clean"> + <delete dir="${nsc.nsc_output_dir}" /> </target> </project> |