-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.xml
123 lines (106 loc) · 3.88 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
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="dk.brics.automaton" default="all" basedir=".">
<property name="project" value="automaton" />
<property name="version" value="1.11" />
<property name="release" value="6" />
<property name="optimize" value="on" />
<property name="debug" value="off" />
<property name="public" value="${user.home}/public_html/${project}"/>
<target name="all" depends="test,jar,doc" />
<path id="test.compile.classpath">
<pathelement location="build"/>
<fileset dir="lib">
<include name="**/*.jar"/>
</fileset>
</path>
<path id="test.runtime.classpath">
<pathelement location="buildtest"/>
<path refid="test.compile.classpath"/>
</path>
<target name="compile">
<mkdir dir="build" />
<javac srcdir="src" destdir="build" source="1.5" target="1.5" optimize="${optimize}" debug="${debug}" includeantruntime="false"/>
<mkdir dir="buildtest" />
<javac srcdir="test" destdir="buildtest" source="1.5" target="1.5" optimize="${optimize}" debug="on" includeantruntime="false">
<classpath refid="test.compile.classpath"/>
</javac>
</target>
<target name="jar" depends="compile,datatypes">
<mkdir dir="dist" />
<jar jarfile="dist/${project}.jar" basedir="build" includes="dk/**/*.class,*.aut" />
</target>
<target name="clean">
<delete dir="build" />
<delete dir="buildtest" />
<delete dir="doc" />
<delete dir="dist" />
</target>
<target name="test" depends="compile">
<junit forkmode="perBatch" fork="true" printsummary="yes">
<classpath refid="test.runtime.classpath"/>
<formatter usefile="false" type="plain"/>
<batchtest>
<fileset dir="test">
<include name="**/*Test*.java"/>
</fileset>
</batchtest>
</junit>
</target>
<dependset>
<srcfilelist dir="src/dk/brics/automaton" files="Datatypes.java"/>
<srcfilelist dir="src" files="Unicode.txt"/>
<targetfileset dir="build" includes="*.aut"/>
</dependset>
<target name="datatypes" depends="compile">
<java classname="dk.brics.automaton.Datatypes" classpath="build">
<sysproperty key="dk.brics.automaton.datatypes" value="build"/>
</java>
</target>
<target name="tgz" depends="clean,all">
<property name="dir" value="${project}-${version}" />
<mkdir dir="${dir}" />
<copy todir="${dir}">
<fileset dir="." includes="README,COPYING,INSTALL,ChangeLog,Makefile,build.xml" />
</copy>
<copy file="dist/${project}.jar" todir="${dir}/dist" />
<mkdir dir="${dir}/doc" />
<copy todir="${dir}/doc">
<fileset dir="doc" />
</copy>
<mkdir dir="${dir}/src" />
<copy todir="${dir}/src">
<fileset dir="src" includes="dk/brics/automaton/*.*,*.txt" excludes="**/*.class" />
</copy>
<tar tarfile="${dir}-${release}.tar" basedir="." includes="${dir}/**" />
<gzip zipfile="${dir}-${release}.tar.gz" src="${dir}-${release}.tar" />
<delete file="${dir}-${release}.tar" />
<delete dir="${dir}" />
</target>
<target name="doc" depends="jar">
<mkdir dir="doc" />
<javadoc packagenames="dk.brics.automaton"
sourcepath="src"
destdir="doc"
nodeprecated="true"
author="true"
notree="true"
nohelp="true"
windowtitle="dk.brics.automaton">
<doctitle><![CDATA[dk.brics.automaton<br>API Specification]]></doctitle>
<bottom><![CDATA[<i> Copyright © 2001-2011 Anders Møller. </i>]]></bottom>
<link href="http://java.sun.com/j2se/1.5/docs/api" />
</javadoc>
</target>
<target name="publish" depends="tgz">
<delete dir="${public}/doc" />
<mkdir dir="${public}/doc" />
<copy todir="${public}/doc">
<fileset dir="doc" />
</copy>
<copy file="dist/${project}.jar" todir="${public}" />
<copy file="${project}-${version}-${release}.tar.gz" todir="${public}" />
<copy file="ChangeLog" todir="${public}" />
<chmod dir="${public}" perm="go+r" includes="doc/**,doc,${project}.jar,*.tar.gz,ChangeLog" type="both" />
<chmod dir="${public}" perm="go+x" includes="doc/**,doc" type="dir" />
</target>
</project>