author | timothy.murphy@nokia.com |
Sat, 01 May 2010 00:09:59 +0100 | |
branch | fix |
changeset 516 | cd8318d5fb3a |
parent 217 | 0f5e3a7fb6af |
child 587 | 85df38eb4012 |
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. |
30 |
@type string |
|
31 |
@scope public |
|
32 |
--> |
|
33 |
<property name="doc.src.dir" location="${basedir}/doc" /> |
|
34 |
||
35 |
<!-- The location where the docs will be built. |
|
36 |
@type string |
|
37 |
@scope private --> |
|
38 |
<property name="docs.build.dir" location="${basedir}/build/doc" /> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
39 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
40 |
<fileset id="python.library.files" dir="${helium.dir}"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
41 |
<include name="extensions/nokia/tools/common/python/lib/**/*.py"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
42 |
<include name="tools/common/python/lib/**/*.py"/> |
217 | 43 |
<include name="external/helium-antlib/python/**/*.py"/> |
44 |
<include name="extensions/nokia/external/helium-nokia-antlib/python/**/*.py"/> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
45 |
</fileset> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
46 |
|
217 | 47 |
<fileset id="static.doc.files" dir="${helium.dir}/doc/src"> |
48 |
<include name="conf.py"/> |
|
49 |
<include name=".static"/> |
|
50 |
<include name=".templates/**"/> |
|
51 |
<include name="*.jpg"/> |
|
52 |
<include name="*.css"/> |
|
53 |
</fileset> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
54 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
55 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
56 |
<!-- Cleans the Helium API documentation. --> |
217 | 57 |
<target name="clean-helium-apidocs"> |
58 |
<delete dir="${docs.build.dir}/api/helium"/> |
|
59 |
<delete dir="${docs.build.dir}/temp/doc/api/helium"/> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
60 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
61 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
62 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
63 |
<!-- 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
|
64 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
65 |
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
|
66 |
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
|
67 |
<target name="helium-api-dependency-images"> |
217 | 68 |
<mkdir dir="${docs.build.dir}/api/helium"/> |
69 |
<fmpp sourceRoot="${helium.dir}/doc/src/api" includes="*.dot.ftl" outputRoot="${docs.build.dir}/temp/doc/api/helium" |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
70 |
replaceExtension="dot.ftl, dot"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
71 |
<data expandProperties="yes"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
72 |
doc: xml(${database.file}) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
73 |
</data> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
74 |
</fmpp> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
75 |
<for param="dot.file" parallel="true" threadCount="${number.of.threads}"> |
217 | 76 |
<fileset dir="${docs.build.dir}/temp/doc/api/helium" includes="*.dot"/> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
77 |
<sequential> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
78 |
<echo>Processing dot file: @{dot.file}</echo> |
217 | 79 |
<exec executable="dot" dir="${docs.build.dir}/temp/doc/api/helium"> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
80 |
<arg line="-Tcmap @{dot.file} -O"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
81 |
</exec> |
217 | 82 |
<exec executable="dot" dir="${docs.build.dir}/api"> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
83 |
<arg line="-Tpng @{dot.file} -O"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
84 |
</exec> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
85 |
</sequential> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
86 |
</for> |
217 | 87 |
<move todir="${docs.build.dir}/api/helium" overwrite="true"> |
88 |
<fileset dir="${docs.build.dir}/temp/doc/api/helium" includes="*.dot.png"/> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
89 |
</move> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
90 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
91 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
92 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
93 |
<!-- 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
|
94 |
<target name="helium-api-html-docs"> |
217 | 95 |
<mkdir dir="${docs.build.dir}/api/helium"/> |
96 |
<copy todir="${docs.build.dir}/temp/doc/api/helium" overwrite="true"> |
|
97 |
<fileset dir="${helium.dir}/doc/src/api"/> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
98 |
</copy> |
217 | 99 |
<fmpp sourceRoot="${docs.build.dir}/temp/doc/api/helium" excludes="*.dot.png,*.dot.ftl,**/*.dot,**/*.cmap,*.bak" |
100 |
outputRoot="${docs.build.dir}/api/helium" |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
101 |
replaceExtension="html.ftl, html"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
102 |
<data expandProperties="yes"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
103 |
ant: antProperties() |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
104 |
doc: xml(${database.file}) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
105 |
</data> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
106 |
</fmpp> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
107 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
108 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
109 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
110 |
<!-- Builds the Helium API documentation. --> |
217 | 111 |
<target name="helium-apidocs" depends="clean-helium-apidocs,database, |
112 |
helium-api-dependency-images,helium-api-html-docs"/> |
|
1
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 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
115 |
<!-- Generate search index for apis --> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
116 |
<target name="apidocs-search"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
117 |
<hlm:python> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
118 |
import html2rest |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
119 |
import os |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
120 |
import codecs |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
121 |
#import traceback |
217 | 122 |
for root, dirs, files in os.walk(r'${docs.build.dir}/api', topdown=False): |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
123 |
for fname in files: |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
124 |
if '.html' in fname: |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
125 |
filename = os.path.abspath(os.path.join(root, fname)) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
126 |
rstfilename = filename.replace('.html', '.rst') |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
127 |
try: |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
128 |
out = open(rstfilename, 'w') |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
129 |
html2rest.html2rest(html2rest.readsoup(filename), out) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
130 |
except: |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
131 |
#traceback.print_exc() |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
132 |
print filename + ' failed to be converted to rst' |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
133 |
finally: |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
134 |
out.close() |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
135 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
136 |
try: |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
137 |
rstfile = codecs.open(rstfilename, 'r', 'utf8') |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
138 |
rstfile.read() |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
139 |
except: |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
140 |
print rstfilename + ' has invalid unicode' |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
141 |
rstfile.close() |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
142 |
os.remove(rstfilename) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
143 |
</hlm:python> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
144 |
|
217 | 145 |
<move todir="${docs.build.dir}/temp_search/doc" overwrite="true"> |
146 |
<fileset dir="${docs.build.dir}/api"> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
147 |
<include name="**/*.rst"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
148 |
</fileset> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
149 |
</move> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
150 |
|
217 | 151 |
<move todir="${docs.build.dir}/api_backup" overwrite="true"> |
152 |
<fileset dir="${docs.build.dir}/api"/> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
153 |
</move> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
154 |
|
217 | 155 |
<copy file="${helium.dir}/doc/src/api/apisearchindex.rst" tofile="${docs.build.dir}/temp_search/doc/index.rst"/> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
156 |
|
217 | 157 |
<copy todir="${docs.build.dir}/temp_search/doc"> |
158 |
<fileset refid="static.doc.files"/> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
159 |
</copy> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
160 |
|
217 | 161 |
<hlm:rstMacro src="${docs.build.dir}/temp_search/doc" output="${docs.build.dir}/api"/> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
162 |
|
217 | 163 |
<move todir="${docs.build.dir}/api" overwrite="true"> |
164 |
<fileset dir="${docs.build.dir}/api_backup"/> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
165 |
</move> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
166 |
</target> |
217 | 167 |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
168 |
|
217 | 169 |
<!-- Generate API documentation from the source code. --> |
170 |
<target name="apidocs" depends="helium-apidocs,apidocs-search"/> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
171 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
172 |
|
217 | 173 |
<!-- Macro to generate HTML docs from rst. --> |
174 |
<macrodef name="rstMacro" uri="http://www.nokia.com/helium"> |
|
175 |
<attribute name="version" default="${helium.version}"/> |
|
176 |
<attribute name="src" default="${docs.build.dir}/temp/doc"/> |
|
177 |
<attribute name="output" default="${docs.build.dir}"/> |
|
178 |
<sequential> |
|
179 |
<property name="sphinx.lib.dir" location="${helium.dir}/external/python/lib/common/Sphinx-0.5.1-py2.5.egg/sphinx" /> |
|
180 |
<if> |
|
181 |
<available file="${nokia.python.tools}/sphinxfixsearch.diff"/> |
|
182 |
<then> |
|
183 |
<patch patchfile="${nokia.python.tools}/sphinxfixsearch.diff" originalfile="${sphinx.lib.dir}/search.py"/> |
|
184 |
</then> |
|
185 |
</if> |
|
186 |
<if> |
|
187 |
<resourcecount when="greater" count="0"> |
|
188 |
<fileset dir="@{src}" includes="**/*.rst"/> |
|
189 |
</resourcecount> |
|
190 |
<then> |
|
191 |
<exec executable="python" failonerror="true"> |
|
192 |
<arg file="${python.dir}/common/sphinx-build.py"/> |
|
193 |
<arg value="-b" /> |
|
194 |
<arg value="html" /> |
|
195 |
<arg value="-D" /> |
|
196 |
<arg value="version=@{version}" /> |
|
197 |
<arg value="-D" /> |
|
198 |
<arg value="release=@{version}" /> |
|
199 |
<arg file="@{src}" /> |
|
200 |
<arg file="@{output}" /> |
|
201 |
</exec> |
|
202 |
</then> |
|
203 |
</if> |
|
204 |
<if> |
|
205 |
<available file="${nokia.python.tools}/sphinxfixsearch.diff"/> |
|
206 |
<then> |
|
207 |
<patch reverse="true" patchfile="${nokia.python.tools}/sphinxfixsearch.diff" originalfile="${sphinx.lib.dir}/search.py"/> |
|
208 |
</then> |
|
209 |
</if> |
|
210 |
</sequential> |
|
211 |
</macrodef> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
212 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
213 |
|
217 | 214 |
<!-- Generate rst files for docs --> |
215 |
<target name="prep-textdocs"> |
|
216 |
<echo>Building docs into ${docs.build.dir}.</echo> |
|
217 |
<mkdir dir="${docs.build.dir}/images"/> |
|
218 |
||
219 |
<delete dir="${docs.build.dir}/.doctrees"/> |
|
220 |
<delete file="${docs.build.dir}/searchindex.json"/> |
|
221 |
||
222 |
<copy todir="${docs.build.dir}/images" failonerror="false"> |
|
223 |
<fileset dir="${doc.src.dir}/images"/> |
|
224 |
</copy> |
|
225 |
||
226 |
<!-- Temporarily copy the image directory so that doc generation will complete happily.--> |
|
227 |
<copy todir="${docs.build.dir}/temp/doc/images" failonerror="false"> |
|
228 |
<fileset dir="${docs.build.dir}/images"/> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
229 |
</copy> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
230 |
|
217 | 231 |
<if> |
232 |
<available file="${doc.src.dir}/src"/> |
|
233 |
<then> |
|
234 |
<copy todir="${docs.build.dir}/temp/doc"> |
|
235 |
<fileset dir="${doc.src.dir}/src"> |
|
236 |
<include name="**/*.rst"/> |
|
237 |
<include name="**/*.css"/> |
|
238 |
<include name="**/*.jpg"/> |
|
239 |
<include name="**/*.dot"/> |
|
240 |
</fileset> |
|
241 |
</copy> |
|
242 |
||
243 |
<!--<fileset id="internal.ref.minibuilds" dir="${docs.build.dir}/temp/doc/minibuilds" includes="*/**/index.rst"/>--> |
|
244 |
<fmpp sourceRoot="${doc.src.dir}/src" |
|
245 |
outputRoot="${docs.build.dir}/temp/doc" includes="*.rst.ftl" removeExtensions="ftl" excludes="api_changes.rst.ftl,minibuilds.rst.ftl"> |
|
246 |
<data expandProperties="yes"> |
|
247 |
ant: antProperties() |
|
248 |
project: antProject() |
|
249 |
</data> |
|
250 |
</fmpp> |
|
251 |
</then> |
|
252 |
</if> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
253 |
|
217 | 254 |
<!-- Copy static content files from Helium --> |
255 |
<copy todir="${docs.build.dir}/temp/doc"> |
|
256 |
<fileset refid="static.doc.files"/> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
257 |
</copy> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
258 |
|
217 | 259 |
<for param="dot.file"> |
260 |
<fileset dir="${docs.build.dir}/temp/doc" includes="manual/*.dot"/> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
261 |
<sequential> |
217 | 262 |
<echo>Building dot file: @{dot.file}</echo> |
263 |
<exec executable="dot"> |
|
264 |
<arg line="-Tpng @{dot.file} -O"/> |
|
265 |
</exec> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
266 |
</sequential> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
267 |
</for> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
268 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
269 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
270 |
|
217 | 271 |
<!-- Generate HTML documentation from .rst documents with Sphinx. |
272 |
||
273 |
All doc .rst files should be generated or copied into build/temp/doc before being processed into HTML. |
|
274 |
--> |
|
275 |
<target name="textdocs" depends="prep-textdocs"> |
|
276 |
<hlm:rstMacro /> |
|
277 |
||
278 |
<copy file="${database.file}" todir="${docs.build.dir}"/> |
|
279 |
<copy file="${docs.build.dir}/temp/doc/default.css" todir="${docs.build.dir}/_static" overwrite="true" failonerror="true"/> |
|
280 |
<copy file="${docs.build.dir}/temp/doc/helium_pallot_small.jpg" todir="${docs.build.dir}/_static" overwrite="true"/> |
|
281 |
<copy todir="${docs.build.dir}" overwrite="true"> |
|
282 |
<fileset dir="${doc.src.dir}/src"> |
|
283 |
<include name="**/*.zip"/> |
|
284 |
</fileset> |
|
285 |
</copy> |
|
286 |
</target> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
287 |
|
217 | 288 |
|
289 |
<!-- Clean old build/doc dir. --> |
|
290 |
<target name="clean-docs"> |
|
291 |
<delete dir="${docs.build.dir}"/> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
292 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
293 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
294 |
|
217 | 295 |
<!-- generate all the user documentation for helium --> |
296 |
<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
|
297 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
298 |
</project> |