forked from cs-au-dk/dk.brics.automaton
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
95 lines (81 loc) · 3.13 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
<?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.12" />
<property name="release" value="2" />
<property name="optimize" value="on" />
<property name="debug" value="off" />
<property name="public" value="${user.home}/public_html/${project}"/>
<target name="all" depends="jar,doc" />
<target name="compile">
<mkdir dir="antbuild" />
<javac srcdir="src" destdir="antbuild" source="1.6" target="1.6" optimize="${optimize}" debug="${debug}" includeantruntime="false" />
</target>
<target name="jar" depends="compile,datatypes">
<mkdir dir="dist" />
<jar jarfile="dist/${project}.jar" basedir="antbuild" includes="dk/**/*.class,*.aut" />
</target>
<target name="clean">
<delete dir="antbuild" />
<delete dir="doc" />
<delete dir="dist" />
</target>
<dependset>
<srcfilelist dir="src/dk/brics/automaton" files="Datatypes.java"/>
<srcfilelist dir="src" files="Unicode.txt"/>
<targetfileset dir="antbuild" includes="*.aut"/>
</dependset>
<target name="datatypes" depends="compile">
<java classname="dk.brics.automaton.Datatypes" classpath="antbuild">
<sysproperty key="dk.brics.automaton.datatypes" value="antbuild"/>
</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"
additionalparam="-Xdoclint:none">
<doctitle><![CDATA[dk.brics.automaton<br>API Specification]]></doctitle>
<bottom><![CDATA[<i> Copyright © 2001-2017 Anders Møller. </i>]]></bottom>
<link href="http://download.oracle.com/javase/1.5.0/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>