summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-04-13 14:52:06 +0200
committerSven Gothel <[email protected]>2010-04-13 14:52:06 +0200
commitdb69db1df249c69c996a35e565595e0d8d2d7856 (patch)
tree21607415b1a5c3cdef6ceb1eacc75ef382542e07
parent4b6abbebf1e67642620a2643376f3db6a035a78c (diff)
Added Uptodate verification to build only when necessary
-rw-r--r--make/build-junit.xml22
-rwxr-xr-xmake/build.xml18
2 files changed, 33 insertions, 7 deletions
diff --git a/make/build-junit.xml b/make/build-junit.xml
index e401128..da5fb53 100644
--- a/make/build-junit.xml
+++ b/make/build-junit.xml
@@ -48,13 +48,13 @@
<mkdir dir="${build_t.obj}"/>
<mkdir dir="${build_t.lib}"/>
- <property name="gluegen.jar" value="${gluegen.root}/${rootrel.build}/gluegen.jar" />
- <property name="gluegen-rt.jar" value="${gluegen.root}/${rootrel.build}/gluegen-rt.jar" />
+ <property name="gluegen.jar" location="${gluegen.root}/${rootrel.build}/gluegen.jar" />
+ <property name="gluegen-rt.jar" location="${gluegen.root}/${rootrel.build}/gluegen-rt.jar" />
<property name="gluegen.lib" value="${gluegen.root}/${rootrel.build}/obj" />
<property name="junit.jar" value="${gluegen.root}/make/lib/junit-4.5.jar" />
- <property name="gluegen-test.jar" value="${build_t}/gluegen-test.jar" />
+ <property name="gluegen-test.jar" location="${build_t}/gluegen-test.jar" />
<path id="gluegen.classpath">
<pathelement location="${gluegen.jar}" />
@@ -174,7 +174,21 @@
</sequential>
</macrodef>
- <target name="junit.compile" depends="init, java.generate, java.build, native.build"/>
+ <target name="junit.compile" depends="init">
+ <uptodate property="junit.compile.skip">
+ <srcfiles dir= "." includes="*.xml"/>
+ <srcfiles dir= "${test.base.dir}" includes="**"/>
+ <srcfiles file="${gluegen.jar}" />
+ <mapper type="merge" to="${gluegen-test.jar}"/>
+ </uptodate>
+ <antcall target="junit.compile.impl" inheritRefs="true"/>
+ </target>
+
+ <target name="junit.compile.impl" unless="junit.compile.skip">
+ <antcall target="java.generate" inheritRefs="true"/>
+ <antcall target="java.build" inheritRefs="true"/>
+ <antcall target="native.build" inheritRefs="true"/>
+ </target>
<target name="junit.run" depends="init,gluegen.cpptasks.detect.os">
<mkdir dir="${results}"/>
diff --git a/make/build.xml b/make/build.xml
index f90cd81..3284d19 100755
--- a/make/build.xml
+++ b/make/build.xml
@@ -41,7 +41,7 @@
<!-- The source directories. -->
<property name="src.java" value="../src/java" />
- <property name="build" value="../${rootrel.build}" />
+ <property name="build" location="../${rootrel.build}" />
<property name="gluegen.lib.dir" value="${build}/obj"/>
@@ -456,8 +456,20 @@
</copy>
</target>
+ <target name="gluegen.build" depends="init">
+ <uptodate property="gluegen.build.skip">
+ <srcfiles dir= "." includes="*.xml"/>
+ <srcfiles dir= "${src.java}" includes="**"/>
+ <srcfiles dir= "${c.grammar}" includes="**/*.g"/>
+ <srcfiles dir= "${j.grammar}" includes="**/*.g"/>
+ <mapper type="merge" to="${build}/gluegen.jar"/>
+ </uptodate>
+ <antcall target="gluegen.build.impl" inheritRefs="true"/>
+ </target>
+
+ <target name="gluegen.build.impl" unless="gluegen.build.skip">
+ <antcall target="pre-build" inheritRefs="true"/>
- <target name="gluegen.build" depends="init, pre-build">
<!-- Because ANTLR looks for importVocab files in the current
working directory, it likes to have all of its files,
including supergrammars, in one place, so copy all of the
@@ -594,7 +606,7 @@
<copy file="${antlr.jar}" todir="${build}" />
</target>
- <target name="all" depends="gluegen.build, junit.compile" />
+ <target name="all" depends="init, gluegen.build, junit.compile" />
<target name="clean" depends="init">
<delete includeEmptyDirs="true">