summaryrefslogtreecommitdiff
path: root/build.xml
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2013-03-25 23:44:33 -0700
committerAdriaan Moors <adriaan.moors@typesafe.com>2013-03-26 00:23:37 -0700
commitac1a0f02de90688b011454e552cecc7805d88f4e (patch)
tree44a68fcca0a9799183ca46edf78f8aca7d71d5eb /build.xml
parentd85c3f18796f81ea93772302b91d0ee6b53e765f (diff)
downloadscala-ac1a0f02de90688b011454e552cecc7805d88f4e.tar.gz
scala-ac1a0f02de90688b011454e552cecc7805d88f4e.tar.bz2
scala-ac1a0f02de90688b011454e552cecc7805d88f4e.zip
Remove duplication in java builds of fjbg/asm/forkjoin
Diffstat (limited to 'build.xml')
-rw-r--r--build.xml97
1 files changed, 31 insertions, 66 deletions
diff --git a/build.xml b/build.xml
index 41c256f4ad..ae59602962 100644
--- a/build.xml
+++ b/build.xml
@@ -663,74 +663,39 @@ targets exercised:
</macrodef>
<!-- ===========================================================================
- LOCAL DEPENDENCY (FJBG)
+ LOCAL DEPENDENCIES
============================================================================ -->
- <target name="fjbg.done" depends="init">
- <uptodate property="fjbg.available" targetfile="${build-libs.dir}/fjbg.complete">
- <srcfiles dir="${src.dir}/forkjoin"/></uptodate>
- <if><not><isset property="fjbg.available"/></not><then>
- <stopwatch name="fjbg.lib.timer"/>
- <mkdir dir="${build-libs.dir}/classes/fjbg"/>
- <javac
- srcdir="${src.dir}/fjbg"
- destdir="${build-libs.dir}/classes/fjbg"
- classpath="${build-libs.dir}/classes/fjbg"
- includes="**/*.java"
- target="1.6" source="1.5">
- <compilerarg line="${javac.args}"/>
- </javac>
- <jar whenmanifestonly="fail" destfile="${build-libs.dir}/fjbg.jar" basedir="${build-libs.dir}/classes/fjbg"/>
- <stopwatch name="fjbg.lib.timer" action="total"/>
- <touch file="${build-libs.dir}/fjbg.complete" verbose="no"/>
- </then></if>
- </target>
-
-<!-- ===========================================================================
- LOCAL DEPENDENCY (Adapted ASM)
-============================================================================ -->
- <target name="asm.done" depends="init">
- <available file="${build-asm.dir}/asm.complete" property="asm.available"/>
- <if><not><isset property="asm.available"/></not><then>
- <stopwatch name="asm.lib.timer"/>
- <mkdir dir="${build-asm.dir}/classes/"/>
- <javac
- srcdir="${src.dir}/asm"
- destdir="${build-asm.dir}/classes"
- classpath="${build-asm.dir}/classes"
- includes="**/*.java"
- target="1.6" source="1.5">
- <compilerarg line="${javac.args} -XDignore.symbol.file"/>
- </javac>
- <stopwatch name="asm.lib.timer" action="total"/>
- <touch file="${build-asm.dir}/asm.complete" verbose="no"/>
- </then></if>
- </target>
+ <macrodef name="simple-javac" >
+ <attribute name="project"/> <!-- project: fjbg/asm/forkjoin -->
+ <attribute name="args" default=""/>
+ <attribute name="jar" default="yes"/>
+ <sequential>
+ <uptodate property="@{project}.available" targetfile="${build-libs.dir}/@{project}.complete">
+ <srcfiles dir="${src.dir}/@{project}"/></uptodate>
+ <if><not><isset property="@{project}.available"/></not><then>
+ <stopwatch name="@{project}.timer"/>
+ <mkdir dir="${@{project}-classes}"/>
+ <javac
+ srcdir="${src.dir}/@{project}"
+ destdir="${@{project}-classes}"
+ classpath="${@{project}-classes}"
+ includes="**/*.java"
+ target="1.6" source="1.5"
+ compiler="javac1.6">
+ <compilerarg line="${javac.args} @{args}"/>
+ </javac>
+ <if><equals arg1="@{jar}" arg2="yes"/><then>
+ <jar whenmanifestonly="fail" destfile="${build-libs.dir}/@{project}.jar" basedir="${@{project}-classes}"/></then></if>
+ <stopwatch name="@{project}.timer" action="total"/>
+ <mkdir dir="${build-libs.dir}"/>
+ <touch file="${build-libs.dir}/@{project}.complete" verbose="no"/>
+ </then></if>
+ </sequential>
+ </macrodef>
-<!-- ===========================================================================
- LOCAL DEPENDENCY (FORKJOIN)
-============================================================================ -->
- <target name="forkjoin.done" depends="init">
- <uptodate property="forkjoin.available" targetfile="${build-libs.dir}/forkjoin.complete">
- <srcfiles dir="${src.dir}/forkjoin"/></uptodate>
- <if><not><isset property="forkjoin.available"/></not><then>
- <stopwatch name="forkjoin.lib.timer"/>
- <mkdir dir="${build-libs.dir}/classes/forkjoin"/>
- <javac
- fork="yes"
- compiler="javac1.6"
- srcdir="${src.dir}/forkjoin"
- destdir="${build-libs.dir}/classes/forkjoin"
- classpath="${build-libs.dir}/classes/forkjoin"
- includes="**/*.java"
- debug="true"
- target="1.6" source="1.5">
- <compilerarg line="${javac.args} -XDignore.symbol.file"/>
- </javac>
- <jar whenmanifestonly="fail" destfile="${build-libs.dir}/forkjoin.jar" basedir="${build-libs.dir}/classes/forkjoin"/>
- <stopwatch name="forkjoin.lib.timer" action="total"/>
- <touch file="${build-libs.dir}/forkjoin.complete" verbose="no"/>
- </then></if>
- </target>
+ <target name="asm.done" depends="init"> <simple-javac project="asm" jar="no"/> </target>
+ <target name="fjbg.done" depends="init"> <simple-javac project="fjbg"/> </target>
+ <target name="forkjoin.done" depends="init"> <simple-javac project="forkjoin" args="-XDignore.symbol.file"/></target>
<!-- ===========================================================================
STAGED COMPILATION MACROS