buildframework/helium/builder/build.xml
author wbernard
Tue, 27 Apr 2010 08:33:08 +0300
changeset 587 85df38eb4012
child 588 c7c26511138f
permissions -rw-r--r--
helium_9.0-a7879c935424
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     1
<?xml version="1.0" encoding="UTF-8"?>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     2
<!-- 
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     3
============================================================================ 
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     4
Name        : build.xml 
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     5
Part of     : Helium AntLib
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     6
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     7
Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     8
All rights reserved.
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     9
This component and the accompanying materials are made available
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    10
under the terms of the License "Eclipse Public License v1.0"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    11
which accompanies this distribution, and is available
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    12
at the URL "http://www.eclipse.org/legal/epl-v10.html".
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    13
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    14
Initial Contributors:
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    15
Nokia Corporation - initial contribution.
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    16
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    17
Contributors:
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    18
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    19
Description:
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    20
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    21
============================================================================
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    22
-->
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    23
<project name="helium-builder" default="build" xmlns:au="antlib:org.apache.ant.antunit" xmlns:ivy="antlib:org.apache.ivy.ant" xmlns:ac="antlib:net.sf.antcontrib">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    24
    <property environment="env" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    25
    <taskdef name="fmpp" classname="fmpp.tools.AntTask" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    26
    <import file="delivery.ant.xml" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    27
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    28
    <!-- Ensuring that only Ant 1.7.0 is in use. -->
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    29
    <ac:if>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    30
        <not>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    31
            <contains string="${ant.version}" substring="1.7.0" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    32
        </not>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    33
        <then>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    34
            <fail message="Your current ant version is ${ant.version}, you must use 1.7.0" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    35
        </then>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    36
    </ac:if>            
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    37
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    38
    <condition property="platform" value="win32" else="unix">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    39
        <os family="windows"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    40
    </condition>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    41
    <dirname property="builder.dir" file="${ant.file.helium-builder}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    42
    <property name="source.root.dir" location="${builder.dir}/.." />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    43
    <property name="build.temp.dir" location="${source.root.dir}/build" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    44
    <property name="components.temp.dir" location="${build.temp.dir}/components" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    45
    <property name="component" value="*" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    46
    <property name="component.type" value="*" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    47
    <property name="component.root" value="*" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    48
    <property name="config" value="sf" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    49
    <property name="sf.delivery.zip" location="${build.temp.dir}/helium-sf-src.zip" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    50
    <property name="binary.delivery.zip" location="${build.temp.dir}/helium-bin.zip" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    51
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    52
    <fileset id="ant.build.files" dir="${source.root.dir}">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    53
        <include name="${component.root}/${component.type}/${component}/build.xml" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    54
        <exclude name="*builder/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    55
        <exclude name="*/*builder/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    56
        <exclude name="tools/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    57
        <exclude name="config/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    58
        <exclude name="doc/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    59
        <exclude name="external/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    60
        <exclude name="extensions/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    61
        <exclude name="licences/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    62
        <exclude name="tests/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    63
        <exclude name="build/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    64
    </fileset>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    65
  
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    66
    <target name="cleanup" description="Cleanup (delete the temp build directory)">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    67
        <delete dir="${build.temp.dir}" failonerror="false"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    68
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    69
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    70
    <target name="get-build-list">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    71
        <ivy:buildlist reference="ivy.buildlist.path">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    72
            <fileset refid="ant.build.files"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    73
        </ivy:buildlist>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    74
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    75
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    76
    <target name="report" depends="get-build-list" description="Create Ivy report for each component">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    77
        <subant target="report" buildpathref="ivy.buildlist.path">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    78
            <property name="builder.dir" location="${builder.dir}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    79
        </subant>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    80
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    81
  
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    82
    <target name="compile" depends="get-build-list">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    83
        <subant target="compile" buildpathref="ivy.buildlist.path">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    84
            <property name="builder.dir" location="${builder.dir}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    85
            <property name="source.root.dir" value="${source.root.dir}"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    86
        </subant>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    87
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    88
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    89
    <target name="build" depends="get-build-list" description="Build each component">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    90
        <subant target="package" buildpathref="ivy.buildlist.path">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    91
            <property name="builder.dir" location="${builder.dir}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    92
            <property name="source.root.dir" value="${source.root.dir}"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    93
            <property name="platform" value="${platform}"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    94
        </subant>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    95
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    96
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    97
    <target name="clean" depends="get-build-list" description="Run clean on each component">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    98
        <subant target="clean" buildpathref="ivy.buildlist.path">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    99
            <property name="builder.dir" location="${builder.dir}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   100
            <property name="source.root.dir" value="${source.root.dir}"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   101
        </subant>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   102
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   103
  
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   104
    <target name="test" depends="get-build-list,build" description="Run test on each component">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   105
        <ac:for param="file" keepgoing="true">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   106
            <path refid="ivy.buildlist.path" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   107
            <sequential>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   108
                <echo>Testing: @{file}</echo>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   109
                <ant antfile="@{file}" dir="@{file}/.." target="test" inheritAll="false">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   110
                    <property name="builder.dir" location="${builder.dir}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   111
                </ant>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   112
            </sequential>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   113
        </ac:for>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   114
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   115
    <!-- TODO: remove after CI tools are cleaned up -->
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   116
    <target name="unittest" depends="test"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   117
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   118
    <target name="junit" depends="get-build-list" description="Run junit on each component">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   119
        <subant target="junit" buildpathref="ivy.buildlist.path">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   120
            <property name="builder.dir" location="${builder.dir}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   121
        </subant>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   122
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   123
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   124
    <target name="antunit" depends="get-build-list" description="Run antunit on each component">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   125
        <subant target="antunit" buildpathref="ivy.buildlist.path">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   126
            <property name="builder.dir" location="${builder.dir}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   127
        </subant>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   128
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   129
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   130
    <target name="quality" depends="get-build-list" description="Run quality checks on each component">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   131
        <ac:for param="file" keepgoing="true">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   132
            <path refid="ivy.buildlist.path" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   133
            <sequential>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   134
                <echo>Checking @{file}</echo>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   135
                <ant antfile="@{file}" dir="@{file}/.." target="quality" inheritAll="false">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   136
                    <property name="builder.dir" location="${builder.dir}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   137
                    <property name="source.root.dir" value="${source.root.dir}"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   138
                    <property name="platform" value="${platform}"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   139
                </ant>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   140
            </sequential>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   141
        </ac:for>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   142
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   143
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   144
    <target name="checkstyle" depends="get-build-list" description="Run checkstyle on each component">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   145
        <ac:for param="file" keepgoing="true">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   146
            <path refid="ivy.buildlist.path" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   147
            <sequential>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   148
                <ant antfile="@{file}" dir="@{file}/.." target="checkstyle" inheritAll="false">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   149
                    <property name="builder.dir" location="${builder.dir}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   150
                    <property name="source.root.dir" value="${source.root.dir}"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   151
                    <property name="platform" value="${platform}"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   152
                </ant>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   153
            </sequential>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   154
        </ac:for>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   155
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   156
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   157
    <target name="get-deps" description="Retrieving Helium dependencies">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   158
        <ac:if>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   159
            <not>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   160
                <isset property="config" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   161
            </not>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   162
            <then>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   163
                <fail message="config is not defined." />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   164
            </then>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   165
        </ac:if>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   166
        <echo>Using ${config} configuration.</echo>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   167
        <delete>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   168
            <fileset dir="${build.temp.dir}" includes="ivy/com.nokia.helium.config/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   169
        </delete>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   170
        <ivy:settings file="${source.root.dir}/${config}/settings/ivysettings.xml" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   171
        
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   172
        <!-- the call to resolve is not mandatory, retrieve makes an implicit call if we don't -->
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   173
        <ivy:resolve organisation="com.nokia.helium.config" module="helium-${config}-config" revision="1.0" inline="true" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   174
        <ivy:retrieve sync="true" conf="default" organisation="com.nokia.helium.config"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   175
            module="helium-${config}-config" revision="1.0"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   176
            inline="true" type="jar"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   177
            pattern="${source.root.dir}/external/antlibs2/[artifact]-[revision].[ext]" />        
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   178
        <ivy:retrieve sync="true" conf="default" organisation="com.nokia.helium.config"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   179
            module="helium-${config}-config" revision="1.0"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   180
            inline="true" type="egg"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   181
            pattern="${source.root.dir}/external/python/lib/auto/[artifact]-[revision].[ext]" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   182
        <fileset id="egg.deps.fileset" dir="${source.root.dir}/external/python/lib/auto" includes="*.egg" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   183
        <fmpp sourceFile="template/easy-install.pth.ftl" outputFile="${source.root.dir}/external/python/lib/auto/easy-install.pth">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   184
            <data>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   185
                project: antProject()
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   186
            </data>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   187
        </fmpp>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   188
        
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   189
        <fileset id="egg.hlm.deps.fileset" dir="${source.root.dir}">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   190
            <include name="external/python/**/*.egg" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   191
            <exclude name="**/2.5/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   192
        </fileset>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   193
        <fmpp sourceFile="template/configure_jython.bat.ftl" outputFile="${source.root.dir}/external/python/configure_jython.bat">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   194
            <data>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   195
                project: antProject()
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   196
            </data>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   197
        </fmpp>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   198
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   199
        <fmpp sourceFile="template/configure_jython.sh.ftl" outputFile="${source.root.dir}/external/python/configure_jython.sh">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   200
            <data>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   201
                project: antProject()
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   202
            </data>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   203
        </fmpp>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   204
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   205
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   206
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   207
    <target name="build-helium-docs" unless="skip.docs">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   208
        <exec osfamily="windows" executable="${source.root.dir}/hlm.bat" dir="${source.root.dir}">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   209
            <arg value="docs"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   210
        </exec>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   211
        <exec osfamily="unix" executable="${source.root.dir}/hlm" dir="${source.root.dir}">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   212
            <arg value="docs"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   213
        </exec>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   214
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   215
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   216
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   217
    <target name="zip-releasable">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   218
        <delete file="${binary.delivery.zip}" failonerror="false" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   219
        <zip destfile="${binary.delivery.zip}">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   220
            <zipfileset id="zip.content" dir="${source.root.dir}" prefix="helium">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   221
                <include name="hlm.bat" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   222
                <include name="helium*.ant.xml" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   223
                <include name="build.xml" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   224
                <include name="tools/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   225
                <include name="config/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   226
                <include name="extensions/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   227
                <include name="external/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   228
                <include name="licenses/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   229
                <include name="tests/minibuilds/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   230
                <exclude name="config/version.txt.orig" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   231
                <exclude name="**/distribution.policy.S60" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   232
            </zipfileset>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   233
            <zipfileset id="zip.doc" dir="${source.root.dir}/build" prefix="helium">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   234
                <include name="doc/**" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   235
                <exclude name="**/distribution.policy.S60" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   236
            </zipfileset>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   237
            <zipfileset id="zip.executable" dir="${source.root.dir}" prefix="helium" filemode="755">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   238
                <include name="hlm" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   239
            </zipfileset>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   240
        </zip>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   241
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   242
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   243
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   244
    <target name="get-helium-revision">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   245
        <exec executable="hg" outputproperty="hg.helium.revision">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   246
            <arg value="id" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   247
            <arg value="--id" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   248
        </exec>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   249
        <ac:propertyregex property="helium.revision"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   250
                    input="${hg.helium.revision}"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   251
                    regexp="([a-f0-9]+).*"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   252
                    replace="\1"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   253
                    casesensitive="false" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   254
        <echo message="Revision set to: ${helium.revision}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   255
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   256
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   257
    <target name="update-version" depends="get-helium-revision">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   258
        <ac:if>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   259
            <available file="${source.root.dir}/config/version.txt.orig" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   260
            <then>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   261
                <move file="${source.root.dir}/config/version.txt.orig" tofile="${source.root.dir}/config/version.txt" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   262
            </then>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   263
        </ac:if>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   264
        <copy file="${source.root.dir}/config/version.txt" tofile="${source.root.dir}/config/version.txt.orig" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   265
        <property file="${source.root.dir}/config/version.txt" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   266
        <propertyfile file="${source.root.dir}/config/version.txt" comment="Helium version - DO NOT EDIT">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   267
            <entry key="helium.version" value="${helium.version}-r${helium.revision}"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   268
        </propertyfile>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   269
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   270
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   271
    <target name="restore-version">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   272
        <move file="${source.root.dir}/config/version.txt.orig" tofile="${source.root.dir}/config/version.txt" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   273
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   274
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   275
    <target name="create-releasable" depends="get-deps,update-version,build-helium-docs,zip-releasable,restore-version" description="Create releasable binary package"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   276
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   277
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   278
    <target name="textdoc">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   279
        <delete dir="${build.temp.dir}/doc/doctmp" failonerror="false"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   280
        <copy todir="${build.temp.dir}/doc/doctmp" overwrite="true">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   281
            <fileset dir="${source.root.dir}/sf/doc/src"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   282
        </copy>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   283
        <copy todir="${build.temp.dir}/doc/doctmp" overwrite="true" flatten="true">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   284
            <fileset dir="${source.root.dir}" includes="*/java/*/**/*.rst"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   285
            <fileset dir="${source.root.dir}" includes="*/python/*/**/*.rst"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   286
        </copy>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   287
        <rstMacro version="1.0" src="${build.temp.dir}/doc/doctmp"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   288
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   289
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   290
    <!-- Macro to generate html docs from rst. -->
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   291
    <macrodef name="rstMacro">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   292
        <attribute name="version"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   293
        <attribute name="src" default="${source.root.dir}/sf/doc/src"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   294
        <attribute name="output" default="${build.temp.dir}/doc/text"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   295
        <sequential>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   296
            <property name="sphinx.lib.dir" location="${builder.dir}/tools/sphinx/Sphinx-0.5.1-py2.5.egg/sphinx" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   297
            <exec executable="python" failonerror="${failonerror}">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   298
                <env key="PYTHONPATH" path="${builder.dir}/tools/sphinx" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   299
                <arg file="${builder.dir}/tools/sphinx/sphinx-build.py"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   300
                <arg value="-b" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   301
                <arg value="html" />            
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   302
                <arg value="-D" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   303
                <arg value="version=@{version}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   304
                <arg value="-D" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   305
                <arg value="release=@{version}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   306
                <arg file="@{src}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   307
                <arg file="@{output}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   308
            </exec>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   309
        </sequential>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   310
    </macrodef>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   311
</project>