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