buildframework/helium/tools/compile/qt/qt.ant.xml
author wbernard
Wed, 23 Dec 2009 19:29:07 +0200
changeset 179 d8ac696cc51f
parent 1 be27ed110b50
child 217 0f5e3a7fb6af
permissions -rw-r--r--
helium_7.0-r14027

<?xml version="1.0"?>
<!--
============================================================================
Name        : qt.ant.xml
Part of     : Helium

Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved.
This component and the accompanying materials are made available
under the terms of the License "Eclipse Public License v1.0"
which accompanies this distribution, and is available
at the URL "http://www.eclipse.org/legal/epl-v10.html".

Initial Contributors:
Nokia Corporation - initial contribution.

Contributors:

Description:

============================================================================
-->
<project name="qt" xmlns:hlm="http://www.nokia.com/helium">
    <description>
    Qt build support.
    </description>
    
    <property name="qt.qmake.ant.template" location="${helium.dir}/tools/compile/qt/templates/run-qmake.ant.xml.ftl" />
    <property name="qt.qmake.makefile.template" location="${helium.dir}/tools/compile/qt/templates/run-qmake.mk.ftl" />
    <property name="qt.configure.args" value="-platform win32-mwc -xplatform symbian-abld -confirm-license"/>
    <property name="qt.qmake.default.args" value="-r"/>

    <!--
        Executing qmake on all Qt components defined under the system definition file.
        It must use schema v1.5.0+, and Qt unit must define a proFile attibute.   
     -->
    <target name="run-qmake" if="qmake.enabled">
        <!-- Generating the build steps from the sysdef information -->
        <hlm:generate-layers />
        <if>
            <or>
                <equals arg1="${build.system}" arg2="ec-helium" />
                <equals arg1="${build.system}" arg2="sbs-ec" />
            </or>
            <then>
                <fmpp sourceFile="${qt.qmake.makefile.template}"
                    outputFile="${temp.build.dir}/run-qmake-${sysdef.configuration}.mk">
                    <data expandProperties="yes">
                        data: xml(${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}.xml)
                        ant: antProperties()
                    </data>
                </fmpp>
                <hlm:assertFileExists file="${temp.build.dir}/run-qmake-${sysdef.configuration}.mk" />
    
                <!-- Running the qmake steps -->
                <hlm:emakeMacro name="run-qmake-${sysdef.configuration}" makefile="${temp.build.dir}/run-qmake-${sysdef.configuration}.mk"
                    target="all" dir="${build.drive}/" log="${compile.log.dir}/${build.id}_${sysdef.configuration}.qmake.log"
                    annodetail="basic,history,file,waiting"
                    failonerror="false" 
                    phase="compile"/>
                <hlm:assertFileExists file="${compile.log.dir}/${build.id}_${sysdef.configuration}.qmake.log" />
            </then>
            <else>
                <fmpp sourceFile="${qt.qmake.ant.template}"
                    outputFile="${temp.build.dir}/run-qmake-${sysdef.configuration}.ant.xml">
                    <data expandProperties="yes">
                        data: xml(${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}.xml)
                        ant: antProperties()
                    </data>
                </fmpp>
                <hlm:assertFileExists file="${temp.build.dir}/run-qmake-${sysdef.configuration}.ant.xml" />
    
                <!-- Running the qmake steps -->
                <ant antfile="${temp.build.dir}/run-qmake-${sysdef.configuration}.ant.xml" dir="${build.drive}/"
                    output="${compile.log.dir}/${build.id}_${sysdef.configuration}.qmake.log"/>
                <hlm:assertFileExists file="${compile.log.dir}/${build.id}_${sysdef.configuration}.qmake.log" />
            </else>
        </if>
        <copy file="${compile.log.dir}/${build.id}_${sysdef.configuration}.qmake.log" tofile="${compile.log.dir}/${build.id}_${sysdef.configuration}.qmake.generated.txt">
            <filterchain>
                <linecontainsregexp>
                    <regexp pattern="Generating"/>
                </linecontainsregexp>
            </filterchain>
        </copy>
        <replaceregexp file="${compile.log.dir}/${build.id}_${sysdef.configuration}.qmake.generated.txt" match="^\s*(?:\[exec\])?\s*Generating[^/\\]*." replace="" byline="true"/>
        <hlm:assertFileExists file="${compile.log.dir}/${build.id}_${sysdef.configuration}.qmake.generated.txt"/>
        <hlm:metadatarecord database="${metadata.dbfile}">
            <hlm:textmetadatainput>
                <fileset casesensitive="false" file="${compile.log.dir}/${build.id}_${sysdef.configuration}.qmake.log" />
                <metadatafilterset refid="filterset.qmake" />
            </hlm:textmetadatainput>
        </hlm:metadatarecord>
        <hlm:signalMacro logfile="${build.id}_${sysdef.configuration}.qmake.log" 
            signal.input="signalRunQMakeInput" phase="compile"/>
    </target>
</project>