217
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
|
2 |
<!--
|
|
3 |
============================================================================
|
|
4 |
Name : helium-docs.ant.xml
|
|
5 |
Part of : Helium
|
|
6 |
|
|
7 |
Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
8 |
All rights reserved.
|
|
9 |
This component and the accompanying materials are made available
|
|
10 |
under the terms of the License "Eclipse Public License v1.0"
|
|
11 |
which accompanies this distribution, and is available
|
|
12 |
at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
13 |
|
|
14 |
Initial Contributors:
|
|
15 |
Nokia Corporation - initial contribution.
|
|
16 |
|
|
17 |
Contributors:
|
|
18 |
|
|
19 |
Description:
|
|
20 |
|
|
21 |
============================================================================
|
|
22 |
-->
|
|
23 |
<!--* @package framework -->
|
|
24 |
<project name="internal.helium.docs" xmlns:hlm="http://www.nokia.com/helium" xmlns:ivy="antlib:org.apache.ivy.ant">
|
|
25 |
<description>
|
|
26 |
Documentation generation targets specific to Helium.
|
|
27 |
</description>
|
|
28 |
|
|
29 |
<!-- Location of documentation source that is specific to Helium.
|
|
30 |
@type string
|
|
31 |
@scope private
|
|
32 |
-->
|
|
33 |
<property name="helium.doc.src.dir" location="${helium.dir}/doc" />
|
|
34 |
|
|
35 |
<!-- Generate an overview of Helium as HTML tables. -->
|
|
36 |
<target name="overview-to-html">
|
587
|
37 |
<fmpp sourceFile="${helium.doc.src.dir}/helium_custom/helium_overview.html.ftl"
|
|
38 |
outputFile="${doc.temp.dir}/helium_overview.html"
|
217
|
39 |
replaceExtension="html.ftl, html" expert="true">
|
|
40 |
<data expandProperties="yes">
|
587
|
41 |
doc: xml(${helium.doc.src.dir}/helium_custom/helium_overview.xml)
|
217
|
42 |
</data>
|
|
43 |
</fmpp>
|
|
44 |
</target>
|
|
45 |
|
|
46 |
|
|
47 |
<!-- Builds the Helium API documentation. -->
|
|
48 |
<target name="helium-apidocs" depends="clean-helium-apidocs,database,
|
|
49 |
find-python-dependencies,helium-api-dependency-images,helium-api-html-docs"/>
|
|
50 |
|
|
51 |
|
|
52 |
<target name="helium-prep-textdocs">
|
587
|
53 |
<mkdir dir="${doc.temp.dir}/minibuilds"/>
|
645
|
54 |
<copy todir="${doc.temp.dir}/development/minibuilds">
|
217
|
55 |
<fileset dir="${helium.dir}/tests/minibuilds/">
|
|
56 |
<include name="*/doc/**/*"/>
|
|
57 |
</fileset>
|
|
58 |
</copy>
|
587
|
59 |
|
|
60 |
<mkdir dir="${doc.temp.dir}/helium-antlib" />
|
|
61 |
<for param="dir">
|
|
62 |
<dirset dir="${helium.dir}" includes="*/doc/src" />
|
|
63 |
<sequential>
|
|
64 |
<copy todir="${doc.temp.dir}/helium-antlib">
|
|
65 |
<fileset dir="@{dir}/">
|
|
66 |
<include name="**/*.rst"/>
|
|
67 |
<include name="**/*.css"/>
|
|
68 |
<include name="**/*.dot"/>
|
|
69 |
<include name="**/*.png"/>
|
|
70 |
</fileset>
|
|
71 |
</copy>
|
645
|
72 |
<hlm:rstPrepMacro destdir="${doc.temp.dir}/helium-antlib">
|
|
73 |
<resources>
|
|
74 |
<path>
|
|
75 |
<pathelement path="@{dir}"/>
|
|
76 |
</path>
|
|
77 |
</resources>
|
|
78 |
</hlm:rstPrepMacro>
|
587
|
79 |
</sequential>
|
|
80 |
</for>
|
|
81 |
<for param="dir">
|
|
82 |
<dirset dir="${helium.dir}">
|
|
83 |
<include name="*/java/*" />
|
|
84 |
<include name="*/python/*" />
|
|
85 |
</dirset>
|
|
86 |
<sequential>
|
628
|
87 |
<copy todir="${doc.temp.dir}/helium-antlib" flatten="true">
|
587
|
88 |
<fileset dir="@{dir}/">
|
|
89 |
<include name="*.rst"/>
|
|
90 |
</fileset>
|
628
|
91 |
<fileset dir="@{dir}/" includes="doc/*" excludes="**/distribution.policy.S60" />
|
587
|
92 |
</copy>
|
|
93 |
</sequential>
|
|
94 |
</for>
|
217
|
95 |
</target>
|
|
96 |
|
|
97 |
|
|
98 |
<!-- Generate all documentation. -->
|
|
99 |
<target name="add-policies-to-docs" unless="env.HLM_SUBCON">
|
|
100 |
<hlm:updatePolicy policy="7" filename="distribution.policy.S60">
|
587
|
101 |
<dirset dir="${helium.dir}" includes="${doc.build.dir}/**/*"/>
|
217
|
102 |
</hlm:updatePolicy>
|
|
103 |
</target>
|
|
104 |
|
|
105 |
|
|
106 |
<!-- Creates XML and .rst documents describing the difference between
|
|
107 |
this version of Helium and the previous major release. -->
|
|
108 |
<target name="release-diff" depends="database" unless="env.HLM_SUBCON">
|
587
|
109 |
<mkdir dir="${doc.build.dir}"/>
|
217
|
110 |
<!-- URL for the database.xml of last major release
|
|
111 |
@type string
|
|
112 |
@scope private
|
|
113 |
-->
|
|
114 |
<property name="last.major.release.database.url" value="${documentation.url.root}/${last.major.helium.version}/database.xml"/>
|
645
|
115 |
<hlm:python failonerror="true">
|
217
|
116 |
import urllib
|
|
117 |
import helium.documentation
|
|
118 |
|
|
119 |
old_db_file = urllib.urlopen(r'${last.major.release.database.url}')
|
628
|
120 |
writer = helium.documentation.APIDeltaWriter(old_db_file.read(), open(r'${database.file}').read())
|
587
|
121 |
writer.write(r'${doc.build.dir}/api_changes.xml')
|
217
|
122 |
</hlm:python>
|
|
123 |
<if>
|
587
|
124 |
<available file="${doc.build.dir}/api_changes.xml"/>
|
217
|
125 |
<then>
|
587
|
126 |
<fmpp sourceFile="${helium.doc.src.dir}/helium_custom/api_changes.rst.ftl" outputFile="${doc.temp.dir}/api_changes.rst">
|
217
|
127 |
<data expandProperties="yes">
|
587
|
128 |
doc: xml(${doc.build.dir}/api_changes.xml)
|
217
|
129 |
old_release: ${last.major.helium.version}
|
|
130 |
new_release: ${helium.version}
|
|
131 |
</data>
|
|
132 |
</fmpp>
|
|
133 |
</then>
|
|
134 |
</if>
|
|
135 |
</target>
|
|
136 |
|
|
137 |
|
|
138 |
<!-- Generate docs for Symbian Foundataion -->
|
|
139 |
<target name="docs-sf">
|
587
|
140 |
<delete dir="${helium.build.dir}"/>
|
217
|
141 |
<antcall target="helium-subcon-release"/>
|
587
|
142 |
<unzip src="${helium.build.dir}/helium_${helium.version}_subcon.zip" dest="${helium.build.dir}/helium_${helium.version}_subcon" overwrite="true" />
|
217
|
143 |
<!---->
|
587
|
144 |
<exec executable="cmd" dir="${helium.build.dir}/helium_${helium.version}_subcon/helium">
|
|
145 |
<env key="HELIUM_HOME" value="${helium.build.dir}/helium_${helium.version}_subcon/helium"/>
|
217
|
146 |
<env key="PYTHONPATH" value="${env.PYTHONPATH}"/>
|
|
147 |
<env key="ANT_ARGS" value="${env.ANT_ARGS}"/>
|
|
148 |
<arg line="/C hlm.bat"/>
|
|
149 |
<arg value="docs"/>
|
|
150 |
<arg value="-Dpython.tools=${python.tools}"/>
|
|
151 |
<arg value="-Dsf=true"/>
|
|
152 |
</exec>
|
|
153 |
</target>
|
|
154 |
|
|
155 |
|
|
156 |
<!-- Connect to home drive if it is not connected for .netrc file. -->
|
|
157 |
<target name="check-home-drive">
|
|
158 |
<exec executable="cmd">
|
|
159 |
<arg value="/c"/>
|
|
160 |
<arg value="${helium.dir}/tools/common/bin/check_home_drv.bat"/>
|
|
161 |
<arg value=">nul"/>
|
|
162 |
</exec>
|
|
163 |
</target>
|
|
164 |
|
|
165 |
|
|
166 |
<!-- Upload generated HTML docs to the Helium server. -->
|
|
167 |
<target name="upload-docs" depends="check-home-drive">
|
|
168 |
<!-- The full path on the host server where the Helium documentation is stored.
|
|
169 |
@type string
|
|
170 |
@scope private
|
|
171 |
-->
|
|
172 |
<property name="documentation.path" value="${documentation.path.root}"/>
|
587
|
173 |
<property name="docs.zip" value="${doc.build.dir}/helium-docs.zip"/>
|
|
174 |
|
|
175 |
<echo>Uploading docs to ${documentation.path}</echo>
|
217
|
176 |
|
|
177 |
<!-- Python API docs. -->
|
|
178 |
<delete file="${docs.zip}"/>
|
588
|
179 |
<mkdir dir="${doc.build.dir}/javadoc" />
|
|
180 |
<mkdir dir="${doc.build.dir}/doclet" />
|
217
|
181 |
<zip destfile="${docs.zip}">
|
588
|
182 |
<fileset dir="${doc.build.dir}" >
|
|
183 |
<include name="**/*" />
|
|
184 |
<exclude name="doclet/*" />
|
|
185 |
<exclude name="javadoc/*" />
|
|
186 |
</fileset>
|
|
187 |
<zipfileset dir="${doc.build.dir}/javadoc" prefix="helium-antlib/api/javadoc"/>
|
|
188 |
<zipfileset dir="${doc.build.dir}/doclet" prefix="helium-antlib/api/doclet"/>
|
217
|
189 |
</zip>
|
|
190 |
<sshexec host="${documentation.host}"
|
|
191 |
username="${user.name}"
|
|
192 |
keyfile="${env.HOME}/.ssh/id_rsa_openssh.ppk"
|
|
193 |
trust="true"
|
|
194 |
command="mkdir -p ${documentation.path}"/>
|
|
195 |
<scp todir="${user.name}@${documentation.host}:${documentation.path}"
|
|
196 |
keyfile="${env.HOME}/.ssh/id_rsa_openssh.ppk"
|
|
197 |
passphrase=""
|
|
198 |
trust="true"
|
|
199 |
sftp="true"
|
|
200 |
file="${docs.zip}"/>
|
|
201 |
<sshexec host="${documentation.host}"
|
|
202 |
username="${user.name}"
|
|
203 |
keyfile="${env.HOME}/.ssh/id_rsa_openssh.ppk"
|
|
204 |
trust="true"
|
587
|
205 |
command="cd ${documentation.path}; unzip -u -o helium-docs.zip"/>
|
|
206 |
<sshexec host="${documentation.host}"
|
|
207 |
username="${user.name}"
|
|
208 |
keyfile="${env.HOME}/.ssh/id_rsa_openssh.ppk"
|
|
209 |
trust="true"
|
|
210 |
failonerror="false"
|
|
211 |
command="cd ${documentation.path}; chmod -f -R 777 ."/>
|
217
|
212 |
</target>
|
|
213 |
|
|
214 |
|
|
215 |
<!-- Upload generated HTML docs to the Helium server. -->
|
|
216 |
<target name="upload-release-docs">
|
|
217 |
<!-- The full path on the host server where the Helium documentation is stored.
|
|
218 |
@type string
|
|
219 |
@scope private
|
|
220 |
-->
|
|
221 |
<property name="documentation.path" value="${documentation.path.root}/${helium.version}"/>
|
|
222 |
<antcall target="upload-docs"/>
|
|
223 |
</target>
|
|
224 |
|
|
225 |
|
|
226 |
<!-- create slides from images -->
|
|
227 |
<target name="slides">
|
587
|
228 |
<mkdir dir="${doc.build.dir}/slides"/>
|
217
|
229 |
|
587
|
230 |
<copy todir="${doc.build.dir}/slides">
|
217
|
231 |
<fileset dir="${doc.src.dir}/slides"/>
|
|
232 |
</copy>
|
|
233 |
|
587
|
234 |
<copy todir="${doc.build.dir}/slides/images">
|
217
|
235 |
<fileset dir="${doc.src.dir}/slides/images"/>
|
|
236 |
</copy>
|
|
237 |
|
|
238 |
<for param="document">
|
587
|
239 |
<fileset dir="${doc.build.dir}/slides" includes="**/*.rst"/>
|
217
|
240 |
<sequential>
|
|
241 |
<propertyregex property="document.no.ext" input="@{document}" regexp="\.rst$" replace="" override="true"/>
|
|
242 |
<if>
|
|
243 |
<not>
|
|
244 |
<uptodate srcfile="@{document}" targetfile="${document.no.ext}.html"/>
|
|
245 |
</not>
|
|
246 |
<then>
|
|
247 |
<echo>Building doc: @{document}</echo>
|
|
248 |
<exec executable="python" dir="${doc.src.dir}" failonerror="${failonerror}">
|
|
249 |
<arg value="${nokia.python.tools}/rst2s5.py"/>
|
|
250 |
<arg value="@{document}"/>
|
|
251 |
<arg value="${document.no.ext}.html"/>
|
|
252 |
</exec>
|
|
253 |
</then>
|
|
254 |
</if>
|
|
255 |
</sequential>
|
|
256 |
</for>
|
|
257 |
</target>
|
|
258 |
|
|
259 |
|
|
260 |
<!-- Generate HTML documentation from .rst documents. Used for DP
|
|
261 |
|
|
262 |
TODO: Refactor to just have one target. -->
|
|
263 |
<target name="textdocs-old" depends="overview-to-html">
|
587
|
264 |
<mkdir dir="${doc.build.dir}"/>
|
|
265 |
<copy todir="${doc.build.dir}-old">
|
|
266 |
<fileset dir="${doc.src.dir}" excludes="cover.rst"/>
|
217
|
267 |
<fileset dir="${nokia.dir}/doc/src"/>
|
|
268 |
</copy>
|
587
|
269 |
<!--
|
|
270 |
<copy todir="${doc.build.dir}-old/images">
|
217
|
271 |
<fileset dir="${doc.src.dir}/images"/>
|
|
272 |
</copy>
|
587
|
273 |
-->
|
217
|
274 |
<for param="document">
|
587
|
275 |
<fileset dir="${doc.build.dir}-old">
|
217
|
276 |
<include name="**/*.rst" />
|
|
277 |
<exclude name="index.rst" /><!-- index.rst is the top-level doc for new-style docs -->
|
|
278 |
</fileset>
|
|
279 |
<sequential>
|
|
280 |
<propertyregex property="document.no.ext" input="@{document}" regexp="\.rst$" replace="" override="true"/>
|
|
281 |
<if>
|
|
282 |
<not>
|
|
283 |
<uptodate srcfile="@{document}" targetfile="${document.no.ext}.html"/>
|
|
284 |
</not>
|
|
285 |
<then>
|
|
286 |
<echo>Building doc: @{document}</echo>
|
|
287 |
<exec executable="python" dir="${doc.src.dir}" failonerror="${failonerror}">
|
|
288 |
<!--<env key="PYTHONPATH" value="${helium.dir}\${python25.lib};tools\common\python\lib"/>-->
|
|
289 |
<arg value="${nokia.python.tools}\rst2html.py"/>
|
|
290 |
<arg line="--traceback --no-toc-backlinks"/>
|
|
291 |
<!-- -stylesheet-path nokia_style.css -->
|
|
292 |
<arg value="@{document}"/>
|
|
293 |
<arg value="${document.no.ext}.html"/>
|
|
294 |
</exec>
|
|
295 |
</then>
|
|
296 |
</if>
|
|
297 |
</sequential>
|
|
298 |
</for>
|
|
299 |
</target>
|
|
300 |
|
|
301 |
|
|
302 |
<!-- Search Python internal module used in helium -->
|
|
303 |
<target name="find-python-dependencies" depends="database">
|
|
304 |
<hlm:assertPropertySet property="helium.dir" message="Property helium.dir is not defined." />
|
|
305 |
<hlm:assertPropertySet property="database.file" message="Property database.file is not defined."/>
|
|
306 |
<hlm:python failonerror="true">
|
|
307 |
import re
|
|
308 |
import os
|
|
309 |
import amara
|
|
310 |
import codecs
|
|
311 |
import ant
|
|
312 |
import docs
|
|
313 |
|
|
314 |
setpath = r'${helium.dir}'+'/tools'
|
|
315 |
|
|
316 |
print "Searching under "+setpath
|
|
317 |
|
|
318 |
dbPath = r'${database.file}'
|
|
319 |
dbPath = 'file:///'+ dbPath.replace('\\','/')
|
|
320 |
dbPrj = amara.parse(dbPath)
|
|
321 |
|
|
322 |
docs.find_python_dependencies(setpath, dbPath, dbPrj)
|
|
323 |
|
|
324 |
file_object = codecs.open(r'${database.file}', 'w', "utf_8")
|
|
325 |
file_object.write(dbPrj.xml(indent=u"yes"))
|
|
326 |
file_object.close()
|
|
327 |
</hlm:python>
|
|
328 |
</target>
|
|
329 |
|
|
330 |
|
|
331 |
<!-- Reads the Java libraries and extracts a list of their versions. -->
|
|
332 |
<target name="library-versions">
|
|
333 |
<script language="jython" setbeans="false">
|
|
334 |
import java.io
|
|
335 |
import java.util.jar
|
628
|
336 |
antlibsDir = java.io.File('external/antlibs2')
|
217
|
337 |
print antlibsDir
|
|
338 |
jarFiles = antlibsDir.listFiles()
|
|
339 |
for jar in jarFiles:
|
|
340 |
if jar.getName().endswith('jar'):
|
|
341 |
jarFile = java.util.jar.JarFile(jar)
|
|
342 |
manifest = jarFile.getManifest()
|
|
343 |
attributes = manifest.getMainAttributes()
|
|
344 |
implementationVersion = attributes.getValue('Implementation-Version')
|
|
345 |
print jar.getName() + ': ' + str(implementationVersion)
|
|
346 |
</script>
|
|
347 |
</target>
|
|
348 |
|
|
349 |
|
|
350 |
<!-- Generates a subcon dependancy diagram based on Egg and Jars files -->
|
|
351 |
<target name="dependency-diagram-subcon">
|
|
352 |
<fileset id="subcon.jar.files" dir="${helium.dir}">
|
587
|
353 |
<include name="external/antlibs2/*.jar"/>
|
217
|
354 |
</fileset>
|
|
355 |
<antcall target="dependency-diagram">
|
|
356 |
<reference refid="subcon.jar.files" torefid="jar.files"/>
|
|
357 |
<param name="python.exclude.dir" value="${helium.dir}\external\python\lib\2.5\internal"/>
|
587
|
358 |
<param name="dependency.grph" value="${doc.build.dir}/images/dependencies_subcon.grph"/>
|
217
|
359 |
<param name="subcon" value="true"/>
|
|
360 |
</antcall>
|
|
361 |
</target>
|
|
362 |
|
|
363 |
|
|
364 |
<fileset id="jar.files" dir="${helium.dir}">
|
628
|
365 |
<include name="external/antlibs2/*.jar"/>
|
217
|
366 |
</fileset>
|
|
367 |
|
|
368 |
|
|
369 |
<!-- Generates a dependancy diagram based on Egg and Jars files -->
|
|
370 |
<target name="dependency-diagram">
|
587
|
371 |
<mkdir dir="${doc.temp.dir}"/>
|
217
|
372 |
<!-- Location of dependency.grph
|
|
373 |
@type string
|
|
374 |
@scope private
|
|
375 |
-->
|
587
|
376 |
<property name="dependency.grph" value="${doc.temp.dir}/dependencies.grph"/>
|
217
|
377 |
|
|
378 |
<!---->
|
587
|
379 |
<copy todir="${doc.temp.dir}/dependencylibs" flatten="true">
|
217
|
380 |
<fileset refid="jar.files"/>
|
|
381 |
</copy>
|
|
382 |
|
587
|
383 |
<hlm:antdependency outputFile="${doc.temp.dir}/antdependencies.grph">
|
|
384 |
<fileset dir="${doc.temp.dir}/dependencylibs" includes="*.jar"/>
|
217
|
385 |
</hlm:antdependency>
|
|
386 |
|
|
387 |
<taskdef name="jaranalyzer" classname="com.kirkk.analyzer.textui.JarAnalyzerTask"/>
|
587
|
388 |
<jaranalyzer srcdir="${doc.temp.dir}/dependencylibs" destfile="${dependency.grph}" summaryclass="com.kirkk.analyzer.textui.DOTSummary"/>
|
217
|
389 |
|
587
|
390 |
<loadfile srcfile="${doc.temp.dir}/antdependencies.grph" property="antdependencies"/>
|
217
|
391 |
<replace file="${dependency.grph}" token="}" value="${antdependencies}}"/>
|
|
392 |
|
|
393 |
<antcall target="dependency-grouping"/>
|
|
394 |
|
645
|
395 |
<exec executable="dot" failonerror="true">
|
217
|
396 |
<arg line="-Tpng -Grankdir=LR -Nshape=box -Nfontsize=9 -Nwidth=0.3 -Nheight=0.2 ${dependency.grph} -O"/>
|
|
397 |
</exec>
|
|
398 |
|
587
|
399 |
<delete dir="${doc.temp.dir}/dependencylibs"/>
|
217
|
400 |
</target>
|
|
401 |
|
|
402 |
|
|
403 |
<!-- @scope private -->
|
|
404 |
<target name="dependency-grouping">
|
|
405 |
<!-- Location of dependency.grph
|
|
406 |
@type string
|
|
407 |
@scope private
|
|
408 |
-->
|
587
|
409 |
<property name="dependency.grph" value="${doc.temp.dir}/dependencies.grph"/>
|
217
|
410 |
<!-- Location of nokia internal python library
|
|
411 |
@type string
|
|
412 |
-->
|
|
413 |
<property name="python.internal.dir" value="${nokia.dir}\external\python\lib\2.5"/>
|
|
414 |
<!-- subcon
|
|
415 |
@type string
|
|
416 |
-->
|
|
417 |
<property name="subcon" value=""/>
|
|
418 |
<!-- Ivy configuration file
|
|
419 |
@type string
|
|
420 |
@scope private
|
|
421 |
-->
|
|
422 |
<property name="ivy.xml.file" value="${helium.dir}/config/ivy/ivy.xml"/>
|
645
|
423 |
<hlm:python failonerror="true">
|
217
|
424 |
import os
|
|
425 |
import dependancygraph
|
|
426 |
|
|
427 |
dependancygraph.createGraph(r'${ivy.xml.file}', r'${dependency.grph}', r'${python.dir}', r'${python.internal.dir}', r'${subcon}')
|
|
428 |
</hlm:python>
|
|
429 |
<!--
|
|
430 |
<exec executable="dot">
|
|
431 |
<arg line="-Tpng -Grankdir=LR -Nshape=box -Nfontsize=9 -Nwidth=0.3 -Nheight=0.2 ${dependency.egg.grph} -O"/>
|
|
432 |
</exec>
|
|
433 |
-->
|
|
434 |
</target>
|
|
435 |
|
|
436 |
|
|
437 |
<!-- Generates a dependancy diagram of ant projects to helium external files -->
|
|
438 |
<target name="dependency-external">
|
|
439 |
<!-- Location of dependencies_external.grph
|
|
440 |
@type string
|
|
441 |
@scope private
|
|
442 |
-->
|
587
|
443 |
<property name="dependency.external.grph" value="${doc.temp.dir}/dependencies_external.grph"/>
|
217
|
444 |
<copy file="${database.file}" tofile="${database.file}.parsed" overwrite="true">
|
|
445 |
<filterchain>
|
|
446 |
<expandproperties/>
|
|
447 |
</filterchain>
|
|
448 |
</copy>
|
|
449 |
<hlm:python>
|
|
450 |
import os
|
|
451 |
import dependancygraph
|
|
452 |
|
|
453 |
dependancygraph.externalDependancies(r'${database.file}.parsed', r'${dependency.external.grph}')
|
|
454 |
</hlm:python>
|
|
455 |
<!---->
|
|
456 |
<exec executable="dot">
|
|
457 |
<arg line="-Tpng -Grankdir=LR -Nshape=box -Nfontsize=9 -Nwidth=0.3 -Nheight=0.2 ${dependency.external.grph} -O"/>
|
|
458 |
</exec>
|
|
459 |
</target>
|
|
460 |
|
|
461 |
|
|
462 |
<!-- Convert db file. @scope private-->
|
|
463 |
<target name="dependency-db-convert" depends="database">
|
|
464 |
<copy file="${database.file}" tofile="${database.file}.parsed" overwrite="true">
|
|
465 |
<filterchain>
|
|
466 |
<expandproperties/>
|
|
467 |
</filterchain>
|
|
468 |
</copy>
|
|
469 |
</target>
|
|
470 |
|
|
471 |
|
|
472 |
<!-- Generates a dependancy diagram of log files -->
|
|
473 |
<target name="dependency-logs">
|
587
|
474 |
<mkdir dir="${doc.temp.dir}/manual"/>
|
217
|
475 |
<!-- Location of dependencies_external.grph
|
|
476 |
@type string
|
|
477 |
@scope private
|
|
478 |
-->
|
587
|
479 |
<property name="dependency.external.grph" value="${doc.temp.dir}/manual/dependencies_log.grph"/>
|
217
|
480 |
|
|
481 |
<antcall target="dependency-db-convert" inheritAll="false">
|
|
482 |
<param name="build.drive" value="build.drive"/>
|
|
483 |
<param name="build.id" value="build.id"/>
|
|
484 |
<param name="build.log.dir" value="/output/logs"/>
|
|
485 |
</antcall>
|
587
|
486 |
<delete dir="${helium.dir}/build.drive"/>
|
|
487 |
|
|
488 |
<hlm:python failonerror="true">
|
217
|
489 |
import os
|
|
490 |
import dependancygraph
|
|
491 |
|
|
492 |
dependancygraph.findLogFiles(r'${database.file}.parsed', r'${dependency.external.grph}')
|
|
493 |
</hlm:python>
|
|
494 |
<!---->
|
645
|
495 |
<exec executable="dot" failonerror="true">
|
217
|
496 |
<arg line="-Tpng -Grankdir=LR -Nshape=box -Nfontsize=9 -Nwidth=0.3 -Nheight=0.2 ${dependency.external.grph} -O"/>
|
|
497 |
</exec>
|
|
498 |
</target>
|
|
499 |
|
|
500 |
|
|
501 |
<!-- Creates user flow diagram -->
|
|
502 |
<target name="helium-user-graph">
|
587
|
503 |
<mkdir dir="${doc.build.dir}/api"/>
|
|
504 |
<fmpp sourcefile="${helium.dir}/doc/src/user_graph.dot.ftl" outputfile="${doc.temp.dir}/user_graph.dot">
|
217
|
505 |
<data expandProperties="yes">
|
|
506 |
ant: antProperties()
|
|
507 |
</data>
|
|
508 |
</fmpp>
|
|
509 |
<for param="dot.file">
|
587
|
510 |
<fileset dir="${doc.temp.dir}" includes="user_graph.dot"/>
|
217
|
511 |
<sequential>
|
|
512 |
<echo>Processing dot file: @{dot.file}</echo>
|
645
|
513 |
<exec executable="dot" dir="${doc.temp.dir}/" failonerror="true">
|
217
|
514 |
<arg line="-Tcmap @{dot.file} -O"/>
|
|
515 |
</exec>
|
645
|
516 |
<exec executable="dot" dir="${doc.build.dir}/api" failonerror="true">
|
217
|
517 |
<arg line="-Tpng @{dot.file} -O"/>
|
|
518 |
</exec>
|
|
519 |
</sequential>
|
|
520 |
</for>
|
587
|
521 |
<!-- This must have special handling because the rst file uses raw HTML to include it. -->
|
|
522 |
<move todir="${doc.build.dir}" overwrite="true">
|
|
523 |
<fileset dir="${doc.temp.dir}" includes="user_graph.dot.png"/>
|
217
|
524 |
</move>
|
|
525 |
</target>
|
|
526 |
|
|
527 |
</project>
|