common/templates/run-qmake.ant.xml.ftl
author Shabe Razvi <shaber@symbian.org>
Wed, 28 Apr 2010 19:28:01 +0100
changeset 1020 bc818b5bb6d9
parent 1018 334e3f2f79e5
child 1022 b89c1ad56824
permissions -rw-r--r--
Simplify compilation by requiring a prebuilt qmake, which will generate bld.infs first.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
971
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
     1
<?xml version="1.0"?>
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
     2
<project name="run-qmake-${ant['sysdef.configuration']}" default="all">
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
     3
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
     4
    <target name="all">
1016
f4a77e1d1446 Improve guard by checking for qmake.exe rather than qmake.bat
Shabe Razvi <shaber@symbian.org>
parents: 979
diff changeset
     5
    <if><available file="${r'$'}{build.drive}/epoc32/tools/qt/qmake.exe" type="file"/>
979
6c90564578a6 Update qmake template to run Orbit's configure.py tool
Shabe Razvi <shaber@symbian.org>
parents: 971
diff changeset
     6
    <then>
1018
334e3f2f79e5 Update run-qmake template to run Orbit configure.py first, followed by mkspec export. This should allow hb SYSTEMINCLUDEs for subsequently processed .pro files.
Shabe Razvi <shaber@symbian.org>
parents: 1016
diff changeset
     7
            <sequential>
334e3f2f79e5 Update run-qmake template to run Orbit configure.py first, followed by mkspec export. This should allow hb SYSTEMINCLUDEs for subsequently processed .pro files.
Shabe Razvi <shaber@symbian.org>
parents: 1016
diff changeset
     8
    <#list data["//unit/@proFile/.."] as unit>
334e3f2f79e5 Update run-qmake template to run Orbit configure.py first, followed by mkspec export. This should allow hb SYSTEMINCLUDEs for subsequently processed .pro files.
Shabe Razvi <shaber@symbian.org>
parents: 1016
diff changeset
     9
          <#if (unit.@proFile=="hb.pro")>
334e3f2f79e5 Update run-qmake template to run Orbit configure.py first, followed by mkspec export. This should allow hb SYSTEMINCLUDEs for subsequently processed .pro files.
Shabe Razvi <shaber@symbian.org>
parents: 1016
diff changeset
    10
                <echo>Running configure.py for ${unit.@bldFile}/${unit.@proFile}</echo>
334e3f2f79e5 Update run-qmake template to run Orbit configure.py first, followed by mkspec export. This should allow hb SYSTEMINCLUDEs for subsequently processed .pro files.
Shabe Razvi <shaber@symbian.org>
parents: 1016
diff changeset
    11
                <if>
334e3f2f79e5 Update run-qmake template to run Orbit configure.py first, followed by mkspec export. This should allow hb SYSTEMINCLUDEs for subsequently processed .pro files.
Shabe Razvi <shaber@symbian.org>
parents: 1016
diff changeset
    12
                    <available file="${r'$'}{build.drive}/${unit.@bldFile}" type="dir"/>
334e3f2f79e5 Update run-qmake template to run Orbit configure.py first, followed by mkspec export. This should allow hb SYSTEMINCLUDEs for subsequently processed .pro files.
Shabe Razvi <shaber@symbian.org>
parents: 1016
diff changeset
    13
                    <then>
334e3f2f79e5 Update run-qmake template to run Orbit configure.py first, followed by mkspec export. This should allow hb SYSTEMINCLUDEs for subsequently processed .pro files.
Shabe Razvi <shaber@symbian.org>
parents: 1016
diff changeset
    14
                        <exec executable="cmd" dir="${r'$'}{build.drive}/${unit.@bldFile}" failonerror="false">
334e3f2f79e5 Update run-qmake template to run Orbit configure.py first, followed by mkspec export. This should allow hb SYSTEMINCLUDEs for subsequently processed .pro files.
Shabe Razvi <shaber@symbian.org>
parents: 1016
diff changeset
    15
                            <arg value="/C"/>
334e3f2f79e5 Update run-qmake template to run Orbit configure.py first, followed by mkspec export. This should allow hb SYSTEMINCLUDEs for subsequently processed .pro files.
Shabe Razvi <shaber@symbian.org>
parents: 1016
diff changeset
    16
                            <arg value="python"/>
