-
Notifications
You must be signed in to change notification settings - Fork 44
/
build.xml
86 lines (74 loc) · 2.71 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
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
<?xml version="1.0"?>
<project name="jvm-compressor-benchmark" basedir="." default="compile">
<property name="dir.lib" value="${basedir}/lib"/>
<property name="dir.bin" value="${basedir}/bin"/>
<property name="dir.src.java" value="${basedir}/src/main/java"/>
<property name="dir.build" value="${basedir}/build"/>
<property name="dir.build.classes" value="${basedir}/build/classes"/>
<!-- Distribution -->
<property name="dir.dist" location="${basedir}/dist" />
<property name="VERSION" value="0.1" />
<patternset id="dist-all-source-files">
<include name="README.txt" />
<include name="build.xml" />
<include name="bin/*.sh" />
<include name="data/**" />
<include name="src/**/*.java" />
<include name="src/**/*.html" />
<include name="testcfg/**" />
</patternset>
<target name="init">
<mkdir dir="${dir.build.classes}" />
<mkdir dir="${dir.dist}" />
</target>
<target name="clean">
<delete dir="${dir.build}"/>
<delete dir="${dir.dist}"/>
</target>
<target name="compile" depends="init">
<javac srcdir="${dir.src.java}" destdir="${dir.build.classes}"
source="1.6" target="1.6" debug="true"
includeantruntime="false"
>
<classpath>
<fileset dir="${dir.lib}" includes="*/*.jar" />
</classpath>
</javac>
</target>
<target name="dist" depends="compile">
<!-- hmmh. tons of jars, let's skip for now -->
<!--
<copy todir="${dir.dist}">
<fileset dir="${dir.build}" includes="*.jar" />
</copy>
-->
<!-- Then let's create the source distribution tar packages
-->
<!-- Need to first copy to a tmp dir, to get the additional
directory (so tar/zip contents won't explode directly
in current dir)
-->
<property name="DIST_FILENAME" value="${ant.project.name}-${VERSION}" />
<property name="DIST_DIR" value="${DIST_FILENAME}" />
<!-- better always clean it up, if it exists... -->
<delete dir="${dir.build}/${DIST_DIR}" />
<mkdir dir="${dir.build}/${DIST_DIR}" />
<copy todir="${dir.build}/${DIST_DIR}">
<fileset dir="${basedir}">
<patternset refid="dist-all-source-files" />
</fileset>
</copy>
<chmod dir="${dir.build}/${DIST_DIR}/bin" perm="ugo+rx"
includes="*.sh" />
<!-- then create tarball, zip -->
<tar basedir="${dir.build}"
includes="${DIST_DIR}/**"
destfile="${dir.dist}/${DIST_FILENAME}.tar.gz"
compression="gzip"
/>
<zip basedir="${dir.build}"
includes="${DIST_DIR}/**"
destfile="${dir.dist}/${DIST_FILENAME}.zip"
/>
</target>
</project>