/
build.xml
152 lines (130 loc) · 6.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
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
<?xml version="1.0" encoding="UTF-8" ?>
<!-- This file is part of the DITA Open Toolkit project hosted on
Sourceforge.net. See the accompanying license.txt file for
applicable licenses.-->
<!-- (c) Copyright IBM Corp. 2004, 2006 All Rights Reserved. -->
<!--
| basedir can be specified to other places base on your need.
|
| Note: input, output, and temp directories will base on the basedir if
| they are relative paths.
* -->
<project name="ig_guide" default="all" basedir=".">
<!-- Use environment variables. -->
<property environment="env"/>
<property name="dita-ot.dir" value="${env.DITA_HOME}"/>
<property name="source.dir" value="${env.DOC_HOME}"/>
<property name="antfile" value="${dita-ot.dir}/build.xml"/>
<!-- Refer to build.properties file for OS and user-specific configurations. -->
<property file="build.properties"/>
<!-- Generate temporary files to the "temp" folder. -->
<!--<property name="dita.temp.dir" value="temp"/>-->
<!-- Generate output to the "out" folder. -->
<property name="out" value="out"/>
<!-- Import the DITA-OT integrator.xml file. -->
<import file="${dita-ot.dir}${file.separator}integrator.xml"/>
<target name="pdf" depends="integrate" description="Builds a PDF file.">
<ant antfile="${dita-ot.dir}${file.separator}build.xml" target="init">
<property name="output.dir"
value="out${file.separator}pdf"/>
<property name="transtype" value="pdf"/>
<!--<property name="clean.temp" value="yes"/>-->
</ant>
</target>
<target name="html2" depends="integrate">
<ant antfile="${dita-ot.dir}${file.separator}build.xml" target="init">
<property name="output.dir"
value="${out}${file.separator}html2"/>
<property name="args.css"
value="${dita-ot.dir}${file.separator}demo${file.separator}fo${file.separator}Customization${file.separator}xhtml${file.separator}xsl${file.separator}css${file.separator}euca_docs.css"/>
<property name="args.copycss" value="yes"/>
<property name="args.csspath" value="."/>
<property name="transtype" value="html2"/>
</ant>
</target>
<target name="xhtml" depends="integrate" description="Builds XHTML files and TOC.">
<ant antfile="${dita-ot.dir}${file.separator}build.xml" target="init">
<property name="output.dir"
value="out${file.separator}xhtml${file.separator}ig"/>
<property name="args.xhtml.classattr" value="no"/>
<!--<property name="args.hdr"
value="${dita-ot.dir}${file.separator}demo${file.separator}fo${file.separator}Customization${file.separator}xhtml${file.separator}xsl${file.separator}xhtml${file.separator}euca_header.xml"/>
<property name="args.ftr"
value="${dita-ot.dir}${file.separator}demo${file.separator}fo${file.separator}Customization${file.separator}xhtml${file.separator}xsl${file.separator}xhtml${file.separator}euca_footer.xml"/>
<property name="breadcrumbs" value="yes"/>-->
<property name="welcome.page" value="ig/index"/>
<property name="transtype" value="xhtml"/>
<!--<property name="clean.temp" value="yes"/>-->
</ant>
</target>
<target name="epub" depends="integrate" description="Builds an EPUB file.">
<ant antfile="${dita-ot.dir}${file.separator}build.xml" target="init">
<property name="output.dir"
value="out${file.separator}epub"/>
<property name="transtype" value="epub"/>
<!--<property name="cover.graphic.file"
value="${source.dir}${file.separator}images${file.separator}logo.png"/> -->
</ant>
</target>
<target name="kindle" depends="integrate" description="Builds a Kindle (mobi) file.">
<ant antfile="${dita-ot.dir}${file.separator}build.xml" target="init">
<property name="output.dir"
value="out${file.separator}kindle"/>
<property name="transtype" value="kindle"/>
</ant>
</target>
<target name="odt" depends="integrate" description="Builds an Open Office file.">
<ant antfile="${dita-ot.dir}${file.separator}build.xml" target="init">
<property name="output.dir"
value="out${file.separator}odt"/>
<property name="transtype" value="odt"/>
</ant>
</target>
<target name="wordrtf" depends="integrate" description="Builds an RTF file.">
<ant antfile="${dita-ot.dir}${file.separator}build.xml" target="init">
<property name="output.dir"
value="out${file.separator}wordrtf"/>
<property name="transtype" value="wordrtf"/>
</ant>
</target>
<target name="xliff" depends="integrate" description="Builds an XLIFF file from a ditamap">
<ant antfile="${dita-ot.dir}${file.separator}build.xml" target="init">
<property name="output.dir"
value="out${file.separator}xliff"/>
<property name="transtype" value="xliff"/>
</ant>
</target>
<target name="xliff2dita" depends="integrate" description="Builds dita files from an XLIFF
translated file">
<ant antfile="${dita-ot.dir}${file.separator}build.xml" target="init">
<property name="input.dir" value="${source.dir}${file.separator}translate"/>
<property name="output.dir"
value="out${file.separator}xliff2dita"/>
<property name="transtype" value="ditafromxliff"/>
</ant>
</target>
<target name="docbook" description="Build Docbook files" depends="integrate">
<ant antfile="${dita-ot.dir}${file.separator}build.xml" target="init">
<property name="output.dir"
value="out${file.separator}docbook"/>
<property name="transtype" value="docbook"/>
</ant>
</target>
<target name="qa" description="Generates quality assurance report" depends="integrate">
<ant antfile="${dita-ot.dir}${file.separator}build.xml" target="init">
<property name="output.dir"
value="out${file.separator}qa"/>
<property name="transtype" value="qa"/>
</ant>
</target>
<!-- This builds all files we intend to publish other than xliff and xliff2dita. -->
<target name="all" depends="integrate, pdf, xhtml, odt, wordrtf, epub">
</target>
<target name="clean" description="Deletes output directory">
<!-- Remove all temporary and generated files -->
<echo message="Deleting ${out}"/>
<delete dir="${out}"></delete>
<echo message="Deleting ${dita.temp.dir}"/>
<delete dir="${dita.temp.dir}"/>
</target>
</project>