author | kelvzhu |
Mon, 13 Sep 2010 13:11:19 +0800 | |
changeset 640 | ac0bbc1e5d79 |
parent 628 | 7c4a911dc066 |
child 645 | b8d81fa19e7d |
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 |
||
628 | 47 |
<!-- Location of helium database |
48 |
@type string |
|
49 |
@scope private |
|
50 |
--> |
|
51 |
<property name="public.database.file" location="${basedir}/build/public_database.xml"/> |
|
52 |
||
53 |
||
587 | 54 |
<!-- A list of source paths for RST documentation to be built. --> |
55 |
<resources id="textdoc.paths"> |
|
56 |
<path> |
|
57 |
<pathelement path="${doc.src.dir}"/> |
|
58 |
</path> |
|
59 |
</resources> |
|
217 | 60 |
|
61 |
<!-- The location where the docs will be built. |
|
62 |
@type string |
|
63 |
@scope private --> |
|
587 | 64 |
<property name="doc.build.dir" location="${basedir}/build/doc" /> |
65 |
<!-- A temp location for doc processing. |
|
66 |
@type string |
|
67 |
@scope private --> |
|
68 |
<property name="doc.temp.dir" location="${basedir}/build/temp/doc" /> |
|
69 |
<!-- A temp location for doc processing. |
|
70 |
@type string |
|
71 |
@scope private --> |
|
72 |
<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
|
73 |
|
217 | 74 |
<fileset id="static.doc.files" dir="${helium.dir}/doc/src"> |
75 |
<include name="conf.py"/> |
|
76 |
<include name=".static"/> |
|
77 |
<include name=".templates/**"/> |
|
78 |
<include name="*.jpg"/> |
|
79 |
<include name="*.css"/> |
|
80 |
</fileset> |
|
1
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 |
<!-- Cleans the Helium API documentation. --> |
217 | 84 |
<target name="clean-helium-apidocs"> |
587 | 85 |
<delete dir="${doc.build.dir}/api/helium"/> |
86 |
<delete dir="${doc.temp.dir}/api/helium"/> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
87 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
88 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
89 |
|
628 | 90 |
<!-- Generates an Ant XML database file showing only public content. |
91 |
@scope private |
|
92 |
--> |
|
93 |
<target name="docs-database"> |
|
94 |
<hlm:database output="${public.database.file}" scope="public" filesetonly="true"> |
|
95 |
<fileset dir="."> |
|
96 |
<include name="**/*.ant.xml"/> |
|
97 |
<include name="**/build.xml"/> |
|
98 |
</fileset> |
|
99 |
</hlm:database> |
|
100 |
</target> |
|
101 |
||
102 |
||
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
103 |
<!-- 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
|
104 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
105 |
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
|
106 |
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
|
107 |
<target name="helium-api-dependency-images"> |
587 | 108 |
<mkdir dir="${doc.build.dir}/api/helium"/> |
109 |
<mkdir dir="${doc.temp.dir}/api/helium"/> |
|
588 | 110 |
<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
|
111 |
replaceExtension="dot.ftl, dot"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
112 |
<data expandProperties="yes"> |
628 | 113 |
doc: xml(${public.database.file}) |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
114 |
</data> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
115 |
</fmpp> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
116 |
<for param="dot.file" parallel="true" threadCount="${number.of.threads}"> |
587 | 117 |
<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
|
118 |
<sequential> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
119 |
<echo>Processing dot file: @{dot.file}</echo> |
587 | 120 |
<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
|
121 |
<arg line="-Tcmap @{dot.file} -O"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
122 |
</exec> |
587 | 123 |
<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
|
124 |
<arg line="-Tpng @{dot.file} -O"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
125 |
</exec> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
126 |
</sequential> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
127 |
</for> |
587 | 128 |
<move todir="${doc.build.dir}/api/helium" overwrite="true"> |
129 |
<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
|
130 |
</move> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
131 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
132 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
133 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
134 |
<!-- 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
|
135 |
<target name="helium-api-html-docs"> |
587 | 136 |
<mkdir dir="${doc.build.dir}/api/helium"/> |
137 |
<copy todir="${doc.temp.dir}/api/helium" overwrite="true"> |
|
138 |
<fileset dir="${api.doc.src.dir}"/> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
139 |
</copy> |
587 | 140 |
<fmpp sourceRoot="${doc.temp.dir}/api/helium" excludes="*.dot.png,*.dot.ftl,**/*.dot,**/*.cmap,*.bak" |
141 |
outputRoot="${doc.build.dir}/api/helium" |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
142 |
replaceExtension="html.ftl, html"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
143 |
<data expandProperties="yes"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
144 |
ant: antProperties() |
628 | 145 |
doc: xml(${public.database.file}) |
587 | 146 |
</data> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
147 |
</fmpp> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
148 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
149 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
150 |
|
588 | 151 |
<!-- Builds the RST files for the Helium API documentation. --> |
152 |
<target name="helium-api-rst-docs"> |
|
153 |
<mkdir dir="${doc.temp.dir}/api/helium"/> |
|
154 |
<fmpp sourceRoot="${api.rst.doc.src.dir}" excludes="*.dot.png,*.dot.ftl,**/*.dot,**/*.cmap,*.bak" |
|
155 |
outputRoot="${doc.temp.dir}/api/helium" |
|
156 |
replaceExtension="rst.ftl, rst"> |
|
157 |
<data expandProperties="yes"> |
|
158 |
ant: antProperties() |
|
628 | 159 |
doc: xml(${public.database.file}) |
588 | 160 |
</data> |
161 |
</fmpp> |
|
162 |
</target> |
|
163 |
||
164 |
||
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
165 |
<!-- Builds the Helium API documentation. --> |
628 | 166 |
<target name="helium-apidocs" depends="clean-helium-apidocs,docs-database, |
588 | 167 |
helium-api-dependency-images,helium-api-rst-docs"/> |
217 | 168 |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
169 |
|
217 | 170 |
<!-- Generate API documentation from the source code. --> |
588 | 171 |
<target name="apidocs" depends="helium-apidocs"/> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
172 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
173 |
|
217 | 174 |
<!-- Macro to generate HTML docs from rst. --> |
587 | 175 |
<macrodef name="rstPrepMacro" uri="http://www.nokia.com/helium"> |
176 |
<attribute name="destdir"/> |
|
177 |
<element name="resources-elements" implicit="yes"/> |
|
178 |
<sequential> |
|
179 |
<for param="dir"> |
|
180 |
<resources-elements/> |
|
181 |
<sequential> |
|
182 |
<echo>Copying textdocs source directory: @{dir}</echo> |
|
588 | 183 |
<fmpp sourceRoot="@{dir}" excludes="**/*.bak" |
587 | 184 |
outputRoot="@{destdir}" removeExtensions="ftl" |
185 |
modes="copy(**/*.rst, **/*.html)"> |
|
186 |
<data expandProperties="yes"> |
|
187 |
ant: antProperties() |
|
188 |
project: antProject() |
|
628 | 189 |
doc: xml(${public.database.file}) |
587 | 190 |
</data> |
191 |
</fmpp> |
|
192 |
</sequential> |
|
193 |
</for> |
|
194 |
</sequential> |
|
195 |
</macrodef> |
|
196 |
||
197 |
||
198 |
<!-- Macro to generate HTML docs from rst. --> |
|
217 | 199 |
<macrodef name="rstMacro" uri="http://www.nokia.com/helium"> |
200 |
<attribute name="version" default="${helium.version}"/> |
|
587 | 201 |
<attribute name="src" default="${doc.temp.dir}"/> |
202 |
<attribute name="output" default="${doc.build.dir}"/> |
|
217 | 203 |
<sequential> |
204 |
<property name="sphinx.lib.dir" location="${helium.dir}/external/python/lib/common/Sphinx-0.5.1-py2.5.egg/sphinx" /> |
|
205 |
<if> |
|
206 |
<available file="${nokia.python.tools}/sphinxfixsearch.diff"/> |
|
207 |
<then> |
|
208 |
<patch patchfile="${nokia.python.tools}/sphinxfixsearch.diff" originalfile="${sphinx.lib.dir}/search.py"/> |
|
209 |
</then> |
|
210 |
</if> |
|
211 |
<if> |
|
212 |
<resourcecount when="greater" count="0"> |
|
213 |
<fileset dir="@{src}" includes="**/*.rst"/> |
|
214 |
</resourcecount> |
|
215 |
<then> |
|
216 |
<exec executable="python" failonerror="true"> |
|
217 |
<arg file="${python.dir}/common/sphinx-build.py"/> |
|
218 |
<arg value="-b" /> |
|
219 |
<arg value="html" /> |
|
220 |
<arg value="-D" /> |
|
221 |
<arg value="version=@{version}" /> |
|
222 |
<arg value="-D" /> |
|
223 |
<arg value="release=@{version}" /> |
|
224 |
<arg file="@{src}" /> |
|
225 |
<arg file="@{output}" /> |
|
226 |
</exec> |
|
227 |
</then> |
|
228 |
</if> |
|
229 |
<if> |
|
230 |
<available file="${nokia.python.tools}/sphinxfixsearch.diff"/> |
|
231 |
<then> |
|
232 |
<patch reverse="true" patchfile="${nokia.python.tools}/sphinxfixsearch.diff" originalfile="${sphinx.lib.dir}/search.py"/> |
|
233 |
</then> |
|
234 |
</if> |
|
235 |
</sequential> |
|
236 |
</macrodef> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
237 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
238 |
|
587 | 239 |
<!-- Generate search index for apis --> |
240 |
<target name="apidocs-search"> |
|
241 |
<echo>Convert API docs to .rst files</echo> |
|
242 |
<hlm:python> |
|
243 |
import html2rest |
|
244 |
import os |
|
245 |
import codecs |
|
246 |
#import traceback |
|
247 |
for root, dirs, files in os.walk(r'${doc.build.dir}/api', topdown=False): |
|
248 |
for fname in files: |
|
249 |
if '.html' in fname: |
|
250 |
filename = os.path.abspath(os.path.join(root, fname)) |
|
251 |
rstfilename = filename.replace('.html', '.rst') |
|
252 |
try: |
|
253 |
out = open(rstfilename, 'w') |
|
254 |
html2rest.html2rest(html2rest.readsoup(filename), out) |
|
255 |
except: |
|
256 |
#traceback.print_exc() |
|
257 |
print filename + ' failed to be converted to rst' |
|
258 |
finally: |
|
259 |
out.close() |
|
260 |
||
261 |
try: |
|
262 |
rstfile = codecs.open(rstfilename, 'r', 'utf8') |
|
263 |
rstfile.read() |
|
264 |
except: |
|
265 |
print rstfilename + ' has invalid unicode' |
|
266 |
rstfile.close() |
|
267 |
os.remove(rstfilename) |
|
268 |
</hlm:python> |
|
269 |
||
270 |
<move todir="${doc_search.temp.dir}" overwrite="true"> |
|
271 |
<fileset dir="${doc.build.dir}/api"> |
|
272 |
<include name="**/*.rst"/> |
|
273 |
</fileset> |
|
274 |
</move> |
|
275 |
||
276 |
<move todir="${doc.build.dir}/api_backup" overwrite="true"> |
|
277 |
<fileset dir="${doc.build.dir}/api"/> |
|
278 |
</move> |
|
279 |
||
280 |
<hlm:rstPrepMacro destdir="${doc_search.temp.dir}"> |
|
281 |
<resources> |
|
282 |
<path> |
|
283 |
<pathelement path="${helium.dir}/doc/default"/> |
|
284 |
</path> |
|
285 |
</resources> |
|
286 |
</hlm:rstPrepMacro> |
|
287 |
||
288 |
<copy file="${api.doc.src.dir}/apisearchindex.rst" tofile="${doc_search.temp.dir}/index.rst" overwrite="true"/> |
|
289 |
||
290 |
<!--<copy todir="${doc_search.temp.dir}"> |
|
291 |
<fileset refid="static.doc.files"/> |
|
292 |
</copy> |
|
293 |
<copy todir="${doc_search.temp.dir}" overwrite="true"> |
|
294 |
<fileset dir="${helium.dir}/doc/src_search" includes="**/*"/> |
|
295 |
</copy>--> |
|
296 |
||
297 |
<hlm:rstMacro src="${doc_search.temp.dir}" output="${doc.build.dir}/api"/> |
|
298 |
||
299 |
<move todir="${doc.build.dir}/api" overwrite="true"> |
|
300 |
<fileset dir="${doc.build.dir}/api_backup"/> |
|
301 |
</move> |
|
302 |
</target> |
|
303 |
||
304 |
||
217 | 305 |
<!-- Generate rst files for docs --> |
628 | 306 |
<target name="prep-textdocs" depends="docs-database"> |
587 | 307 |
<echo>Building docs into ${doc.build.dir}.</echo> |
217 | 308 |
|
587 | 309 |
<delete dir="${doc.build.dir}/.doctrees"/> |
310 |
<delete file="${doc.build.dir}/searchindex.json"/> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
311 |
|
587 | 312 |
<resources id="textdoc.all.paths"> |
313 |
<!-- default doc content is always processed first --> |
|
314 |
<path> |
|
315 |
<pathelement path="${helium.dir}/doc/default"/> |
|
628 | 316 |
<pathelement path="${helium.dir}/doc/src/manual"/> |
587 | 317 |
</path> |
318 |
<resources refid="textdoc.paths"/> |
|
319 |
</resources> |
|
320 |
<hlm:rstPrepMacro destdir="${doc.temp.dir}"> |
|
321 |
<resources refid="textdoc.all.paths"/> |
|
322 |
</hlm:rstPrepMacro> |
|
323 |
</target> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
324 |
|
587 | 325 |
|
326 |
<target name="build-textdocs-dot-images"> |
|
217 | 327 |
<for param="dot.file"> |
587 | 328 |
<fileset dir="${doc.temp.dir}"> |
329 |
<include name="**/*.dot"/> |
|
330 |
<exclude name="api/helium/**/*.dot"/> |
|
331 |
</fileset> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
332 |
<sequential> |
217 | 333 |
<echo>Building dot file: @{dot.file}</echo> |
334 |
<exec executable="dot"> |
|
335 |
<arg line="-Tpng @{dot.file} -O"/> |
|
336 |
</exec> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
337 |
</sequential> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
338 |
</for> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
339 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
340 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
341 |
|
217 | 342 |
<!-- Generate HTML documentation from .rst documents with Sphinx. |
343 |
||
344 |
All doc .rst files should be generated or copied into build/temp/doc before being processed into HTML. |
|
345 |
--> |
|
587 | 346 |
<target name="build-textdocs"> |
217 | 347 |
<hlm:rstMacro /> |
348 |
</target> |
|
587 | 349 |
|
350 |
||
351 |
<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
|
352 |
|
217 | 353 |
|
587 | 354 |
<!-- Cleans only the RST text docs --> |
355 |
<target name="clean-textdocs"> |
|
356 |
<mkdir dir="${doc.build.dir}"/> |
|
357 |
<mkdir dir="${doc.temp.dir}"/> |
|
358 |
<mkdir dir="${doc_search.temp.dir}"/> |
|
359 |
||
360 |
<delete includeemptydirs="true"> |
|
361 |
<fileset dir="${doc.build.dir}"> |
|
362 |
<include name="**/*"/> |
|
363 |
<exclude name="api/helium/**/*"/> |
|
588 | 364 |
<exclude name="doclet/**"/> |
365 |
<exclude name="javadoc/**"/> |
|
587 | 366 |
</fileset> |
367 |
<fileset dir="${doc.temp.dir}"/> |
|
368 |
<fileset dir="${doc_search.temp.dir}"/> |
|
369 |
</delete> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
370 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
371 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
372 |
|
587 | 373 |
<!-- Cleans all documentation. --> |
374 |
<target name="clean-docs" depends="clean-helium-apidocs,clean-textdocs"/> |
|
375 |
||
376 |
||
217 | 377 |
<!-- generate all the user documentation for helium --> |
378 |
<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
|
379 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
380 |
</project> |