-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathbuild.xml
49 lines (41 loc) · 1.7 KB
/
build.xml
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
<?xml version="1.0" ?>
<project name="jnmatlib" default="jarfile">
<property name="src" value="src" />
<property name="build" value="build" />
<property name="doc" value="doc" />
<property name="dist" value="dist" />
<property name="classpath" value="lib/jna.jar" />
<property name="ant.build.javac.source" value="1.5" />
<property name="ant.build.javac.target" value="1.5" />
<target name="classes">
<javac srcdir="${src}" destdir="${build}" classpath="${classpath}" />
<delete><fileset dir="test" includes="*.class" /></delete>
</target>
<target name="javadoc">
<javadoc destdir="${doc}" classpath="lib/jna.jar">
<fileset dir="${src}"><include name="**/*.java" /></fileset>
<link href="https://jna.dev.java.net/nonav/javadoc" />
<link href="http://java.sun.com/javase/6/docs/api" />
</javadoc>
</target>
<target name="jarfile" depends="classes">
<mkdir dir="${dist}" />
<jar jarfile="${dist}/${ant.project.name}.jar" basedir="${build}" />
</target>
<target name="classes.test"><!-- depends="classes">-->
<javac srcdir="test" destdir="test" classpath="${classpath}:lib/junit.jar:${dist}/${ant.project.name}.jar" />
</target>
<target name="test" depends="classes.test"><!-- depends="classes">-->
<junit fork="yes" dir="test">
<classpath>
<pathelement path="${classpath}" />
<pathelement location="${dist}/${ant.project.name}.jar" />
<pathelement location="lib/junit.jar" />
<pathelement location="test" />
</classpath>
<formatter type="plain" usefile="false" />
<env key="DYLD_LIBRARY_PATH" value="${basedir}/lib/maci64" />
<test name="JNMatLibTest" />
</junit>
</target>
</project>