-
Notifications
You must be signed in to change notification settings - Fork 13
/
build.xml
170 lines (124 loc) · 9.08 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
<?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. 2006 All Rights Reserved. --><project name="DOST" default="init" xmlns:dita="http://dita-ot.sourceforge.net">
<property file="${basedir}/local.properties"/>
<!-- Initialize DITA-OT base directory -->
<dirname property="ant.file.DOST.dir" file="${ant.file.DOST}"/>
<condition property="dita.dir" value="${ant.file.DOST.dir}">
<not>
<isset property="dita.dir"/>
</not>
</condition>
<condition property="dita.dir" value="${basedir}">
<not>
<isset property="dita.dir"/>
</not>
</condition>
<path id="dost.class.path">
<pathelement location="${dita.dir}${file.separator}plugins/org.dita.pdf2/lib/fo.jar"/>
<pathelement location="${dita.dir}/lib/dost.jar"/>
<pathelement location="${dita.dir}/lib/dost-configuration.jar"/>
</path>
<target name="init">
<dita-ot-fail id="DOTA001F">
<condition>
<and>
<not><equals arg1="${transtype}" arg2="html5" casesensitive="false"/></not><not><equals arg1="${transtype}" arg2="xhtml" casesensitive="false"/></not><not><equals arg1="${transtype}" arg2="htmlhelp" casesensitive="false"/></not><not><equals arg1="${transtype}" arg2="tocjs" casesensitive="false"/></not><not><equals arg1="${transtype}" arg2="eclipsehelp" casesensitive="false"/></not><not><equals arg1="${transtype}" arg2="troff" casesensitive="false"/></not><not><equals arg1="${transtype}" arg2="eclipsecontent" casesensitive="false"/></not><not><equals arg1="${transtype}" arg2="javahelp" casesensitive="false"/></not><not><equals arg1="${transtype}" arg2="wordrtf" casesensitive="false"/></not><not><equals arg1="${transtype}" arg2="webhelp-responsive" casesensitive="false"/></not><not><equals arg1="${transtype}" arg2="odt" casesensitive="false"/></not><not><equals arg1="${transtype}" arg2="com.couchbase.docs.html-draft" casesensitive="false"/></not><not><equals arg1="${transtype}" arg2="docbook" casesensitive="false"/></not><not><equals arg1="${transtype}" arg2="pdf" casesensitive="false"/></not><not><equals arg1="${transtype}" arg2="pdf2" casesensitive="false"/></not>
</and>
</condition>
<param name="1" value="${transtype}"/>
</dita-ot-fail>
<condition property="clean.temp" value="true">
<not><isset property="clean.temp"/></not>
</condition>
<condition property="clean-temp.skip">
<isfalse value="${clean.temp}"/>
</condition>
<antcall>
<target name="dita2${transtype}"/>
<target name="clean-temp"/>
</antcall>
</target>
<property name="dita.plugin.org.dita.htmlhelp.dir" location="${dita.dir}/plugins/org.dita.htmlhelp"/><property name="dita.plugin.org.dita.base.dir" location="${dita.dir}"/><property name="dita.plugin.com.sophos.tocjs.dir" location="${dita.dir}/plugins/com.sophos.tocjs"/><property name="dita.plugin.org.dita.eclipsehelp.dir" location="${dita.dir}/plugins/org.dita.eclipsehelp"/><property name="dita.plugin.com.couchbase.docs.cbhtml5.dir" location="${dita.dir}/plugins/com.couchbase.docs.cbhtml5"/><property name="dita.plugin.org.dita.specialization.dita11.dir" location="${dita.dir}/plugins/org.dita.specialization.dita11"/><property name="dita.plugin.org.dita.troff.dir" location="${dita.dir}/plugins/org.dita.troff"/><property name="dita.plugin.org.dita.eclipsecontent.dir" location="${dita.dir}/plugins/org.dita.eclipsecontent"/><property name="dita.plugin.org.dita.javahelp.dir" location="${dita.dir}/plugins/org.dita.javahelp"/><property name="dita.plugin.org.dita.specialization.eclipsemap.dir" location="${dita.dir}/plugins/org.dita.specialization.eclipsemap"/><property name="dita.plugin.org.dita.wordrtf.dir" location="${dita.dir}/plugins/org.dita.wordrtf"/><property name="dita.plugin.com.couchbase.docs.editlink.dir" location="${dita.dir}/plugins/com.couchbase.editlink"/><property name="dita.plugin.org.dita.xhtml.dir" location="${dita.dir}/plugins/org.dita.xhtml"/><property name="dita.plugin.org.dita.odt.dir" location="${dita.dir}/plugins/org.dita.odt"/><property name="dita.plugin.org.oasis-open.dita.v1_2.dir" location="${dita.dir}/plugins/org.oasis-open.dita.v1_2"/><property name="dita.plugin.com.couchbase.docs.html-draft.dir" location="${dita.dir}/plugins/com.couchbase.docs.html-draft"/><property name="dita.plugin.org.dita.docbook.dir" location="${dita.dir}/plugins/org.dita.docbook"/><property name="dita.plugin.org.dita.pdf2.dir" location="${dita.dir}/plugins/org.dita.pdf2"/>
<target name="dita2tocjs" depends="build-init, preprocess, tocjsInit, map2tocjs, topic2tocjs, tocjsDefaultOutput">
</target>
<target name="tocjsInit">
<property name="html-version" value="html5"/>
<condition property="dita.plugin.com.sophos.tocjs.copydefaults" value="true">
<not>
<isset property="output.file"/>
</not>
</condition>
<property name="output.file" value="${output.dir}${file.separator}toctree.js"/>
<property name="out.ext" value=".html"/>
</target>
<target name="topic2tocjs" if="noMap">
<antcall target="dita.map.tocjs">
</antcall>
<echo>The TocJS output type only supports ditamap files as input.</echo>
</target>
<target name="map2tocjs" unless="noMap">
<antcall target="dita.map.tocjs">
<param name="input" value="${dita.temp.dir}${file.separator}${user.input.file}"/>
</antcall>
</target>
<target name="dita.map.tocjs" description="generate merged for tocjs">
<xslt in="${input}" out="${output.file}" style="${dita.plugin.com.sophos.tocjs.dir}/xsl/tocjs.xsl">
<param name="contentwin" expression="${content.frame}" if="content.frame"/>
<param name="htmlext" expression="${out.ext}"/>
<xmlcatalog refid="dita.catalog"/>
</xslt>
</target>
<target name="tocjsDefaultOutput" if="dita.plugin.com.sophos.tocjs.copydefaults">
<antcall target="tocjsDefaultXhtmlOutput"/>
<antcall target="tocjsDefaultFrameset"/>
<copy todir="${output.dir}"><fileset dir="${dita.plugin.com.sophos.tocjs.dir}${file.separator}basefiles"><include name="**/*"/></fileset></copy>
</target>
<target name="tocjsDefaultXhtmlOutput" depends="dita.map.xhtml, copy-revflag, xhtml.topics, copy-css">
</target>
<target name="tocjsDefaultFrameset" if="dita.plugin.com.sophos.tocjs.copydefaults">
<xslt basedir="${dita.temp.dir}" destdir="${output.dir}" includesfile="${dita.temp.dir}${file.separator}${user.input.file.listfile}" extension="${out.ext}" style="${dita.plugin.com.sophos.tocjs.dir}${file.separator}xsl${file.separator}frameset.xsl">
<excludesfile name="${dita.temp.dir}${file.separator}${resourceonlyfile}" if="resourceonlyfile"/>
<param name="OUTEXT" expression="${out.ext}" if="out.ext"/>
<param name="CSSPATH" expression="${CSSPATH}" if="csspath"/>
<xmlcatalog refid="dita.catalog"/>
</xslt>
</target>
<import file="plugins/org.dita.xhtml/build_general.xml"/>
<import file="plugins/org.dita.xhtml/build_dita2xhtml.xml"/>
<import file="plugins/org.dita.htmlhelp/build_dita2htmlhelp.xml"/>
<import file="plugins/org.dita.base/build_init.xml"/>
<import file="plugins/org.dita.base/build_preprocess.xml"/>
<import file="plugins/org.dita.eclipsehelp/build_dita2eclipsehelp.xml"/>
<import file="plugins/org.dita.troff/build_dita2troff.xml"/>
<import file="plugins/org.dita.eclipsecontent/build_dita2eclipsecontent.xml"/>
<import file="plugins/org.dita.javahelp/build_dita2javahelp.xml"/>
<import file="plugins/org.dita.wordrtf/build_dita2wordrtf.xml"/>
<import file="plugins/org.dita.odt/build_dita2odt.xml"/>
<target name="com.couchbase.docs.html-draft.init">
<property name="html-version" value="html5"/>
<property name="args.xsl" location="${dita.plugin.com.couchbase.docs.html-draft.dir}/xslt/dita2html.xsl"/>
<property name="args.css.file" value="base.css"/>
<property name="args.csspath" value="css"/>
<property name="args.devguide" value="yes"/>
</target>
<target name="com.couchbase.docs.html-draft">
<loadfile property="com.couchbase.docs.html-draft.map" srcfile="${dita.temp.dir}/${user.input.file.listfile}">
<filterchain>
<headfilter lines="1"/>
</filterchain>
</loadfile>
<makeurl property="com.couchbase.docs.html-draft.map.url" file="${dita.temp.dir}/${com.couchbase.docs.html-draft.map}"/>
</target>
<target name="dita2com.couchbase.docs.html-draft" depends="com.couchbase.docs.html-draft.init, build-init, preprocess, copy-revflag, com.couchbase.docs.html-draft, xhtml.topics">
<copy todir="${output.dir}/assets">
<fileset dir="${dita.plugin.com.couchbase.docs.html-draft.dir}/assets"/>
</copy>
</target>
<import file="plugins/org.dita.docbook/build_dita2docbook.xml"/>
<import file="plugins/org.dita.pdf2/build.xml"/>
<!-- Deprecated since 2.1 -->
<target name="help">
<echo level="info">See http://www.dita-ot.org/${otrelease}/</echo>
</target>
</project>