author | srilekhas <srilekhas@symbian.org> |
Wed, 18 Aug 2010 11:18:38 +0100 | |
changeset 627 | cb3264f4c6e6 |
parent 588 | c7c26511138f |
child 628 | 7c4a911dc066 |
permissions | -rw-r--r-- |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
2 |
<!-- |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
3 |
============================================================================ |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
4 |
Name : docs.ant.xml |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
5 |
Part of : Helium |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
6 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
7 |
Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
8 |
All rights reserved. |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
9 |
This component and the accompanying materials are made available |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
10 |
under the terms of the License "Eclipse Public License v1.0" |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
11 |
which accompanies this distribution, and is available |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
12 |
at the URL "http://www.eclipse.org/legal/epl-v10.html". |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
13 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
14 |
Initial Contributors: |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
15 |
Nokia Corporation - initial contribution. |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
16 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
17 |
Contributors: |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
18 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
19 |
Description: |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
20 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
21 |
============================================================================ |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
22 |
--> |
217 | 23 |
<!--* @package framework --> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
24 |
<project name="internal.docs" xmlns:hlm="http://www.nokia.com/helium" xmlns:ivy="antlib:org.apache.ivy.ant"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
25 |
<description> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
26 |
Documentation generation targets. |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
27 |
</description> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
28 |
|
217 | 29 |
<!-- Location of documentation source. |
587 | 30 |
This is set to work with IDO docs, to avoid updating their config. |
217 | 31 |
@type string |
32 |
@scope public |
|
33 |
--> |
|
587 | 34 |
<property name="doc.src.dir" location="${basedir}/docs/src" /> |
35 |
<!-- Location of documentation API source. |
|
36 |
@type string |
|
37 |
@scope private |
|
38 |
--> |
|
39 |
<property name="api.doc.src.dir" location="${helium.dir}/doc/api" /> |
|
40 |
||
588 | 41 |
<!-- Location of documentation API source for RST. |
42 |
@type string |
|
43 |
@scope private |
|
44 |
--> |
|
45 |
<property name="api.rst.doc.src.dir" location="${helium.dir}/doc/api_rst" /> |
|
46 |
||
587 | 47 |
<!-- A list of source paths for RST documentation to be built. --> |
48 |
<resources id="textdoc.paths"> |
|
49 |
<path> |
|
50 |
<pathelement path="${doc.src.dir}"/> |
|
51 |
</path> |
|
52 |
</resources> |
|
217 | 53 |
|
54 |
<!-- The location where the docs will be built. |
|
55 |
@type string |
|
56 |
@scope private --> |
|
587 | 57 |
<property name="doc.build.dir" location="${basedir}/build/doc" /> |
58 |
<!-- A temp location for doc processing. |
|
59 |
@type string |
|
60 |
@scope private --> |
|
61 |
<property name="doc.temp.dir" location="${basedir}/build/temp/doc" /> |
|
62 |
<!-- A temp location for doc processing. |
|
63 |
@type string |
|
64 |
@scope private --> |
|
65 |
<property name="doc_search.temp.dir" location="${basedir}/build/temp/doc_search" /> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
66 |
|
217 | 67 |
<fileset id="static.doc.files" dir="${helium.dir}/doc/src"> |
68 |
<include name="conf.py"/> |
|
69 |
<include name=".static"/> |
|
70 |
<include name=".templates/**"/> |
|
71 |
<include name="*.jpg"/> |
|
72 |
<include name="*.css"/> |
|
73 |
</fileset> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
74 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
75 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
76 |
<!-- Cleans the Helium API documentation. --> |
217 | 77 |
<target name="clean-helium-apidocs"> |
587 | 78 |
<delete dir="${doc.build.dir}/api/helium"/> |
79 |
<delete dir="${doc.temp.dir}/api/helium"/> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
80 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
81 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
82 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
83 |
<!-- Creates images of the dependencies for all Ant targets. |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
84 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
85 |
This includes creating a cmap file that is included in the HTML document, |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
86 |
so the boxes in the image are linked to their targets. --> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
87 |
<target name="helium-api-dependency-images"> |
587 | 88 |
<mkdir dir="${doc.build.dir}/api/helium"/> |
89 |
<mkdir dir="${doc.temp.dir}/api/helium"/> |
|
588 | 90 |
<fmpp sourceRoot="${api.rst.doc.src.dir}" includes="*.dot.ftl" outputRoot="${doc.temp.dir}/api/helium" |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
91 |
replaceExtension="dot.ftl, dot"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
92 |
<data expandProperties="yes"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
93 |
doc: xml(${database.file}) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
94 |
</data> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
95 |
</fmpp> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
96 |
<for param="dot.file" parallel="true" threadCount="${number.of.threads}"> |
587 | 97 |
<fileset dir="${doc.temp.dir}/api/helium" includes="*.dot"/> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
98 |
<sequential> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
99 |
<echo>Processing dot file: @{dot.file}</echo> |
587 | 100 |
<exec executable="dot" dir="${doc.temp.dir}/api/helium"> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
101 |
<arg line="-Tcmap @{dot.file} -O"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
102 |
</exec> |
587 | 103 |
<exec executable="dot" dir="${doc.build.dir}/api"> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
104 |
<arg line="-Tpng @{dot.file} -O"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
105 |
</exec> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
106 |
</sequential> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
107 |
</for> |
587 | 108 |
<move todir="${doc.build.dir}/api/helium" overwrite="true"> |
109 |
<fileset dir="${doc.temp.dir}/api/helium" includes="*.dot.png"/> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
110 |
</move> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
111 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
112 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
113 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
114 |
<!-- Builds the HTML files for the Helium API documentation. --> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
115 |
<target name="helium-api-html-docs"> |
587 | 116 |
<mkdir dir="${doc.build.dir}/api/helium"/> |
117 |
<copy todir="${doc.temp.dir}/api/helium" overwrite="true"> |
|
118 |
<fileset dir="${api.doc.src.dir}"/> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
119 |
</copy> |
587 | 120 |
<fmpp sourceRoot="${doc.temp.dir}/api/helium" excludes="*.dot.png,*.dot.ftl,**/*.dot,**/*.cmap,*.bak" |
121 |
outputRoot="${doc.build.dir}/api/helium" |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
122 |
replaceExtension="html.ftl, html"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
123 |
<data expandProperties="yes"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
124 |
ant: antProperties() |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
125 |
doc: xml(${database.file}) |
587 | 126 |
</data> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
127 |
</fmpp> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
128 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
129 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
130 |
|
588 | 131 |
<!-- Builds the RST files for the Helium API documentation. --> |
132 |
<target name="helium-api-rst-docs"> |
|
133 |
<mkdir dir="${doc.temp.dir}/api/helium"/> |
|
134 |
<fmpp sourceRoot="${api.rst.doc.src.dir}" excludes="*.dot.png,*.dot.ftl,**/*.dot,**/*.cmap,*.bak" |
|
135 |
outputRoot="${doc.temp.dir}/api/helium" |
|
136 |
replaceExtension="rst.ftl, rst"> |
|
137 |
<data expandProperties="yes"> |
|
138 |
ant: antProperties() |
|
139 |
doc: xml(${database.file}) |
|
140 |
</data> |
|
141 |
</fmpp> |
|
142 |
</target> |
|
143 |
||
144 |
||
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
145 |
<!-- Builds the Helium API documentation. --> |
217 | 146 |
<target name="helium-apidocs" depends="clean-helium-apidocs,database, |
588 | 147 |
helium-api-dependency-images,helium-api-rst-docs"/> |
217 | 148 |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
149 |
|
217 | 150 |
<!-- Generate API documentation from the source code. --> |
588 | 151 |
<target name="apidocs" depends="helium-apidocs"/> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
152 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
153 |
|
217 | 154 |
<!-- Macro to generate HTML docs from rst. --> |
587 | 155 |
<macrodef name="rstPrepMacro" uri="http://www.nokia.com/helium"> |
156 |
<attribute name="destdir"/> |
|
157 |
<element name="resources-elements" implicit="yes"/> |
|
158 |
<sequential> |
|
159 |
<for param="dir"> |
|
160 |
<resources-elements/> |
|
161 |
<sequential> |
|
162 |
<echo>Copying textdocs source directory: @{dir}</echo> |
|
588 | 163 |
<fmpp sourceRoot="@{dir}" excludes="**/*.bak" |
587 | 164 |
outputRoot="@{destdir}" removeExtensions="ftl" |
165 |
modes="copy(**/*.rst, **/*.html)"> |
|
166 |
<data expandProperties="yes"> |
|
167 |
ant: antProperties() |
|
168 |
project: antProject() |
|
169 |
</data> |
|
170 |
</fmpp> |
|
171 |
</sequential> |
|
172 |
</for> |
|
173 |
</sequential> |
|
174 |
</macrodef> |
|
175 |
||
176 |
||
177 |
<!-- Macro to generate HTML docs from rst. --> |
|
217 | 178 |
<macrodef name="rstMacro" uri="http://www.nokia.com/helium"> |
179 |
<attribute name="version" default="${helium.version}"/> |
|
587 | 180 |
<attribute name="src" default="${doc.temp.dir}"/> |
181 |
<attribute name="output" default="${doc.build.dir}"/> |
|
217 | 182 |
<sequential> |
183 |
<property name="sphinx.lib.dir" location="${helium.dir}/external/python/lib/common/Sphinx-0.5.1-py2.5.egg/sphinx" /> |
|
184 |
<if> |
|
185 |
<available file="${nokia.python.tools}/sphinxfixsearch.diff"/> |
|
186 |
<then> |
|
187 |
<patch patchfile="${nokia.python.tools}/sphinxfixsearch.diff" originalfile="${sphinx.lib.dir}/search.py"/> |
|
188 |
</then> |
|
189 |
</if> |
|
190 |
<if> |
|
191 |
<resourcecount when="greater" count="0"> |
|
192 |
<fileset dir="@{src}" includes="**/*.rst"/> |
|
193 |
</resourcecount> |
|
194 |
<then> |
|
195 |
<exec executable="python" failonerror="true"> |
|
196 |
<arg file="${python.dir}/common/sphinx-build.py"/> |
|
197 |
<arg value="-b" /> |
|
198 |
<arg value="html" /> |
|
199 |
<arg value="-D" /> |
|
200 |
<arg value="version=@{version}" /> |
|
201 |
<arg value="-D" /> |
|
202 |
<arg value="release=@{version}" /> |
|
203 |
<arg file="@{src}" /> |
|
204 |
<arg file="@{output}" /> |
|
205 |
</exec> |
|
206 |
</then> |
|
207 |
</if> |
|
208 |
<if> |
|
209 |
<available file="${nokia.python.tools}/sphinxfixsearch.diff"/> |
|
210 |
<then> |
|
211 |
<patch reverse="true" patchfile="${nokia.python.tools}/sphinxfixsearch.diff" originalfile="${sphinx.lib.dir}/search.py"/> |
|
212 |
</then> |
|
213 |
</if> |
|
214 |
</sequential> |
|
215 |
</macrodef> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
216 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
217 |
|
587 | 218 |
<!-- Generate search index for apis --> |
219 |
<target name="apidocs-search"> |
|
220 |
<echo>Convert API docs to .rst files</echo> |
|
221 |
<hlm:python> |
|
222 |
import html2rest |
|
223 |
import os |
|
224 |
import codecs |
|
225 |
#import traceback |
|
226 |
for root, dirs, files in os.walk(r'${doc.build.dir}/api', topdown=False): |
|
227 |
for fname in files: |
|
228 |
if '.html' in fname: |
|
229 |
filename = os.path.abspath(os.path.join(root, fname)) |
|
230 |
rstfilename = filename.replace('.html', '.rst') |
|
231 |
try: |
|
232 |
out = open(rstfilename, 'w') |
|
233 |
html2rest.html2rest(html2rest.readsoup(filename), out) |
|
234 |
except: |
|
235 |
#traceback.print_exc() |
|
236 |
print filename + ' failed to be converted to rst' |
|
237 |
finally: |
|
238 |
out.close() |
|
239 |
||
240 |
try: |
|
241 |
rstfile = codecs.open(rstfilename, 'r', 'utf8') |
|
242 |
rstfile.read() |
|
243 |
except: |
|
244 |
print rstfilename + ' has invalid unicode' |
|
245 |
rstfile.close() |
|
246 |
os.remove(rstfilename) |
|
247 |
</hlm:python> |
|
248 |
||
249 |
<move todir="${doc_search.temp.dir}" overwrite="true"> |
|
250 |
<fileset dir="${doc.build.dir}/api"> |
|
251 |
<include name="**/*.rst"/> |
|
252 |
</fileset> |
|
253 |
</move> |
|
254 |
||
255 |
<move todir="${doc.build.dir}/api_backup" overwrite="true"> |
|
256 |
<fileset dir="${doc.build.dir}/api"/> |
|
257 |
</move> |
|
258 |
||
259 |
<hlm:rstPrepMacro destdir="${doc_search.temp.dir}"> |
|
260 |
<resources> |
|
261 |
<path> |
|
262 |
<pathelement path="${helium.dir}/doc/default"/> |
|
263 |
</path> |
|
264 |
</resources> |
|
265 |
</hlm:rstPrepMacro> |
|
266 |
||
267 |
<copy file="${api.doc.src.dir}/apisearchindex.rst" tofile="${doc_search.temp.dir}/index.rst" overwrite="true"/> |
|
268 |
||
269 |
<!--<copy todir="${doc_search.temp.dir}"> |
|
270 |
<fileset refid="static.doc.files"/> |
|
271 |
</copy> |
|
272 |
<copy todir="${doc_search.temp.dir}" overwrite="true"> |
|
273 |
<fileset dir="${helium.dir}/doc/src_search" includes="**/*"/> |
|
274 |
</copy>--> |
|
275 |
||
276 |
<hlm:rstMacro src="${doc_search.temp.dir}" output="${doc.build.dir}/api"/> |
|
277 |
||
278 |
<move todir="${doc.build.dir}/api" overwrite="true"> |
|
279 |
<fileset dir="${doc.build.dir}/api_backup"/> |
|
280 |
</move> |
|
281 |
</target> |
|
282 |
||
283 |
||
217 | 284 |
<!-- Generate rst files for docs --> |
285 |
<target name="prep-textdocs"> |
|
587 | 286 |
<echo>Building docs into ${doc.build.dir}.</echo> |
217 | 287 |
|
587 | 288 |
<delete dir="${doc.build.dir}/.doctrees"/> |
289 |
<delete file="${doc.build.dir}/searchindex.json"/> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
290 |
|
587 | 291 |
<resources id="textdoc.all.paths"> |
292 |
<!-- default doc content is always processed first --> |
|
293 |
<path> |
|
294 |
<pathelement path="${helium.dir}/doc/default"/> |
|
295 |
</path> |
|
296 |
<resources refid="textdoc.paths"/> |
|
297 |
</resources> |
|
298 |
<hlm:rstPrepMacro destdir="${doc.temp.dir}"> |
|
299 |
<resources refid="textdoc.all.paths"/> |
|
300 |
</hlm:rstPrepMacro> |
|
301 |
</target> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
302 |
|
587 | 303 |
|
304 |
<target name="build-textdocs-dot-images"> |
|
217 | 305 |
<for param="dot.file"> |
587 | 306 |
<fileset dir="${doc.temp.dir}"> |
307 |
<include name="**/*.dot"/> |
|
308 |
<exclude name="api/helium/**/*.dot"/> |
|
309 |
</fileset> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
310 |
<sequential> |
217 | 311 |
<echo>Building dot file: @{dot.file}</echo> |
312 |
<exec executable="dot"> |
|
313 |
<arg line="-Tpng @{dot.file} -O"/> |
|
314 |
</exec> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
315 |
</sequential> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
316 |
</for> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
317 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
318 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
319 |
|
217 | 320 |
<!-- Generate HTML documentation from .rst documents with Sphinx. |
321 |
||
322 |
All doc .rst files should be generated or copied into build/temp/doc before being processed into HTML. |
|
323 |
--> |
|
587 | 324 |
<target name="build-textdocs"> |
217 | 325 |
<hlm:rstMacro /> |
326 |
||
587 | 327 |
<copy file="${database.file}" todir="${doc.build.dir}"/> |
217 | 328 |
</target> |
587 | 329 |
|
330 |
||
331 |
<target name="textdocs" depends="prep-textdocs,build-textdocs-dot-images,build-textdocs"/> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
332 |
|
217 | 333 |
|
587 | 334 |
<!-- Cleans only the RST text docs --> |
335 |
<target name="clean-textdocs"> |
|
336 |
<mkdir dir="${doc.build.dir}"/> |
|
337 |
<mkdir dir="${doc.temp.dir}"/> |
|
338 |
<mkdir dir="${doc_search.temp.dir}"/> |
|
339 |
||
340 |
<delete includeemptydirs="true"> |
|
341 |
<fileset dir="${doc.build.dir}"> |
|
342 |
<include name="**/*"/> |
|
343 |
<exclude name="api/helium/**/*"/> |
|
588 | 344 |
<exclude name="doclet/**"/> |
345 |
<exclude name="javadoc/**"/> |
|
587 | 346 |
</fileset> |
347 |
<fileset dir="${doc.temp.dir}"/> |
|
348 |
<fileset dir="${doc_search.temp.dir}"/> |
|
349 |
</delete> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
350 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
351 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
352 |
|
587 | 353 |
<!-- Cleans all documentation. --> |
354 |
<target name="clean-docs" depends="clean-helium-apidocs,clean-textdocs"/> |
|
355 |
||
356 |
||
217 | 357 |
<!-- generate all the user documentation for helium --> |
358 |
<target name="docs" depends="clean-docs,apidocs,textdocs"/> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
359 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
360 |
</project> |