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