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