-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
60 lines (55 loc) · 2.44 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
50
51
52
53
54
55
56
57
58
59
60
<?xml version="1.0" encoding="UTF-8"?>
<project name="jposix-0.1" basedir="." default="release">
<property name="dir:build" location="build" />
<property name="dir:jdk" value="/opt/jdk1.6.0_10" />
<property name="dir:classes" location="${dir:build}/classes" />
<property name="dir:classes-g" location="${dir:build}/classes-g" />
<property name="dir:test-classes" location="${dir:build}/test-classes" />
<property name="dir:src:java" location="src/java" />
<property name="dir:src:java-tests" location="src/java-tests" />
<property name="dir:src:c" location="src/c" />
<property name="file:junit" location="/usr/share/java/junit4.jar" />
<property name="file:jar" location="${dir:build}/jposix-0.1.jar" />
<property name="file:jar-g" location="${dir:build}/jposix-0.1-g.jar" />
<target name="release" depends="jar" />
<target name="jar" depends="run-tests,compile-java">
<mkdir dir="${dir:build}" />
<jar destfile="${file:jar}" basedir="${dir:classes}" />
<jar destfile="${file:jar-g}" basedir="${dir:classes-g}" />
</target>
<target name="compile-java">
<mkdir dir="${dir:classes}" />
<mkdir dir="${dir:classes-g}" />
<javac srcdir="${dir:src:java}" destdir="${dir:classes}" debug="off"
source="1.5" target="1.5" verbose="on" fork="yes">
<include name="**/*.java" />
</javac>
<javac srcdir="${dir:src:java}" destdir="${dir:classes-g}" debug="on"
source="1.5" target="1.5" verbose="on" fork="yes">
<include name="**/*.java" />
</javac>
</target>
<target name="compile-tests" depends="compile-java">
<mkdir dir="${dir:test-classes}" />
<javac srcdir="${dir:src:java-tests}" destdir="${dir:test-classes}"
debug="on" source="1.5" target="1.5" verbose="on" fork="yes">
<include name="**/*.java" />
<classpath>
<pathelement path="${dir:classes-g}" />
<pathelement path="${file:junit}" />
</classpath>
</javac>
</target>
<target name="run-tests" depends="compile-tests">
<junit fork="on" forkmode="once" haltonfailure="on" printsummary="withOutAndErr">
<classpath>
<pathelement path="${dir:classes-g}" />
<pathelement path="${file:junit}" />
<pathelement path="${dir:test-classes}" />
</classpath>
<formatter type="plain" usefile="false" />
<sysproperty key="java.library.path" value="${dir:build}" />
<test name="jposix.test.TestPosix" />
</junit>
</target>
</project>