-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.xml
181 lines (158 loc) · 7.28 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
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
<!-- $Id: build.xml,v 1.50 2007/04/13 21:59:25 coffeeblack Exp $ -->
<!-- Copyright (C) 2007 Jason Baldridge -->
<project name="TexNLP" default="compile" basedir=".">
<!-- =================================================================== -->
<!-- Initialization target -->
<!-- =================================================================== -->
<target name="init">
<tstamp/>
<property name="Name" value="TexNLP"/>
<property name="name" value="texnlp"/>
<property name="year" value="2010"/>
<property name="version" value="0.2.0"/>
<echo message="----------- ${Name} ${version} [${year}] ------------"/>
<property name="debug" value="on"/>
<property name="optimize" value="off"/>
<property name="deprecation" value="on"/>
<property name="top.dir" value="."/>
<property name="src.dir" value="./"/>
<property name="bin.dir" value="./bin"/>
<property name="lib.dir" value="./lib"/>
<property name="docs.dir" value="./docs"/>
<property name="packages" value="texnlp.*"/>
<property name="build.dir" value="./output"/>
<property name="build.dest" value="./output/classes"/>
<property name="build.javadocs" value="${docs.dir}/api"/>
<path id="build.classpath">
<pathelement location="${lib.dir}/trove4j-3.0.2.jar"/>
<pathelement location="${lib.dir}/cli.jar"/>
<pathelement location="${lib.dir}/antlr-3.0.1.jar"/>
<pathelement location="${lib.dir}/antlr-2.7.7.jar"/>
<pathelement location="${lib.dir}/antlr-runtime-3.0.1.jar"/>
<pathelement location="${lib.dir}/stringtemplate-3.1b1.jar"/>
<pathelement location="${lib.dir}/commons-logging-1.1.1.jar"/>
</path>
<filter token="year" value="${year}"/>
<filter token="version" value="${version}"/>
<filter token="date" value="${TODAY}"/>
<filter token="log" value="true"/>
<filter token="verbose" value="true"/>
</target>
<!-- =================================================================== -->
<!-- Help on usage -->
<!-- =================================================================== -->
<target name="usage">
<echo message=""/>
<echo message=""/>
<echo message="TexNLP build file"/>
<echo message="-------------------------------------------------------------"/>
<echo message=""/>
<echo message=" Available targets are:"/>
<echo message=""/>
<echo message=" package --> generates the texnlp.jar file"/>
<echo message=" compile --> compiles the source code (default)"/>
<echo message=" javadoc --> generates the API documentation"/>
<echo message=" clean --> cleans up the compilation directory"/>
<echo message=""/>
<echo message=" See the comments inside the build.xml file for more details."/>
<echo message="-------------------------------------------------------------"/>
<echo message=""/>
<echo message=""/>
</target>
<!-- =================================================================== -->
<!-- Prepares the build directories -->
<!-- =================================================================== -->
<target name="prepare" depends="init">
<!-- create directories -->
<mkdir dir="${build.dir}"/>
<mkdir dir="${build.dest}"/>
</target>
<!-- =================================================================== -->
<!-- Compiles the source directory -->
<!-- =================================================================== -->
<target name="compile"
depends="prepare"
description="compiles the source code">
<javac srcdir="${src.dir}"
destdir="${build.dest}"
debug="${debug}"
deprecation="${deprecation}"
classpathref="build.classpath"
nowarn="true"
optimize="${optimize}">
</javac>
</target>
<!-- =================================================================== -->
<!-- Compiles the ANTLR grammars -->
<!-- =================================================================== -->
<target name="antlr">
<antlr3 target="parsegen/Expr.g"
outputdirectory="java/texnlp/util/"/>
</target>
<!-- =================================================================== -->
<!-- Creates the jar file -->
<!-- =================================================================== -->
<target name="package"
depends="compile"
description="generates the texnlp.jar file (default)">
<jar jarfile="${lib.dir}/${name}.jar">
<fileset dir="${build.dest}" includes="**"/>
</jar>
</target>
<!-- =================================================================== -->
<!-- Creates the homepage -->
<!-- =================================================================== -->
<target name="homepage"
depends="init,javadoc"
description="generates the API documentation">
<tar tarfile="${name}-homepage.tar"
basedir="./docs/"
includes="**"
excludes="**/.svn" />
<gzip src="${name}-homepage.tar"
zipfile="${build.dir}/${name}-homepage.tgz" />
<delete file="${name}-homepage.tar" />
</target>
<!-- =================================================================== -->
<!-- Creates the documentation -->
<!-- =================================================================== -->
<target name="javadoc" depends="prepare">
<mkdir dir="${build.javadocs}"/>
<javadoc packagenames="${packages}"
sourcepath="${src.dir}"
destdir="${build.javadocs}"
author="true"
version="true"
use="true"
splitindex="true"
noindex="false"
windowtitle="${name}"
doctitle="The ${Name} API v${version}"
bottom="Copyright © ${year} Jason Baldridge, The University of Texas at Austin. All Rights Reserved."
/>
</target>
<!-- =================================================================== -->
<!-- Creates the release file -->
<!-- =================================================================== -->
<target name="release" depends="clean,cleandocs">
<tar tarfile="${name}-${version}-src.tar"
basedir="../"
includes="${name}/**"
excludes="**/.svn" />
<gzip src="${name}-${version}-src.tar"
zipfile="../${name}-${version}-src.tgz" />
<delete file="${name}-${version}-src.tar" />
</target>
<!-- =================================================================== -->
<!-- Cleans targets -->
<!-- =================================================================== -->
<target name="clean"
depends="init"
description="cleans up the directory">
<delete dir="${build.dir}"/>
</target>
<target name="cleandocs" depends="init" description="cleans up the API docs directory, and extra pdf docs">
<delete dir="${build.javadocs}"/>
</target>
</project>
<!-- End of file -->