buildframework/helium/tools/rombuild/rombuild.ant.xml
author Daniel Jacobs <daniel.jacobs@nokia.com>
Wed, 19 May 2010 14:17:41 +0100
changeset 556 8e705bc1286f
parent 217 0f5e3a7fb6af
child 587 85df38eb4012
permissions -rw-r--r--
Added tag 2.14.0 for changeset e7dd8533063f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     1
<?xml version="1.0" encoding="UTF-8"?>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     2
<!-- 
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     3
============================================================================ 
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     4
Name        : rombuild.ant.xml 
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     5
Part of     : Helium 
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     6
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     7
Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     8
All rights reserved.
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     9
This component and the accompanying materials are made available
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    10
under the terms of the License "Eclipse Public License v1.0"
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    11
which accompanies this distribution, and is available
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    12
at the URL "http://www.eclipse.org/legal/epl-v10.html".
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    13
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    14
Initial Contributors:
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    15
Nokia Corporation - initial contribution.
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    16
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    17
Contributors:
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    18
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    19
Description:
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    20
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    21
============================================================================
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    22
-->
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    23
<!--* @package rombuild -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    24
<project name="rombuild" xmlns:hlm="http://www.nokia.com/helium">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    25
    <description>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    26
        ROM image creation using iMaker.
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    27
        Flash config file generation.
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    28
    </description>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    29
    <import file="imaker.ant.xml" />
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    30
    
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    31
    <!--* @property ee.rom.output.dir
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    32
    /output/development_flash_images/engineering_english/logs
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    33
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    34
    @editable required
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    35
    @scope public
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    36
    -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    37
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    38
    <!--* @property core.rom.output.dir
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    39
    /output/release_flash_images/rnd/core
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    40
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    41
    @editable required
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    42
    @scope public
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    43
    -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    44
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    45
    <!-- should be overriden - default configuration -->
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    46
    <!-- The path to the iMaker executable file.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    47
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    48
    @scope private
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    49
    -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    50
    <property name="imaker.command" location="${build.drive}\epoc32\tools\imaker.cmd" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    51
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    52
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    53
    <!--
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    54
        Creates subcon certified rom images.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    55
        The build will be based on the hlm:imakerconfigurationset referenced
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    56
        as 'imaker.subcon.rom.config'.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    57
     -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    58
    <target name="subcon-roms">
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    59
        <if>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    60
            <isreference refid="imaker.subcon.rom.config" />
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    61
            <then>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    62
                <antcall target="build-roms">
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    63
                    <param name="imaker.rom.name" value="_subcon_roms" />
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    64
                    <reference refid="imaker.subcon.rom.config" torefid="imaker.rom.config"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    65
                </antcall>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    66
            </then>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    67
            <else>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    68
                <echo>Configuration 'imaker.subcon.rom.config' not defined. Skipping subcon-roms build.</echo>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    69
            </else>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    70
        </if>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    71
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    72
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    73
    <!-- Internal target to export iMaker Helium additions. @scope private-->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    74
    <target name="rombuild-export-features">
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    75
        <copy todir="${build.drive}/epoc32/rom/config" overwrite="true">
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    76
            <fileset dir="${helium.dir}/tools/rombuild/features" casesensitive="false">
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    77
                <include name="*.mk" />
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    78
            </fileset>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    79
        </copy>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    80
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    81
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    82
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    83
    <!--
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    84
        Creates trace rom images.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    85
        The build will be based on the hlm:imakerconfigurationset referenced
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    86
        as 'imaker.trace.rom.config'.
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    87
     -->
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    88
    <target name="trace-roms">
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    89
        <if>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    90
            <isreference refid="imaker.trace.rom.config" />
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    91
            <then>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    92
                <antcall target="build-roms">
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    93
                    <param name="imaker.rom.name" value="_trace_roms" />
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    94
                    <reference refid="imaker.trace.rom.config" torefid="imaker.rom.config"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    95
                </antcall>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    96
            </then>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    97
            <else>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    98
                <echo>Configuration 'imaker.trace.rom.config' not defined. Skipping trace-roms build.</echo>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    99
            </else>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   100
        </if>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   101
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   102
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   103
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   104
    <!-- Internal iMaker macro. @scope private -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   105
    <macrodef name="internalImakerMacro" uri="http://www.nokia.com/helium">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   106
        <attribute name="product" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   107
        <attribute name="target" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   108
        <attribute name="makefile" default="" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   109
        <attribute name="cmd" default="" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   110
        <sequential>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   111
            <var name="rom.product.path" unset="true" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   112
            <script language="jython" setbeans="false">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   113
                <![CDATA[
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   114
import imaker
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   115
import os
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   116
os.chdir(project.getProperty('build.drive') + os.sep)
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   117
project.setProperty('rom.product.path', imaker.get_product_dir(r'@{product}'))
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   118
              ]]>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   119
            </script>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   120
            <if>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   121
                <equals arg1="@{makefile}" arg2="" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   122
                <then>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   123
                    <var name="var.makefile" value="" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   124
                </then>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   125
                <else>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   126
                    <var name="var.makefile" value="-f ${rom.product.path}/@{makefile}" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   127
                </else>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   128
            </if>
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   129
            <exec executable="${imaker.command}" dir="${build.drive}/" failonerror="${failonerror}">
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   130
                <arg line="-p@{product} @{cmd}" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   131
                <arg line="${var.makefile}" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   132
                <arg line="@{cmd}" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   133
                <arg value="@{target}" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   134
            </exec>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   135
        </sequential>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   136
    </macrodef>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   137
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   138
</project>