File: build-unix.xml

package info (click to toggle)
sleuthkit 4.1.3-3~bpo70%2B1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy-backports
  • size: 36,800 kB
  • sloc: ansic: 147,143; sh: 40,085; cpp: 36,823; java: 6,886; makefile: 1,248; xml: 529; python: 409; perl: 59; sed: 16
file content (93 lines) | stat: -rw-r--r-- 4,124 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<?xml version="1.0" encoding="windows-1252"?>
<project name="TSKTestTargets">
	<target name="test" 
			description="Performs regression tests."
			depends="compile-test, copyTSKLibs">
		<junit fork="on" haltonfailure="yes" dir=".">
			<sysproperty key="rslt" value="${test-results}"/>
			<sysproperty key="gold" value="${test-standards}"/>
			<sysproperty key="inpt" value="${test-input}"/>
			<classpath refid="libraries" />
			<formatter type="plain" usefile="false" />
			<test name="org.sleuthkit.datamodel.DataModelTestSuite" />
		</junit>
	</target>

	<target name="test-rebuild"
			description="Rebuilds regression tests."
			depends="compile-test, copyTSKLibs">
		<java classname="org.sleuthkit.datamodel.DataModelTestSuite" classpathref="libraries"	fork="true" failonerror="true">
			<sysproperty key="gold" value="${test-standards}"/>
			<sysproperty key="inpt" value="${test-input}"/>
			<sysproperty key="types" value="${test-types}"/>
		</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"/>
        <available file="./jni/.libs/libtsk_jni.dylib" property="tsk_dylib.present"/>
        <available file="./jni/.libs/libtsk_jni.so" property="tsk_so.present"/>
		<available file="./jni/.libs/libtsk_jni.a" property="present"/>
		<fail unless="present" message="Run make install on The Sleuthkit."/>
    </target>

    <!-- 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" overwrite="true"/>
    </target>
	
	<target name="copyMacLibs" depends="testTSKLibs" if="tsk_dylib.present">
        <property environment="env"/>
		<property name="jni.dylib" location="${basedir}/jni/.libs/libtsk_jni.dylib" />
		<property name="jni.jnilib" value="libtsk_jni.jnilib" />
		<!-- x86_64 -->
        <copy file="${jni.dylib}" tofile="${x86_64}/mac/${jni.jnilib}" overwrite="true"/>
		<!-- amd64 -->
		<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" 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" overwrite="true"/>
		<!-- amd64 -->
		<copy file="${jni.so}" tofile="${amd64}/linux/libtsk_jni.so" overwrite="true"/>
		<!-- x86 -->
		<copy file="${jni.so}" tofile="${x86}/linux/libtsk_jni.so" overwrite="true"/>
		<!-- i386 -->
		<copy file="${jni.so}" tofile="${i386}/linux/libtsk_jni.so" overwrite="true"/>
		<!-- i586 -->
		<copy file="${jni.so}" tofile="${i586}/linux/libtsk_jni.so" overwrite="true"/>
		<!-- i686 -->
		<copy file="${jni.so}" tofile="${i686}/linux/libtsk_jni.so" overwrite="true"/>
	</target>

	<target name="copyLibs" depends="copyLinuxLibs,copyMacLibs" />
	
	<target name="copyLibsDebug" depends="copyLibs" />
	
    <target name="copyTSKLibs" depends="copyTskLibs_so,copyTskLibs_dylib">
        <!-- depends targets take care of the actual copying since the file differs on OS X and Linux -->
        <!-- This assumes that TSK, libewf, and zlib have been installed on the system and those libraries will be with normal loading approaches -->
    </target>
</project>