buildframework/helium/tools/compile/qt/qt.ant.xml
author andy simpson <andrews@symbian.org>
Fri, 30 Jul 2010 15:14:33 +0100
changeset 622 c26070468a42
parent 587 85df38eb4012
child 628 7c4a911dc066
permissions -rw-r--r--
Add export for s60ibymacros.pm (re-applies missing part of fix for Bug 2901
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"?>
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        : qt.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 compile -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    24
<project name="qt" 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
    Qt build support.
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    27
    </description>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    28
    
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    29
    <!-- The location of the ant template to run qmake commands.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    30
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    31
    -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    32
    <property name="qt.qmake.ant.template" location="${helium.dir}/tools/compile/qt/templates/run-qmake.ant.xml.ftl" />
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    33
    <!-- The location of the makefile template to run qmake commands.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    34
    @type string
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="qt.qmake.makefile.template" location="${helium.dir}/tools/compile/qt/templates/run-qmake.mk.ftl" />
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    37
    <!-- The command lines argument passed to the configure tool.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    38
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    39
    -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    40
    <property name="qt.configure.args" value="-platform win32-mwc -xplatform symbian-abld -confirm-license"/>
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    41
    <!-- Setting default arguments to qMake command line, if the qmakeArgs is defined from the system definition file then those arguments are discarded.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    42
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    43
    -->
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    44
    <property name="qt.qmake.default.args" value="-r"/>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    45
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    46
    <!--* @property qmake.enabled
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    47
    Enables the run of qMake over a build configuration so bld.inf and mmps are generated for the build.
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    48
    @type boolean
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    49
    @scope public
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    50
    -->
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    51
    
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    52
    <!--
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    53
        Executing qmake on all Qt components defined under the system definition file.
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    54
        It must use schema v1.5.0+, and Qt unit must define a proFile attibute.   
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    55
     -->
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    56
    <target name="run-qmake">
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    57
        <if>
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    58
            <istrue value="${qmake.enabled}" />
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    59
            <then>
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    60
                <!-- Generating the build steps from the sysdef information -->
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    61
                <hlm:generate-layers />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    62
                <if>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    63
                    <or>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    64
                        <equals arg1="${build.system}" arg2="ec-helium" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    65
                        <equals arg1="${build.system}" arg2="sbs-ec" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    66
                    </or>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    67
                    <then>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    68
                        <fmpp sourceFile="${qt.qmake.makefile.template}"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    69
                            outputFile="${temp.build.dir}/run-qmake-${sysdef.configuration}.mk">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    70
                            <data expandProperties="yes">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    71
                                data: xml(${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}.xml)
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    72
                                ant: antProperties()
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    73
                            </data>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    74
                        </fmpp>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    75
                        <hlm:assertFileExists file="${temp.build.dir}/run-qmake-${sysdef.configuration}.mk" />
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    76
    
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    77
                        <!-- Running the qmake steps -->
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    78
                        <hlm:emakeMacro name="run-qmake-${sysdef.configuration}" makefile="${temp.build.dir}/run-qmake-${sysdef.configuration}.mk"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    79
                                target="all" dir="${build.drive}/" log="${compile.log.dir}/${build.id}_${sysdef.configuration}.qmake.log"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    80
                                annodetail="basic,history,file,waiting"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    81
                                failonerror="false" 
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    82
                                phase="compile"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    83
                        <hlm:assertFileExists file="${compile.log.dir}/${build.id}_${sysdef.configuration}.qmake.log" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    84
                    </then>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    85
                    <else>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    86
                        <fmpp sourceFile="${qt.qmake.ant.template}"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    87
                            outputFile="${temp.build.dir}/run-qmake-${sysdef.configuration}.ant.xml">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    88
                            <data expandProperties="yes">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    89
                                data: xml(${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}.xml)
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    90
                                ant: antProperties()
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    91
                            </data>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    92
                        </fmpp>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    93
                        <hlm:assertFileExists file="${temp.build.dir}/run-qmake-${sysdef.configuration}.ant.xml" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    94
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    95
                        <!-- Running the qmake steps -->
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    96
                        <ant antfile="${temp.build.dir}/run-qmake-${sysdef.configuration}.ant.xml" dir="${build.drive}/"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    97
                            output="${compile.log.dir}/${build.id}_${sysdef.configuration}.qmake.log"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    98
                        <hlm:assertFileExists file="${compile.log.dir}/${build.id}_${sysdef.configuration}.qmake.log" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    99
                    </else>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   100
                </if>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   101
                <copy file="${compile.log.dir}/${build.id}_${sysdef.configuration}.qmake.log" tofile="${compile.log.dir}/${build.id}_${sysdef.configuration}.qmake.generated.txt">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   102
                    <filterchain>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   103
                        <linecontainsregexp>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   104
                            <regexp pattern="Generating"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   105
                        </linecontainsregexp>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   106
                    </filterchain>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   107
                </copy>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   108
                <replaceregexp file="${compile.log.dir}/${build.id}_${sysdef.configuration}.qmake.generated.txt" match="^\s*(?:\[exec\])?\s*Generating[^/\\]*." replace="" byline="true"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   109
                <hlm:assertFileExists file="${compile.log.dir}/${build.id}_${sysdef.configuration}.qmake.generated.txt"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   110
                <hlm:metadatarecord database="${metadata.dbfile}">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   111
                    <hlm:textmetadatainput>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   112
                        <fileset casesensitive="false" file="${compile.log.dir}/${build.id}_${sysdef.configuration}.qmake.log" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   113
                        <metadatafilterset refid="filterset.qmake" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   114
                    </hlm:textmetadatainput>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   115
                </hlm:metadatarecord>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   116
                <hlm:signalMacro logfile="${build.id}_${sysdef.configuration}.qmake.log" 
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   117
                    signal.input="signalRunQMakeInput" phase="compile"/>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   118
            </then>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   119
            <else>
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   120
                <echo>Skipping qmake step, because qmake.enabled is not set to true.</echo>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   121
            </else>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   122
        </if>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   123
    </target>
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   124
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   125
</project>