forked from waxeye-org/waxeye
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ant.xml
211 lines (187 loc) · 10.3 KB
/
ant.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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
<?xml version="1.0" encoding="UTF-8"?>
<!--
Waxeye Parser Generator - waxeye.org
Copyright (C) 2008 Orlando D. A. R. Hill
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-->
<!-- ====================================================================== -->
<!-- -->
<!-- Most of the build process is handled here. -->
<!-- The location of libraries is configured in the properties file. -->
<!-- -->
<!-- ====================================================================== -->
<project name="waxeye" default="" basedir="..">
<!-- ====================================================================== -->
<!-- INITIALISATION -->
<!-- ====================================================================== -->
<target name="init" depends="">
<!-- Project properties -->
<property name="project.name" value="waxeye" />
<property name="project.title" value="Waxeye Parser Generator" />
<property name="project.version" value="0.8.0" />
<!-- Import environment variables -->
<property environment="env" />
<!-- Use property files -->
<property file="build/properties" />
</target>
<!-- ====================================================================== -->
<!-- PREPARE CLASSPATH -->
<!-- ====================================================================== -->
<target name="prepare" depends="init">
<!-- Compilation classpath -->
<path id="build.classpath" />
<!-- Test Compilation classpath -->
<path id="build.classpath.test">
<path refid="build.classpath" />
<pathelement location="${TESTNG_LIB}" />
<pathelement path="tmp/classes" />
</path>
</target>
<!-- ====================================================================== -->
<!-- DIRECTORIES FOR BUILD -->
<!-- ====================================================================== -->
<target name="dirs-build" depends="init">
<mkdir dir="tmp/classes" />
</target>
<!-- ====================================================================== -->
<!-- DIRECTORIES FOR BUILD-TEST -->
<!-- ====================================================================== -->
<target name="dirs-build-test" depends="init">
<mkdir dir="tmp/test" />
</target>
<!-- ====================================================================== -->
<!-- DIRECTORIES FOR JAR -->
<!-- ====================================================================== -->
<target name="dirs-jar" depends="init">
<mkdir dir="lib" />
</target>
<!-- ====================================================================== -->
<!-- DIRECTORIES FOR JAVADOC -->
<!-- ====================================================================== -->
<target name="dirs-javadoc" depends="init">
<mkdir dir="docs" />
<mkdir dir="docs/javadoc" />
</target>
<!-- ====================================================================== -->
<!-- CLEAN-ALL -->
<!-- ====================================================================== -->
<target name="clean-all"
depends="clean, clean-javadoc" />
<!-- ====================================================================== -->
<!-- CLEAN -->
<!-- ====================================================================== -->
<target name="clean" depends="init">
<delete dir="build/eclipse" />
<delete dir="tmp/classes" />
<delete dir="tmp/test" />
<delete dir="tmp/test-output" />
</target>
<!-- ====================================================================== -->
<!-- CLEAN-JAVADOC -->
<!-- ====================================================================== -->
<target name="clean-javadoc" depends="init">
<delete dir="docs/javadoc" />
</target>
<!-- ====================================================================== -->
<!-- COMPILE -->
<!-- ====================================================================== -->
<target name="compile" depends="prepare, dirs-build">
<javac debug="${build.debug}" deprecation="${build.deprecation}"
destdir="tmp/classes" target="${build.jdk-version.target}"
source="${build.jdk-version.source}" optimize="${build.optimize}"
srcdir="src/java">
<classpath refid="build.classpath" />
</javac>
</target>
<!-- ====================================================================== -->
<!-- COMPILE TESTS -->
<!-- ====================================================================== -->
<target name="compile-test" depends="compile, dirs-build-test">
<javac debug="${build.debug}" deprecation="${build.deprecation}"
destdir="tmp/test" target="${build.jdk-version.target}"
source="${build.jdk-version.source}" optimize="${build.optimize}"
srcdir="test/java">
<classpath refid="build.classpath.test"/>
</javac>
</target>
<!-- ====================================================================== -->
<!-- TESTNG TESTS -->
<!-- ====================================================================== -->
<target name="testng" depends="compile-test">
<java classname="org.testng.TestNG" fork="true">
<classpath location="tmp/test" />
<classpath refid="build.classpath.test" />
<arg value="-d" />
<arg value="tmp/test-output" />
<arg value="test/java/testng.xml" />
<jvmarg value="-enableassertions" />
</java>
</target>
<!-- ====================================================================== -->
<!-- CHECKSTYLE -->
<!-- ====================================================================== -->
<target name="checkstyle" depends="prepare">
<taskdef resource="checkstyletask.properties" classpath="${CHECKSTYLE_LIB}" />
<checkstyle config="build/checkstyle.xml">
<fileset dir="src/java" includes="**/*.java" />
<property key="checkstyle.cache.file"
file="tmp/checkstyle.cache" />
<classpath refid="build.classpath" />
</checkstyle>
</target>
<!-- ====================================================================== -->
<!-- CHECKSTYLE-TESTS -->
<!-- ====================================================================== -->
<target name="checkstyle-tests" depends="prepare">
<taskdef resource="checkstyletask.properties" classpath="${CHECKSTYLE_LIB}" />
<checkstyle config="build/checkstyle.xml">
<fileset dir="test/java" includes="**/*.java" />
<property key="checkstyle.cache.file"
file="build/checkstyle.cache" />
<classpath refid="build.classpath"/>
</checkstyle>
</target>
<!-- ====================================================================== -->
<!-- JAR -->
<!-- ====================================================================== -->
<target name="jar" depends="compile, dirs-jar">
<delete file="lib/${project.name}.jar" />
<jar basedir="tmp/classes"
jarfile="lib/${project.name}.jar">
<include name="**/*.class" />
</jar>
</target>
<!-- ====================================================================== -->
<!-- JAVADOC -->
<!-- ====================================================================== -->
<target name="javadoc" depends="prepare, dirs-javadoc">
<uptodate property="javadoc.unneeded" targetfile="docs/javadoc/index.html">
<srcfiles dir="src/java" includes="**/*.java,**/*.html" />
</uptodate>
<antcall target="javadoc.api" />
</target>
<target name="javadoc.api" unless="javadoc.unneeded" depends="prepare, dirs-javadoc">
<mkdir dir="docs/javadoc" />
<javadoc author="true" version="true" access="protected"
doctitle="${project.title}" bottom="${project.title}"
source="${build.jdk-version.source}" destdir="docs/javadoc"
sourcepath="src/java" packagenames="*"
windowtitle="${project.title} version ${project.version}">
<classpath refid="build.classpath" />
</javadoc>
</target>
</project>