334e3f2f79e5 Update run-qmake template to run Orbit configure.py first, followed by mkspec export. This should allow hb SYSTEMINCLUDEs for subsequently processed .pro files.
Shabe Razvi <shaber@symbian.org>
parents: 1016
diff changeset
    17
                            <arg line ="configure.py --qmake-bin=\epoc32\tools\qmake.bat --qmake-spec=symbian-sbsv2 --platform=symbian --qmake-options=MMP_RULES+=EXPORTUNFROZEN"/>
334e3f2f79e5 Update run-qmake template to run Orbit configure.py first, followed by mkspec export. This should allow hb SYSTEMINCLUDEs for subsequently processed .pro files.
Shabe Razvi <shaber@symbian.org>
parents: 1016
diff changeset
    18
                        </exec>
334e3f2f79e5 Update run-qmake template to run Orbit configure.py first, followed by mkspec export. This should allow hb SYSTEMINCLUDEs for subsequently processed .pro files.
Shabe Razvi <shaber@symbian.org>
parents: 1016
diff changeset
    19
                    </then>
334e3f2f79e5 Update run-qmake template to run Orbit configure.py first, followed by mkspec export. This should allow hb SYSTEMINCLUDEs for subsequently processed .pro files.
Shabe Razvi <shaber@symbian.org>
parents: 1016
diff changeset
    20
                    <else>
334e3f2f79e5 Update run-qmake template to run Orbit configure.py first, followed by mkspec export. This should allow hb SYSTEMINCLUDEs for subsequently processed .pro files.
Shabe Razvi <shaber@symbian.org>
parents: 1016
diff changeset
    21
                       <echo message="ERROR: Directory ${r'$'}{build.drive}/${unit.@bldFile} doesn't exist."/>
334e3f2f79e5 Update run-qmake template to run Orbit configure.py first, followed by mkspec export. This should allow hb SYSTEMINCLUDEs for subsequently processed .pro files.
Shabe Razvi <shaber@symbian.org>
parents: 1016
diff changeset
    22
                    </else>
334e3f2f79e5 Update run-qmake template to run Orbit configure.py first, followed by mkspec export. This should allow hb SYSTEMINCLUDEs for subsequently processed .pro files.
Shabe Razvi <shaber@symbian.org>
parents: 1016
diff changeset
    23
                </if>
334e3f2f79e5 Update run-qmake template to run Orbit configure.py first, followed by mkspec export. This should allow hb SYSTEMINCLUDEs for subsequently processed .pro files.
Shabe Razvi <shaber@symbian.org>
parents: 1016
diff changeset
    24
                <echo>INFO: Exporting Orbit mkspecs to epoc32\tools for ${unit.@bldFile}/${unit.@proFile}</echo>
334e3f2f79e5 Update run-qmake template to run Orbit configure.py first, followed by mkspec export. This should allow hb SYSTEMINCLUDEs for subsequently processed .pro files.
Shabe Razvi <shaber@symbian.org>
parents: 1016
diff changeset
    25
334e3f2f79e5 Update run-qmake template to run Orbit configure.py first, followed by mkspec export. This should allow hb SYSTEMINCLUDEs for subsequently processed .pro files.
Shabe Razvi <shaber@symbian.org>
parents: 1016
diff changeset
    26
                <copy file="${r'$'}{build.drive}/${unit.@bldFile}/hb_install.prf" todir="${r'$'}{build.drive}/epoc32/tools/qt/mkspecs/features" overwrite="true"/>
334e3f2f79e5 Update run-qmake template to run Orbit configure.py first, followed by mkspec export. This should allow hb SYSTEMINCLUDEs for subsequently processed .pro files.
Shabe Razvi <shaber@symbian.org>
parents: 1016
diff changeset
    27
                <copy file="${r'$'}{build.drive}/${unit.@bldFile}/hb.prf"         todir="${r'$'}{build.drive}/epoc32/tools/qt/mkspecs/features" overwrite="true"/>
334e3f2f79e5 Update run-qmake template to run Orbit configure.py first, followed by mkspec export. This should allow hb SYSTEMINCLUDEs for subsequently processed .pro files.
Shabe Razvi <shaber@symbian.org>
parents: 1016
diff changeset
    28
	  </#if>
