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