aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build.xml13
1 files changed, 12 insertions, 1 deletions
diff --git a/build.xml b/build.xml
index 67a30f42df..0d28262dd1 100644
--- a/build.xml
+++ b/build.xml
@@ -1388,7 +1388,17 @@ under the License.
</copy-->
</target>
- <target name="compile-version" depends="init"
+ <target name="-version-java-check">
+ <!-- recompile Version.java from the template whenever source or the version in build.xml changes -->
+ <uptodate property="version.java.notRequired" targetfile="${main.output.dir}/org/apache/poi/Version.class">
+ <srcfiles file="src/resources/version/Version.java.template"/>
+ <srcfiles file="build.xml"/>
+ </uptodate>
+ </target>
+
+ <target name="compile-version"
+ unless="version.java.notRequired"
+ depends="init, -version-java-check"
description="Compiles the version class">
<!-- Generate the .java file -->
<property name="version.java" value="${main.output.dir}/org/apache/poi/Version.java"/>
@@ -1408,6 +1418,7 @@ under the License.
srcdir="${main.output.dir}"
encoding="${java.source.encoding}" includeantruntime="false">
</javac>
+
<!-- Tidy up -->
<delete file="${version.java}"/>
</target>