buildframework/helium/tools/rombuild/rombuild.ant.xml
author srilekhas <srilekhas@symbian.org>
Wed, 18 Aug 2010 11:18:38 +0100
changeset 627 cb3264f4c6e6
parent 587 85df38eb4012
permissions -rw-r--r--
Merge : re-applies missing part of fix for Bug 2901,Add export for s60ibymacros.pm
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
    
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    31
    <!-- should be overriden - default configuration -->
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    32
    <!-- The path to the iMaker executable file.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    33
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    34
    @scope private
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    35
    -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    36
    <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
    37
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    38
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    39
    <!--
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    40
        Creates subcon certified rom images.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    41
        The build will be based on the hlm:imakerconfigurationset referenced
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    42
        as 'imaker.subcon.rom.config'.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    43
     -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    44
    <target name="subcon-roms">
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    45
        <if>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    46
            <isreference refid="imaker.subcon.rom.config" />
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    47
            <then>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    48
                <antcall target="build-roms">
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    49
                    <param name="imaker.rom.name" value="_subcon_roms" />
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    50
                    <reference refid="imaker.subcon.rom.config" torefid="imaker.rom.config"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    51
                </antcall>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    52
            </then>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    53
            <else>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    54
                <echo>Configuration 'imaker.subcon.rom.config' not defined. Skipping subcon-roms build.</echo>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    55
            </else>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    56
        </if>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    57
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    58
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    59
    <!-- Internal target to export iMaker Helium additions. @scope private-->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    60
    <target name="rombuild-export-features">
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    61
        <copy todir="${build.drive}/epoc32/rom/config" overwrite="true">
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    62
            <fileset dir="${helium.dir}/tools/rombuild/features" casesensitive="false">
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    63
                <include name="*.mk" />
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    64
            </fileset>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    65
        </copy>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    66
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    67
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    68
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    69
    <!--
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    70
        Creates trace rom images.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    71
        The build will be based on the hlm:imakerconfigurationset referenced
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    72
        as 'imaker.trace.rom.config'.
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    73
     -->
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    74
    <target name="trace-roms">
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    75
        <if>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    76
            <isreference refid="imaker.trace.rom.config" />
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    77
            <then>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    78
                <antcall target="build-roms">
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    79
                    <param name="imaker.rom.name" value="_trace_roms" />
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    80
                    <reference refid="imaker.trace.rom.config" torefid="imaker.rom.config"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    81
                </antcall>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    82
            </then>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    83
            <else>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    84
                <echo>Configuration 'imaker.trace.rom.config' not defined. Skipping trace-roms build.</echo>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    85
            </else>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    86
        </if>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    87
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    88
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    89
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    90
    <!-- Internal iMaker macro. @scope private -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    91
    <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
    92
        <attribute name="product" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    93
        <attribute name="target" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    94
        <attribute name="makefile" default="" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    95
        <attribute name="cmd" default="" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    96
        <sequential>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    97
            <var name="rom.product.path" unset="true" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    98
            <script language="jython" setbeans="false">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    99
                <![CDATA[
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   100
import imaker
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   101
import os
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   102
os.chdir(project.getProperty('build.drive') + os.sep)
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   103
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
   104
              ]]>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   105
            </script>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   106
            <if>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   107
                <equals arg1="@{makefile}" arg2="" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   108
                <then>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   109
                    <var name="var.makefile" value="" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   110
                </then>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   111
                <else>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   112
                    <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
   113
                </else>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   114
            </if>
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   115
            <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
   116
                <arg line="-p@{product} @{cmd}" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   117
                <arg line="${var.makefile}" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   118
                <arg line="@{cmd}" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   119
                <arg value="@{target}" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   120
            </exec>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   121
        </sequential>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   122
    </macrodef>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   123
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   124
</project>