334e3f2f79e5 Update run-qmake template to run Orbit configure.py first, followed by mkspec export. This should allow hb SYSTEMINCLUDEs for subsequently processed .pro files.
Shabe Razvi <shaber@symbian.org>
parents: 1016
diff changeset
    29
    </#list>
334e3f2f79e5 Update run-qmake template to run Orbit configure.py first, followed by mkspec export. This should allow hb SYSTEMINCLUDEs for subsequently processed .pro files.
Shabe Razvi <shaber@symbian.org>
parents: 1016
diff changeset
    30
334e3f2f79e5 Update run-qmake template to run Orbit configure.py first, followed by mkspec export. This should allow hb SYSTEMINCLUDEs for subsequently processed .pro files.
Shabe Razvi <shaber@symbian.org>
parents: 1016
diff changeset
    31
            </sequential>
979
6c90564578a6 Update qmake template to run Orbit's configure.py tool
Shabe Razvi <shaber@symbian.org>
parents: 971
diff changeset
    32
971
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    33
        <parallel threadCount="${r'$'}{number.of.threads}">
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    34
    <#list data["//unit/@proFile/.."] as unit>
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    35
            <sequential>
979
6c90564578a6 Update qmake template to run Orbit's configure.py tool
Shabe Razvi <shaber@symbian.org>
parents: 971
diff changeset
    36
6c90564578a6 Update qmake template to run Orbit's configure.py tool
Shabe Razvi <shaber@symbian.org>
parents: 971
diff changeset
    37
          <#if (unit.@proFile!="hb.pro")>
6c90564578a6 Update qmake template to run Orbit's configure.py tool
Shabe Razvi <shaber@symbian.org>
parents: 971
diff changeset
    38
971
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    39
                <echo>Running qmake for ${unit.@bldFile}/${unit.@proFile}</echo>
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    40
                <if>
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    41
                    <available file="${r'$'}{build.drive}/${unit.@bldFile}" type="dir"/>
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    42
                    <then>
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    43
                        <exec executable="cmd" dir="${r'$'}{build.drive}/${unit.@bldFile}" failonerror="false">
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    44
                            <arg value="/C"/>
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    45
                            <arg value="qmake"/>
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    46
                            <!-- arg value="-listgen"/ -->
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    47
                            <#if unit.@qmakeArgs[0]??>
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    48
                            <arg line="${unit.@qmakeArgs?xml}"/>
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    49
                            <#else>
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    50
                            <arg line="${ant['qt.qmake.default.args']?xml}"/>
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    51
                            </#if>
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    52
                            <arg value="${unit.@proFile?xml}"/>
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    53
                        </exec>
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    54
                    </then>
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    55
                    <else>
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    56
                       <echo message="ERROR: Directory ${r'$'}{build.drive}/${unit.@bldFile} doesn't exist."/>
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    57
                    </else>
1018
334e3f2f79e5 Update run-qmake template to run Orbit configure.py first, followed by mkspec export. This should allow hb SYSTEMINCLUDEs for subsequently processed .pro files.
Shabe Razvi <shaber@symbian.org>
parents: 1016
diff changeset
    58
                </if>          
979
6c90564578a6 Update qmake template to run Orbit's configure.py tool
Shabe Razvi <shaber@symbian.org>
parents: 971
diff changeset
    59
	  </#if>
6c90564578a6 Update qmake template to run Orbit's configure.py tool
Shabe Razvi <shaber@symbian.org>
parents: 971
diff changeset
    60
6c90564578a6 Update qmake template to run Orbit's configure.py tool
Shabe Razvi <shaber@symbian.org>
parents: 971
diff changeset
    61
971
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    62
            </sequential>
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    63
    </#list>
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    64
        </parallel>
979
6c90564578a6 Update qmake template to run Orbit's configure.py tool
Shabe Razvi <shaber@symbian.org>
parents: 971
diff changeset
    65
6c90564578a6 Update qmake template to run Orbit's configure.py tool
Shabe Razvi <shaber@symbian.org>
parents: 971
diff changeset
    66
    </then>
6c90564578a6 Update qmake template to run Orbit's configure.py tool
Shabe Razvi <shaber@symbian.org>
parents: 971
diff changeset
    67
    </if>
971
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    68
    </target>
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    69
    
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    70
</project>