Skip to content
Snippets Groups Projects
Commit 2098a093 authored by Jeff Wallace's avatar Jeff Wallace
Browse files

rebuild tsk datamodel jar file if necessary.

Conflicts:
	bindings/java/build-unix.xml
parent 6a76ed3e
No related branches found
No related tags found
No related merge requests found
......@@ -17,9 +17,10 @@ tsk_jar = $(top_builddir)/bindings/java/dist/Tsk_DataModel.jar
jardir = $(prefix)/share/java
jar_DATA = $(tsk_jar)
$(tsk_jar):
$(tsk_jar):
ant dist $(ANT_PROPS)
all-local:
ant dist $(ANT_PROPS) -Dcalled.from=all-local
CLEANFILES = $(tsk_jar)
......
......@@ -23,6 +23,17 @@
</java>
</target>
<target name="check-native-build" depends="check-native-build-mac,check-native-build-unix"/>
<target name="check-native-build-mac" depends="testTSKLibs" if="tsk_dylib.present">
<uptodate property="native-up-to-date" srcfile="./jni/.libs/libtsk_jni.dylib"
targetfile="${amd64}/mac/libtsk_jni.jnilib" />
</target>
<target name="check-native-build-unix" depends="testTSKLibs" if="tsk_so.present">
<uptodate property="native-up-to-date" srcfile="./jni/.libs/libtsk_jni.so"
targetfile="${amd64}/linux/libtsk_jni.so"/>
</target>
<target name="testTSKLibs">
<property environment="env"/>
......@@ -35,7 +46,7 @@
<!-- OS X -->
<target name="copyTskLibs_dylib" depends="testTSKLibs" if="tsk_dylib.present">
<property environment="env"/>
<copy file="./jni/.libs/libtsk_jni.dylib" tofile="./libtsk_jni.jnilib"/>
<copy file="./jni/.libs/libtsk_jni.dylib" tofile="./libtsk_jni.jnilib" overwrite="true"/>
</target>
<target name="copyMacLibs" depends="testTSKLibs" if="tsk_dylib.present">
......@@ -45,30 +56,30 @@
<!-- x86_64 -->
<copy file="${jni.dylib}" tofile="${x86_64}/mac/${jni.jnilib}"/>
<!-- amd64 -->
<copy file="${jni.dylib}" tofile="${amd64}/mac/${jni.jnilib}"/>
<copy file="${jni.dylib}" tofile="${amd64}/mac/${jni.jnilib}" overwrite="true"/>
</target>
<!-- Non-OS X -->
<target name="copyTskLibs_so" depends="testTSKLibs" if="tsk_so.present">
<property environment="env"/>
<copy file="./jni/.libs/libtsk_jni.so" tofile="./libtsk_jni.so"/>
<copy file="./jni/.libs/libtsk_jni.so" tofile="./libtsk_jni.so" overwrite="true"/>
</target>
<target name="copyLinuxLibs" depends="testTSKLibs" if="tsk_so.present">
<property environment="env"/>
<property name="jni.so" location="${basedir}/jni/.libs/libtsk_jni.so" />
<!-- x86_64 -->
<copy file="${jni.so}" tofile="${x86_64}/linux/libtsk_jni.so"/>
<copy file="${jni.so}" tofile="${x86_64}/linux/libtsk_jni.so" overwrite="true"/>
<!-- amd64 -->
<copy file="${jni.so}" tofile="${amd64}/linux/libtsk_jni.so"/>
<copy file="${jni.so}" tofile="${amd64}/linux/libtsk_jni.so" overwrite="true"/>
<!-- x86 -->
<copy file="${jni.so}" tofile="${x86}/linux/libtsk_jni.so"/>
<copy file="${jni.so}" tofile="${x86}/linux/libtsk_jni.so" overwrite="true"/>
<!-- i386 -->
<copy file="${jni.so}" tofile="${i386}/linux/libtsk_jni.so"/>
<copy file="${jni.so}" tofile="${i386}/linux/libtsk_jni.so" overwrite="true"/>
<!-- i586 -->
<copy file="${jni.so}" tofile="${i586}/linux/libtsk_jni.so"/>
<copy file="${jni.so}" tofile="${i586}/linux/libtsk_jni.so" overwrite="true"/>
<!-- i686 -->
<copy file="${jni.so}" tofile="${i686}/linux/libtsk_jni.so"/>
<copy file="${jni.so}" tofile="${i686}/linux/libtsk_jni.so" overwrite="true"/>
</target>
<target name="copyLibs" depends="copyLinuxLibs,copyMacLibs" />
......
......@@ -33,7 +33,20 @@
<sysproperty key="types" value="${test-types}"/>
</java>
</target>
<target name="check-build-native" depends="check-build-32,check-build-64"/>
<target name="check-build-32" depends="checkLibDirs" if="win32.exists">
<uptodate property="native-up-to-date" srcfile="${basedir}/../../win32/Release/libtsk_jni.dll"
targetfile="${x86}/win/libtsk_jni.dll"/>
</target>
<target name="check-build-64" depends="checkLibDirs" if="win32.exists">
<uptodate property="native-up-to-date" srcfile="${basedir}/../../win32/Release/libtsk_jni.dll"
targetfile="${amd64}/win/libtsk_jni.dll"/>
</target>
<target name="copyLibs" depends="copyWinLibs" description="Copy native libs to the correct folder">
<property name="tsk.config" value="Release"/>
<antcall target="copyWinLibs" />
......
......@@ -115,7 +115,23 @@ pattern="lib/[artifact]-[revision](-[classifier]).[ext]" />
</javac>
</target>
<target name="dist" depends="init-ivy, compile, copyLibs"
<target name="dist" depends="check-build" unless="up-to-date">
<antcall target="dist-do"/>
</target>
<target name="check-build" depends="check-native-build">
<uptodate property="java-up-to-date" targetfile="${dist}/Tsk_DataModel.jar" >
<srcfiles dir="${src}" includes="**/*.java"/>
</uptodate>
<condition property="up-to-date">
<and>
<isset property="java-up-to-date"/>
<isset property="native-up-to-date"/>
</and>
</condition>
</target>
<target name="dist-do" depends="init-ivy, compile, copyLibs"
description="generate the distribution" >
<!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
<jar jarfile="${dist}/Tsk_DataModel.jar" basedir="${build}"/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment