diff --git a/bindings/java/build.xml b/bindings/java/build.xml index c7d929afb911b0cb58386d0b085790369cf5e69e..30b53e0f98a2c15e69ee001bbaa91e6170ee1dd5 100755 --- a/bindings/java/build.xml +++ b/bindings/java/build.xml @@ -146,7 +146,7 @@ <jar jarfile="${dist}/sleuthkit-${VERSION}.jar" basedir="${build}"/> </target> - <target name="dist-PostgreSQL" depends="check-build, init-ivy, compile, copyLibs-PostgreSQL" description="generate the PostgreSQL distribution"> + <target name="dist-PostgreSQL" depends="check-postgresql-build, init-ivy, compile, copyLibs-PostgreSQL" unless="postgres-up-to-date" description="generate the PostgreSQL distribution"> <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file --> <jar jarfile="${dist}/sleuthkit-postgresql-${VERSION}.jar" basedir="${build}"/> </target> @@ -162,6 +162,18 @@ </and> </condition> </target> + + <target name="check-postgresql-build" depends="check-native-build"> + <uptodate property="java-postgres-up-to-date" targetfile="${dist}/sleuthkit-postgresql-${VERSION}.jar"> + <srcfiles dir="${src}" includes="**/*.java"/> + </uptodate> + <condition property="postgres-up-to-date"> + <and> + <isset property="java-postgres-up-to-date"/> + <isset property="native-up-to-date"/> + </and> + </condition> + </target> <target name="dist" depends="check-build" unless="up-to-date"> <antcall target="dist-SQLite"/> @@ -176,7 +188,7 @@ <jar jarfile="${dist}/sleuthkit-${VERSION}.jar" basedir="${build}"/> </target> - <target name="Debug-PostgreSQL" depends="init-ivy, compile, copyLibs-PostgreSQLDebug" description="generate the PostgreSQL debug distribution"> + <target name="Debug-PostgreSQL" depends="check-postgresql-build, init-ivy, compile, copyLibs-PostgreSQLDebug" unless="postgres-up-to-date" description="generate the PostgreSQL debug distribution"> <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file --> <jar jarfile="${dist}/sleuthkit-postgresql-${VERSION}.jar" basedir="${build}"/> </target>