-
Notifications
You must be signed in to change notification settings - Fork 19
/
build.xml
63 lines (50 loc) · 1.86 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
<project name="rest-api-doc" basedir=".">
<description>
Buildfile for XSL(T) batch transformations.
</description>
<property name="apidir" value="template" />
<property name="apiname" value="template" />
<property name="output" location="output" />
<property name="source" location="${apidir}" />
<property name="lib" location="lib" />
<property name="tmp" location="tmp" />
<target name="init">
<tstamp />
<mkdir dir="${output}" />
<mkdir dir="${tmp}" />
</target>
<target name="plain" depends="init">
<xslt in="${source}/${apiname}.xml" out="${output}/${apidir}/${apiname}.txt" style="xsl/text.xsl">
<outputproperty name="omit-xml-declaration" value="yes" />
<outputproperty name="method" value="text" />
<outputproperty name="indent" value="no" />
<outputproperty name="media-type" value="text/plain" />
</xslt>
</target>
<target name="xhtml" depends="init">
<xslt in="${source}/${apiname}.xml" out="${output}/${apidir}/${apiname}.html" style="xsl/xhtml.xsl">
</xslt>
</target>
<target name="tex" depends="init">
<xslt in="${source}/${apiname}.xml" out="${tmp}/${apiname}.tex" style="xsl/latex.xsl">
<outputproperty name="omit-xml-declaration" value="yes" />
<outputproperty name="method" value="text" />
<outputproperty name="indent" value="no" />
<outputproperty name="media-type" value="application/x-tex" />
</xslt>
</target>
<target name="pdf" depends="tex">
<exec dir="${tmp}" executable="pdflatex">
<arg value="${tmp}/${apiname}.tex" />
</exec>
<exec dir="${tmp}" executable="pdflatex">
<arg value="/${tmp}/${apiname}.tex" />
</exec>
<copy file="${tmp}/${apiname}.pdf" tofile="${output}/${apidir}/${apiname}.pdf" />
</target>
<target name="all" depends="plain,xhtml,pdf" />
<target name="clean" description="clean up">
<delete dir="${output}" />
<delete dir="${tmp}" />
</target>
</project>