42 @type string |
42 @type string |
43 @scope private |
43 @scope private |
44 --> |
44 --> |
45 <property name="api.rst.doc.src.dir" location="${helium.dir}/doc/api_rst" /> |
45 <property name="api.rst.doc.src.dir" location="${helium.dir}/doc/api_rst" /> |
46 |
46 |
|
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 |
47 <!-- A list of source paths for RST documentation to be built. --> |
54 <!-- A list of source paths for RST documentation to be built. --> |
48 <resources id="textdoc.paths"> |
55 <resources id="textdoc.paths"> |
49 <path> |
56 <path> |
50 <pathelement path="${doc.src.dir}"/> |
57 <pathelement path="${doc.src.dir}"/> |
51 </path> |
58 </path> |
75 |
82 |
76 <!-- Cleans the Helium API documentation. --> |
83 <!-- Cleans the Helium API documentation. --> |
77 <target name="clean-helium-apidocs"> |
84 <target name="clean-helium-apidocs"> |
78 <delete dir="${doc.build.dir}/api/helium"/> |
85 <delete dir="${doc.build.dir}/api/helium"/> |
79 <delete dir="${doc.temp.dir}/api/helium"/> |
86 <delete dir="${doc.temp.dir}/api/helium"/> |
|
87 </target> |
|
88 |
|
89 |
|
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> |
80 </target> |
100 </target> |
81 |
101 |
82 |
102 |
83 <!-- Creates images of the dependencies for all Ant targets. |
103 <!-- Creates images of the dependencies for all Ant targets. |
84 |
104 |
88 <mkdir dir="${doc.build.dir}/api/helium"/> |
108 <mkdir dir="${doc.build.dir}/api/helium"/> |
89 <mkdir dir="${doc.temp.dir}/api/helium"/> |
109 <mkdir dir="${doc.temp.dir}/api/helium"/> |
90 <fmpp sourceRoot="${api.rst.doc.src.dir}" includes="*.dot.ftl" outputRoot="${doc.temp.dir}/api/helium" |
110 <fmpp sourceRoot="${api.rst.doc.src.dir}" includes="*.dot.ftl" outputRoot="${doc.temp.dir}/api/helium" |
91 replaceExtension="dot.ftl, dot"> |
111 replaceExtension="dot.ftl, dot"> |
92 <data expandProperties="yes"> |
112 <data expandProperties="yes"> |
93 doc: xml(${database.file}) |
113 doc: xml(${public.database.file}) |
94 </data> |
114 </data> |
95 </fmpp> |
115 </fmpp> |
96 <for param="dot.file" parallel="true" threadCount="${number.of.threads}"> |
116 <for param="dot.file" parallel="true" threadCount="${number.of.threads}"> |
97 <fileset dir="${doc.temp.dir}/api/helium" includes="*.dot"/> |
117 <fileset dir="${doc.temp.dir}/api/helium" includes="*.dot"/> |
98 <sequential> |
118 <sequential> |
120 <fmpp sourceRoot="${doc.temp.dir}/api/helium" excludes="*.dot.png,*.dot.ftl,**/*.dot,**/*.cmap,*.bak" |
140 <fmpp sourceRoot="${doc.temp.dir}/api/helium" excludes="*.dot.png,*.dot.ftl,**/*.dot,**/*.cmap,*.bak" |
121 outputRoot="${doc.build.dir}/api/helium" |
141 outputRoot="${doc.build.dir}/api/helium" |
122 replaceExtension="html.ftl, html"> |
142 replaceExtension="html.ftl, html"> |
123 <data expandProperties="yes"> |
143 <data expandProperties="yes"> |
124 ant: antProperties() |
144 ant: antProperties() |
125 doc: xml(${database.file}) |
145 doc: xml(${public.database.file}) |
126 </data> |
146 </data> |
127 </fmpp> |
147 </fmpp> |
128 </target> |
148 </target> |
129 |
149 |
130 |
150 |
134 <fmpp sourceRoot="${api.rst.doc.src.dir}" excludes="*.dot.png,*.dot.ftl,**/*.dot,**/*.cmap,*.bak" |
154 <fmpp sourceRoot="${api.rst.doc.src.dir}" excludes="*.dot.png,*.dot.ftl,**/*.dot,**/*.cmap,*.bak" |
135 outputRoot="${doc.temp.dir}/api/helium" |
155 outputRoot="${doc.temp.dir}/api/helium" |
136 replaceExtension="rst.ftl, rst"> |
156 replaceExtension="rst.ftl, rst"> |
137 <data expandProperties="yes"> |
157 <data expandProperties="yes"> |
138 ant: antProperties() |
158 ant: antProperties() |
139 doc: xml(${database.file}) |
159 doc: xml(${public.database.file}) |
140 </data> |
160 </data> |
141 </fmpp> |
161 </fmpp> |
142 </target> |
162 </target> |
143 |
163 |
144 |
164 |
145 <!-- Builds the Helium API documentation. --> |
165 <!-- Builds the Helium API documentation. --> |
146 <target name="helium-apidocs" depends="clean-helium-apidocs,database, |
166 <target name="helium-apidocs" depends="clean-helium-apidocs,docs-database, |
147 helium-api-dependency-images,helium-api-rst-docs"/> |
167 helium-api-dependency-images,helium-api-rst-docs"/> |
148 |
168 |
149 |
169 |
150 <!-- Generate API documentation from the source code. --> |
170 <!-- Generate API documentation from the source code. --> |
151 <target name="apidocs" depends="helium-apidocs"/> |
171 <target name="apidocs" depends="helium-apidocs"/> |
164 outputRoot="@{destdir}" removeExtensions="ftl" |
184 outputRoot="@{destdir}" removeExtensions="ftl" |
165 modes="copy(**/*.rst, **/*.html)"> |
185 modes="copy(**/*.rst, **/*.html)"> |
166 <data expandProperties="yes"> |
186 <data expandProperties="yes"> |
167 ant: antProperties() |
187 ant: antProperties() |
168 project: antProject() |
188 project: antProject() |
|
189 doc: xml(${public.database.file}) |
169 </data> |
190 </data> |
170 </fmpp> |
191 </fmpp> |
171 </sequential> |
192 </sequential> |
172 </for> |
193 </for> |
173 </sequential> |
194 </sequential> |
280 </move> |
301 </move> |
281 </target> |
302 </target> |
282 |
303 |
283 |
304 |
284 <!-- Generate rst files for docs --> |
305 <!-- Generate rst files for docs --> |
285 <target name="prep-textdocs"> |
306 <target name="prep-textdocs" depends="docs-database"> |
286 <echo>Building docs into ${doc.build.dir}.</echo> |
307 <echo>Building docs into ${doc.build.dir}.</echo> |
287 |
308 |
288 <delete dir="${doc.build.dir}/.doctrees"/> |
309 <delete dir="${doc.build.dir}/.doctrees"/> |
289 <delete file="${doc.build.dir}/searchindex.json"/> |
310 <delete file="${doc.build.dir}/searchindex.json"/> |
290 |
311 |
291 <resources id="textdoc.all.paths"> |
312 <resources id="textdoc.all.paths"> |
292 <!-- default doc content is always processed first --> |
313 <!-- default doc content is always processed first --> |
293 <path> |
314 <path> |
294 <pathelement path="${helium.dir}/doc/default"/> |
315 <pathelement path="${helium.dir}/doc/default"/> |
|
316 <pathelement path="${helium.dir}/doc/src/manual"/> |
295 </path> |
317 </path> |
296 <resources refid="textdoc.paths"/> |
318 <resources refid="textdoc.paths"/> |
297 </resources> |
319 </resources> |
298 <hlm:rstPrepMacro destdir="${doc.temp.dir}"> |
320 <hlm:rstPrepMacro destdir="${doc.temp.dir}"> |
299 <resources refid="textdoc.all.paths"/> |
321 <resources refid="textdoc.all.paths"/> |
321 |
343 |
322 All doc .rst files should be generated or copied into build/temp/doc before being processed into HTML. |
344 All doc .rst files should be generated or copied into build/temp/doc before being processed into HTML. |
323 --> |
345 --> |
324 <target name="build-textdocs"> |
346 <target name="build-textdocs"> |
325 <hlm:rstMacro /> |
347 <hlm:rstMacro /> |
326 |
|
327 <copy file="${database.file}" todir="${doc.build.dir}"/> |
|
328 </target> |
348 </target> |
329 |
349 |
330 |
350 |
331 <target name="textdocs" depends="prep-textdocs,build-textdocs-dot-images,build-textdocs"/> |
351 <target name="textdocs" depends="prep-textdocs,build-textdocs-dot-images,build-textdocs"/> |
332 |
352 |