-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
139 lines (112 loc) · 4.61 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<project name="ana-mp" default="all" basedir=".">
<description>
ana-mp
</description>
<!--
Uncomment these to build experimental gui code and the audiodiff utility
<property name="enable.gui" value=""/>
<property name="enable.audiodiff" value=""/>
-->
<property name="version" value="0.9.7.5"/>
<property name="src" location="${basedir}/src/java"/>
<property name="bin" location="${basedir}/bin"/>
<property name="doc" location="${basedir}/doc/"/>
<property name="jdoc" location="${doc}/javadoc"/>
<property name="build" location="${basedir}/build"/>
<property name="jarName" value="ana-mp-${version}.jar"/>
<property name="manifest" location="${src}/../jar/MANIFEST.txt"/>
<property name="distFile.gz" location="ana-mp-${version}.tar.gz"/>
<property name="distFile.bz2" location="ana-mp-${version}.tar.bz2"/>
<property name="distFile.zip" location="ana-mp-${version}.zip"/>
<target name="all" depends="clean, init, dist"/>
<!-- initialization-->
<target name="init">
</target>
<!-- create distribution -->
<target name="dist" depends="init, jar, jdoc">
<mkdir dir="${build}/ana-mp-${version}"/>
<copy todir="${build}/ana-mp-${version}">
<fileset dir=".">
<include name="**/*"/>
<exclude name="build/**"/>
<exclude name="classes/**"/>
<exclude name="**/gui/**" unless="enable.gui"/>
<exclude name="**/skin/**" unless="enable.gui"/>
<exclude name="**/audiodiff/**" unless="enable.audiodiff"/>
</fileset>
</copy>
<tar destfile="${distFile.gz}" compression="gzip">
<tarfileset dir="${build}">
<include name="ana-mp-${version}/**"/>
<exclude name="ana-mp-${version}/.*"/>
</tarfileset>
</tar>
<tar destfile="${distFile.bz2}" compression="bzip2">
<tarfileset dir="${build}">
<include name="ana-mp-${version}/**"/>
<exclude name="ana-mp-${version}/.*"/>
</tarfileset>
</tar>
<zip destfile="${distFile.zip}">
<zipfileset dir="${build}">
<include name="ana-mp-${version}/**"/>
<exclude name="ana-mp-${version}/.*"/>
</zipfileset>
</zip>
</target>
<!-- used by the jar target to copy gui skin data -->
<target name="copy-skins" if="enable.gui">
<copy todir="${build}">
<fileset dir=".">
<include name="data/**"/>
</fileset>
</copy>
</target>
<!-- used by the jar target to remove gui code -->
<target name="delete-gui" unless="enable.gui">
<delete includeemptydirs="yes" failonerror="no">
<fileset dir="${build}" includes="**/gui/**"/>
</delete>
</target>
<!-- used by the jar target to remove the audiodiff util -->
<target name="delete-audiodiff" unless="enable.audiodiff">
<delete includeemptydirs="yes" failonerror="no">
<fileset dir="${build}" includes="**/audiodiff/**"/>
</delete>
</target>
<!-- jaring -->
<target name="jar" depends="init, compile, copy-skins, delete-gui, delete-audiodiff">
<jar destfile="${build}/${jarName}" basedir="${build}" manifest="${manifest}">
<fileset dir="${build}">
<include name="${build}/anakata/**"/>
<include name="${build}/data/**"/>
</fileset>
</jar>
<mkdir dir="${bin}"/>
<copy file="${build}/${jarName}" todir="${bin}"/>
</target>
<!-- compiling -->
<target name="compile" depends="init">
<mkdir dir="${build}"/>
<javac srcdir="${src}" destdir="${build}" debug="on"/>
</target>
<!-- javaDoc -->
<target name="jdoc" depends="init">
<javadoc classpath="${bin}/${jarName}" destdir="${jdoc}">
<packageset dir="${src}">
<include name="**/*" />
</packageset>
</javadoc>
</target>
<!-- cleanup -->
<target name="clean" depends="init">
<delete file="${distFile.gz}"/>
<delete file="${distFile.bz2}"/>
<delete file="${distFile.zip}"/>
<delete includeemptydirs="yes" failonerror="no">
<fileset dir="${build}" includes="**" />
<fileset dir="${bin}" includes="**"/>
<fileset dir="${jdoc}" includes="**"/>
</delete>
</target>
</project>