-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.xml
274 lines (241 loc) · 7.41 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
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
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
<?xml version="1.0" encoding="UTF-8" ?>
<project name="LaTeXdoclet"
basedir=".">
<description>
LaTeX-Doclet. Ein Javadoc-Doclet, welches LaTeX-Quelltext ausspuckt.
</description>
<import file="${basedir}/src/ant/common-tasks.xml" />
<property name="ant.regexp.regexpimpl"
value="org.apache.tools.ant.util.regexp.Jdk14RegexpRegexp" />
<!--
<property name="api.url"
value="file://localhost/usr/share/doc/openjdk-6-jre/api/" />
<property name="api.url.tree"
value="file://localhost/usr/share/doc/openjdk-6-jre/jdk/api/javac/tree/" />
<property name="api.url.doclet"
value="file://localhost/usr/share/doc/openjdk-6-jre/jdk/api/javadoc/doclet/" />
-->
<!-- Alternative URLs: -->
<property name="api.url"
value="http://java.sun.com/javase/6/docs/api/" />
<property name="api.url.doclet"
value="http://java.sun.com/javase/6/docs/jdk/api/javadoc/doclet/" />
<property name="api.url.tree"
value="http://java.sun.com/javase/6/docs/jdk/api/javac/tree/" />
<!-- -->
<path id="ltxdoclet-path">
<pathelement location="${classes.dir}" />
<pathelement location="${java.home}/../lib/tools.jar"/>
</path>
<!-- - - - - - - - Die Targets. - - - - - - - - - -->
<!-- ltxpackage -->
<uptodate property="ok.package"
targetfile="${classes.dir}/de/dclj/paul/ltxdoclet/ltxdoclet.sty">
<srcfiles dir="${src.dir}/de/dclj/paul/ltxdoclet">
<include name="ltxdoclet.dtx" />
<include name="ltxdoclet.ins" />
</srcfiles>
</uptodate>
<target name="ltxpackage"
description="generiert das LaTeX-Paket aus dessen Quelltext."
unless="ok.package"
>
<mkdir dir="${temp.dir}" />
<copy todir="${temp.dir}">
<fileset dir="${src.dir}/de/dclj/paul/ltxdoclet">
<include name="ltxdoclet.dtx"/>
<include name="ltxdoclet.ins"/>
</fileset>
</copy>
<echo file="${temp.dir}/docstrip.cfg">%
% (leere Datei, um den im System eingestellten
% Pfad (texmf/tex/latex/paul/) zum Generieren von
% Dateien abzuschalten.)</echo>
<!-- docstrip -->
<exec executable="latex"
dir="${temp.dir}"
failonerror="true"
taskname="create-sty"
>
<arg value="-halt-on-error"/>
<arg value="ltxdoclet.ins" />
</exec>
<mkdir dir="${classes.dir}" />
<copy todir="${classes.dir}/de/dclj/paul/ltxdoclet">
<fileset dir="${temp.dir}">
<include name="ltxdoclet.sty"/>
</fileset>
<!-- wir filtern die Zeilen mit % am Anfang raus
(die werden von docstrip übrig gelassen, falls
noch Leerzeichen davor sind).
-->
<!-- (geht irgendwie gerade nicht)
<filterchain>
<linecontainsregexp negate="true">
<regexp pattern="^\s+%[^%]" />
</linecontainsregexp>
</filterchain>
-->
</copy>
<delete dir="${temp.dir}" />
</target>
<!-- pkgdoku -->
<target name="pkgdoku"
description="Dokumentation für das LaTeX-Paket."
depends="ltxpackage"
>
<mkdir dir="${temp.dir}" />
<copy todir="${temp.dir}">
<fileset dir="${src.dir}/de/dclj/paul/ltxdoclet">
<include name="ltxdoclet.dtx"/>
</fileset>
<fileset dir="${classes.dir}/de/dclj/paul/ltxdoclet">
<include name="ltxdoclet.sty"/>
</fileset>
</copy>
<thrice>
<exec executable="xelatex"
dir="${temp.dir}"
failonerror="true"
taskname="pkgdoku"
>
<arg value="-halt-on-error"/>
<arg value="ltxdoclet.dtx" />
</exec>
</thrice>
<mkdir dir="${export.dir}" />
<copy tofile="${export.dir}/ltxdoclet-ltxpkg.pdf"
file="${temp.dir}/ltxdoclet.pdf" />
<delete dir="${temp.dir}" />
</target>
<!-- classes -->
<target name="classes"
description="kompiliert die Java-Klassen für das LaTeX-Doclet.">
<mkdir dir="${classes.dir}" />
<javac destdir="${classes.dir}"
encoding="utf8"
source="5"
debug="on"
includeantruntime="no"
srcdir="${src.dir}"
>
<compilerarg value="-Xlint" />
<classpath refid="ltxdoclet-path" />
<include name="de/dclj/paul/ltxdoclet/*.java" />
</javac>
<copy todir="${classes.dir}">
<fileset dir="${src.dir}"
includes="de/dclj/paul/ltxdoclet/*.txt" />
</copy>
</target>
<!-- htmldoku -->
<target name="htmldoku"
description="API-Doku (in HTML) des LaTeX-doclets"
depends="classes"
>
<mkdir dir="${doku.dir}" />
<javadoc destdir="${doku.dir}"
version="on"
encoding="utf-8"
docencoding="utf-8"
charset="utf-8"
taskname="javadoc-html"
failonerror="true"
>
<!-- overview="src/de/dclj/paul/ltxdoclet/overview.html" -->
<classpath refid="ltxdoclet-path" />
<packageset dir="${src.dir}"
includes="de/dclj/paul/ltxdoclet" />
<link href="${api.url}" />
<link href="${api.url.tree}" />
<link href="${api.url.doclet}" />
</javadoc>
</target>
<!-- latexdoku -->
<target name="latexdoku"
description="API-Doku (in LaTeX) des LaTeX-doclets"
depends="classes, ltxpackage"
>
<!-- <mkdir dir="${doku.dir.tex}" /> -->
<javadoc destdir="${doku.dir.tex}"
version="on"
encoding="utf-8"
taskname="javadoc-ltx"
private="true"
overview="src/de/dclj/paul/ltxdoclet/overview.html"
failonerror="true"
>
<classpath refid="ltxdoclet-path" />
<packageset dir="${src.dir}"
includes="de/dclj/paul/ltxdoclet" />
<link href="http://java.sun.com/javase/6/docs/api/"
offline="on"
packagelistLoc="/usr/share/doc/openjdk-6-jre/api/" />
<link href="${api.url.tree}" />
<link href="${api.url.doclet}" />
<doclet name="de.dclj.paul.ltxdoclet.DocletStart"
path="${classes.dir}">
<param name="-includesource"/>
</doclet>
</javadoc>
</target>
<target name="doclethelp"
description="Kommandozeilen-Hilfe des LaTeX-Doclets"
depends="classes"
>
<javadoc sourcepath="${src.dir}">
<doclet name="de.dclj.paul.ltxdoclet.DocletStart"
path="${classes.dir}">
</doclet>
<arg value="-help" />
</javadoc>
</target>
<!-- pdfdoku -->
<target name="pdfdoku"
description="API-Doku (in PDF) des LaTeX-doclets"
depends="latexdoku" >
<exec executable="xelatex"
dir="${doku.dir.tex}"
failonerror="true"
taskname="pdfdoku 1">
<arg value="-halt-on-error" />
<arg value="doku-main.tex" />
</exec>
<exec executable="xelatex"
failonerror="true"
dir="${doku.dir.tex}"
taskname="pdfdoku 2">
<arg value="-halt-on-error" />
<arg value="doku-main.tex" />
</exec>
</target>
<target name="test-help"
depends="classes,ltxpackage">
<javadoc >
<packageset dir="${src.dir}"
includes="de/dclj/paul/ltxdoclet" />
<doclet name="de.dclj.paul.ltxdoclet.DocletStart"
path="${classes.dir}">
<param name="-help" />
</doclet>
</javadoc>
</target>
<!-- jar -->
<target name="jar"
description="Jar-Datei für das LaTeX-Doclet"
depends="classes,ltxpackage">
<mkdir dir="${export.dir}" />
<jar destfile="${export.dir}/ltxdoclet.jar"
basedir="classes"
index="true">
<include name="de/dclj/paul/ltxdoclet/*"/>
<!-- ToDo: nettes Manifest -->
</jar>
</target>
<target name="export"
description="creates everything exportable"
depends="jar,pkgdoku,pdfdoku">
<copy tofile="${export.dir}/ltxdoclet-javadoc.pdf"
file="${doku.dir.tex}/doku-main.pdf"/>
</target>
</project>