diff options
author | Burak Emir <emir@epfl.ch> | 2005-06-29 10:13:02 +0000 |
---|---|---|
committer | Burak Emir <emir@epfl.ch> | 2005-06-29 10:13:02 +0000 |
commit | 35b8aa223750ca82e6bc7d3aee825ac6bcdefdf2 (patch) | |
tree | 61049e2f4fc8411f1538904cf74c2f2bd70dd876 | |
parent | a4e5d4a1d7209f290973d981897eff94b479b1f3 (diff) | |
download | scala-35b8aa223750ca82e6bc7d3aee825ac6bcdefdf2.tar.gz scala-35b8aa223750ca82e6bc7d3aee825ac6bcdefdf2.tar.bz2 scala-35b8aa223750ca82e6bc7d3aee825ac6bcdefdf2.zip |
separated the paths to properties file
-rwxr-xr-x | ant-build-nsc.sh | 28 | ||||
-rw-r--r-- | build-nsc.xml | 74 |
2 files changed, 46 insertions, 56 deletions
diff --git a/ant-build-nsc.sh b/ant-build-nsc.sh index 5ec1846dbe..b949b8f2ba 100755 --- a/ant-build-nsc.sh +++ b/ant-build-nsc.sh @@ -2,16 +2,28 @@ export ANT_OPTS=-Xmx256m -CLASSPATH=/home/linuxsoft/apps/fjbg/jars/fjbg.jar -CLASSPATH=$CLASSPATH:/home/linuxsoft/apps/jaco/lib/jaco.jar -CLASSPATH=$CLASSPATH:/home/linuxsoft/apps/fjbg/jars/fjbg.jar -CLASSPATH=$CLASSPATH:/localhome/buraq/scala/objects/main/lib/scala.jar -CLASSPATH=$CLASSPATH:/localhome/buraq/scala/objects/main/lib/tools.jar -CLASSPATH=$CLASSPATH:/home/linuxsoft/apps/jaco/lib/jaco.jar -CLASSPATH=$CLASSPATH:/tmp/hackedPico -CLASSPATH=$CLASSPATH:/tmp/jars/nsc4ant.jar:/tmp/jars/nsc.jar +awk '/^$/ {next;} /^#/ {next;} {print "export " $1 $2 $3}' build-nsc.properties > env.sh +. env.sh + +# ------- don't change these, change build-nsc.properties instead + +# jars for `scalac' task +CLASSPATH=${fjbg_jar} +CLASSPATH=$CLASSPATH:${scala_jar} +CLASSPATH=$CLASSPATH:${tools_jar} + +# jars for `pico' task including the `-scala-hacks' enableda +CLASSPATH=$CLASSPATH:${jaco_jar} +CLASSPATH=$CLASSPATH:${hacked_pico_dir} + +# jars for `nsc' task (once its compiled) +CLASSPATH=$CLASSPATH:${jars_dir}/nsc4ant.jar:${jars_dir}/nsc.jar export CLASSPATH +# for debugging your classpath + +#echo $CLASSPATH + ant -f build-nsc.xml $* diff --git a/build-nsc.xml b/build-nsc.xml index 3b0d8221ca..78c7a334c6 100644 --- a/build-nsc.xml +++ b/build-nsc.xml @@ -26,13 +26,7 @@ <!-- %%% properties and taskdefs %%%--> - <property name="hacked.pico.dir" value="/tmp/hackedPico"/> - <property name="tools.util.dir" value="/tmp/picoClasses"/> - <property name="nsc.dir" value="/tmp/nscClasses"/> - <property name="nsc4ant.dir" value="/tmp/nsc4antClasses"/> - <property name="nsc.output.dir" value="/tmp/nscOutputClasses"/> - <property name="jars.dir" value="/tmp/jars"/> - <property name="ant.jar" value="/home/linuxsoft/apps/ant/lib/ant.jar"/> + <property file="build-nsc.properties"/> <!-- taskdefs to call compilers --> @@ -43,21 +37,21 @@ <target name="build.hackedPicoTask"> - <mkdir dir="${hacked.pico.dir}"/> - <javac srcdir="newsources" destdir="${hacked.pico.dir}"> - <include name="HackedPicoTask.java"/> - <include name="HackedPicoAdaptor.java"/> + <mkdir dir="${hacked_pico_dir}"/> + <javac srcdir="newsources" destdir="${hacked_pico_dir}"> + <include name="jaco/pizza/HackedPicoTask.java"/> + <include name="jaco/pizza/HackedPicoAdaptor.java"/> </javac> </target> <!-- taskdef for nsc comes later, because has to be compiled before --> <target name="build.nsc" depends="build.hackedPicoTask"> - <mkdir dir="${tools.util.dir}"/> + <mkdir dir="${tools_util_dir}"/> <taskdef name="pico" classname="jaco.pizza.HackedPicoTask"/> - <pico srcdir="sources" destdir="${tools.util.dir}" source="1.4"> + <pico srcdir="sources" destdir="${tools_util_dir}" source="1.4"> <include name="scala/*.java"/> <include name="scala/runtime/*.java"/> <include name="scala/runtime/**/*.java"/> @@ -70,27 +64,27 @@ <!-- we do *not* want the ScalaObject.class file, because in nsc's eyes ScalaObject is a scala file. --> - <delete file="${tools.util.dir}/scala/ScalaObject.class"/> - <delete file="${tools.util.dir}/scala/Array.class"/> + <delete file="${tools_util_dir}/scala/ScalaObject.class"/> + <delete file="${tools_util_dir}/scala/Array.class"/> - <mkdir dir="${nsc.dir}"/> - <scalac srcdir="sources" destdir="${nsc.dir}" - classpath="${tools.util.dir}" sourcePath="sources" force="true"> + <mkdir dir="${nsc_dir}"/> + <scalac srcdir="sources" destdir="${nsc_dir}" + classpath="${tools_util_dir}" sourcePath="sources" force="true"> <!-- force = "true" always recompiles all source files, because scalac does not always go find the latest source file (*3) --> <include name="scala/tools/nsc/**/*.scala"/> </scalac> - <mkdir dir="${jars.dir}"/> - <jar destfile="${jars.dir}/nsc.jar" basedir="${nsc.dir}"/> + <mkdir dir="${jars_dir}"/> + <jar destfile="${jars_dir}/nsc.jar" basedir="${nsc_dir}"/> </target> <target name="clean"> - <delete dir="${tools.util.dir}"/> - <delete dir="${nsc.dir}"/> + <delete dir="${tools_util_dir}"/> + <delete dir="${nsc_dir}"/> </target> @@ -98,14 +92,14 @@ <target name="build.nsc4ant"> - <mkdir dir="${nsc4ant.dir}"/> - <scalac srcdir="sources" destdir="${nsc4ant.dir}/" sourcePath="sources" - classpath="${ant.jar}:${nsc.dir}:${tools.util.dir}:objects/main/lib/scala" > + <mkdir dir="${nsc4ant_dir}"/> + <scalac srcdir="sources" destdir="${nsc4ant_dir}/" sourcePath="sources" + classpath="${ant_jar}:${nsc_dir}:${tools_util_dir}:objects/main/lib/scala" > <include name="scala/tools/scala4ant/NscAdaptor.scala"/> <include name="scala/tools/scala4ant/NscTask.scala"/> </scalac> - <jar destfile="${jars.dir}/nsc4ant.jar" basedir="${nsc4ant.dir}"/> + <jar destfile="${jars_dir}/nsc4ant.jar" basedir="${nsc4ant_dir}"/> </target> <!-- target to define `nsc' task using NscTask$class --> @@ -130,7 +124,7 @@ <taskdef name="nsc" classname="scala.tools.scala4ant.NscTask$class"/> - <mkdir dir="${nsc.output.dir}"/> + <mkdir dir="${nsc_output_dir}"/> <!--java classname="scala.tools.nsc.Main" classpath="./objects/main/lib/scala:./objects/main/lib/tools:${jars.dir}/nsc.jar:${tools.util.dir}" > @@ -149,8 +143,8 @@ --> <echo>Compiling predef and runtime</echo> - <nsc srcdir="sources" destdir="${nsc.output.dir}" - classpath="sources:newsources:${tools.util.dir}" + <nsc srcdir="sources" destdir="${nsc_output_dir}" + classpath="sources:newsources:${tools_util_dir}" nscArgs="-nopredefs;-check:term;-check:transmatch;-debug"> <include name="scala/Predef.scala"/> @@ -158,8 +152,8 @@ </nsc> <echo>Compiling rest</echo> - <nsc srcdir="sources" destdir="${nsc.output.dir}" - classpath="sources:newsources:${tools.util.dir}:${nsc.output.dir}" + <nsc srcdir="sources" destdir="${nsc_output_dir}" + classpath="sources:newsources:${tools_util_dir}:${nsc_output_dir}" nscArgs="-check:term;-check:transmatch;-debug"> <include name="scala/**.scala"/> @@ -172,22 +166,6 @@ <exclude name="scala/io/UTF8String.scala"/> </nsc> - <!-- - <echo>Compiling rest</echo> - <nsc srcdir="sources" destdir="${nsc.output.dir}" - classpath="sources:newsources:${tools.util.dir}"> - - <include name="../sources.nsc/**/*.scala"/> - - <include name="scala/**/*.scala"/> - - <exclude name="scala/Predef.scala"/> - <exclude name="scala/runtime/ScalaRunTime.scala"/> - - <exclude name="scala/tools/**"/> - <exclude name="scala/io/UTF8String.scala"/> - </nsc> ---> </target> <!-- (*3) for Java, and pico, files are only recompiled if the source file is @@ -195,4 +173,4 @@ composition sometimes needs additional source files. These can be unavailable for some reason. --> -</project>
\ No newline at end of file +</project> |