-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.xml
52 lines (42 loc) · 1.78 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
<project name="java-posix-spawn" default="package-all" basedir=".">
<property name="app.name" value="java-posix-spawn"/>
<property name="app.path" value="."/>
<property name="build.path" value="${app.path}/build"/>
<property name="target.path" value="${app.path}/target"/>
<property name="doc.path" value="${app.path}/docs"/>
<property name="c.source.path" value="${app.path}/src/c"/>
<property name="make.path" value="/usr/bin/make"/>
<property name="debug" value="on"/>
<target name="clean">
<delete dir="${build.path}"/>
<delete dir="${target.path}"/>
<exec dir="${app.path}" executable="${make.path}">
<arg value="clean"/>
</exec>
</target>
<target name="prepare">
<mkdir dir="${target.path}"/>
<mkdir dir="${build.path}"/>
</target>
<target name="docs">
<javadoc sourcepath="${app.path}/src/java"
destdir="${doc.path}"
maxmemory="200m" />
</target>
<target name="compile-spawn" depends="prepare">
<javac srcdir="${app.path}/src/java/net" destdir="${build.path}/" debug="${debug}" />
</target>
<target name="compile-shared" depends="prepare">
<exec dir="${app.path}" executable="/usr/bin/make" failonerror="true" />
</target>
<target name="compile" depends="compile-spawn,compile-shared"/>
<target name="package-spawn">
<jar destfile="${target.path}/jlinuxfork.jar"
basedir="${build.path}"
includes="net/**" />
<copy file="${c.source.path}/libjlinuxfork.so" tofile="${target.path}/libjlinuxfork-${os.arch}.so"/>
<copy file="${c.source.path}/binrunner" tofile="${target.path}/binrunner"/>
<chmod perm="0755" file="${target.path}/binrunner"/>
</target>
<target name="package-all" depends="compile,package-spawn"/>
</project>