common/templates/run-qmake.ant.xml.ftl
author Shabe Razvi <shaber@symbian.org>
Thu, 29 Apr 2010 23:13:14 +0100
changeset 1022 b89c1ad56824
parent 1018 334e3f2f79e5
child 1023 ebfa9f019473
permissions -rw-r--r--
Run qmake on Qt package before Orbit
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>
1022
b89c1ad56824 Run qmake on Qt package before Orbit
Shabe Razvi <shaber@symbian.org>
parents: 1018
diff changeset
     9
          <#if (unit.@proFile=="projects.pro")>
b89c1ad56824 Run qmake on Qt package before Orbit
Shabe Razvi <shaber@symbian.org>
parents: 1018
diff changeset
    10
                <echo>Running qmake for ${unit.@bldFile}/${unit.@proFile}</echo>
b89c1ad56824 Run qmake on Qt package before Orbit
Shabe Razvi <shaber@symbian.org>
parents: 1018
diff changeset
    11
                <if>
b89c1ad56824 Run qmake on Qt package before Orbit
Shabe Razvi <shaber@symbian.org>
parents: 1018
diff changeset
    12
                    <available file="${r'$'}{build.drive}/${unit.@bldFile}" type="dir"/>
b89c1ad56824 Run qmake on Qt package before Orbit
Shabe Razvi <shaber@symbian.org>
parents: 1018
diff changeset
    13
                    <then>
b89c1ad56824 Run qmake on Qt package before Orbit
Shabe Razvi <shaber@symbian.org>
parents: 1018
diff changeset
    14
                        <exec executable="cmd" dir="${r'$'}{build.drive}/${unit.@bldFile}" failonerror="false">
b89c1ad56824 Run qmake on Qt package before Orbit
Shabe Razvi <shaber@symbian.org>
parents: 1018
diff changeset
    15
                            <arg value="/C"/>
b89c1ad56824 Run qmake on Qt package before Orbit
Shabe Razvi <shaber@symbian.org>
parents: 1018
diff changeset
    16
                            <arg value="qmake"/>
b89c1ad56824 Run qmake on Qt package before Orbit
Shabe Razvi <shaber@symbian.org>
parents: 1018
diff changeset
    17
                            <!-- arg value="-listgen"/ -->
b89c1ad56824 Run qmake on Qt package before Orbit
Shabe Razvi <shaber@symbian.org>
parents: 1018
diff changeset
    18
                            <#if unit.@qmakeArgs[0]??>
b89c1ad56824 Run qmake on Qt package before Orbit
Shabe Razvi <shaber@symbian.org>
parents: 1018
diff changeset
    19
                            <arg line="${unit.@qmakeArgs?xml}"/>
b89c1ad56824 Run qmake on Qt package before Orbit
Shabe Razvi <shaber@symbian.org>
parents: 1018
diff changeset
    20
                            <#else>
b89c1ad56824 Run qmake on Qt package before Orbit
Shabe Razvi <shaber@symbian.org>
parents: 1018
diff changeset
    21
                            <arg line="${ant['qt.qmake.default.args']?xml}"/>
b89c1ad56824 Run qmake on Qt package before Orbit
Shabe Razvi <shaber@symbian.org>
parents: 1018
diff changeset
    22
                            </#if>
b89c1ad56824 Run qmake on Qt package before Orbit
Shabe Razvi <shaber@symbian.org>
parents: 1018
diff changeset
    23
                            <arg value="${unit.@proFile?xml}"/>
b89c1ad56824 Run qmake on Qt package before Orbit
Shabe Razvi <shaber@symbian.org>
parents: 1018
diff changeset
    24
                        </exec>
b89c1ad56824 Run qmake on Qt package before Orbit
Shabe Razvi <shaber@symbian.org>
parents: 1018
diff changeset
    25
                    </then>
b89c1ad56824 Run qmake on Qt package before Orbit
Shabe Razvi <shaber@symbian.org>
parents: 1018
diff changeset
    26
                    <else>
b89c1ad56824 Run qmake on Qt package before Orbit
Shabe Razvi <shaber@symbian.org>
parents: 1018
diff changeset
    27
                       <echo message="ERROR: Directory ${r'$'}{build.drive}/${unit.@bldFile} doesn't exist."/>
b89c1ad56824 Run qmake on Qt package before Orbit
Shabe Razvi <shaber@symbian.org>
parents: 1018
diff changeset
    28
                    </else>
b89c1ad56824 Run qmake on Qt package before Orbit
Shabe Razvi <shaber@symbian.org>
parents: 1018
diff changeset
    29
                </if>          
b89c1ad56824 Run qmake on Qt package before Orbit
Shabe Razvi <shaber@symbian.org>
parents: 1018
diff changeset
    30
	  </#if>
b89c1ad56824 Run qmake on Qt package before Orbit
Shabe Razvi <shaber@symbian.org>
parents: 1018
diff changeset
    31
    </#list>
b89c1ad56824 Run qmake on Qt package before Orbit
Shabe Razvi <shaber@symbian.org>
parents: 1018
diff changeset
    32
            </sequential>
b89c1ad56824 Run qmake on Qt package before Orbit
Shabe Razvi <shaber@symbian.org>
parents: 1018
diff changeset
    33
            <sequential>
b89c1ad56824 Run qmake on Qt package before Orbit
Shabe Razvi <shaber@symbian.org>
parents: 1018
diff changeset
    34
    <#list data["//unit/@proFile/.."] as unit>
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
    35
          <#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
    36
                <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
    37
                <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
    38
                    <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
    39
                    <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
    40
                        <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
    41
                            <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
    42
                            <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
    43
                            <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
    44
                        </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
    45
                    </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
    46
                    <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
    47
                       <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
    48
                    </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
    49
                </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
    50
                <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
    51
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
    52
                <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
    53
                <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
    54
	  </#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
    55
    </#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
    56
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
    57
            </sequential>
979
6c90564578a6 Update qmake template to run Orbit's configure.py tool
Shabe Razvi <shaber@symbian.org>
parents: 971
diff changeset
    58
971
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    59
        <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
    60
    <#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
    61
            <sequential>
979
6c90564578a6 Update qmake template to run Orbit's configure.py tool
Shabe Razvi <shaber@symbian.org>
parents: 971
diff changeset
    62
6c90564578a6 Update qmake template to run Orbit's configure.py tool
Shabe Razvi <shaber@symbian.org>
parents: 971
diff changeset
    63
          <#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
    64
971
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    65
                <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
    66
                <if>
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    67
                    <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
    68
                    <then>
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    69
                        <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
    70
                            <arg value="/C"/>
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    71
                            <arg value="qmake"/>
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    72
                            <!-- arg value="-listgen"/ -->
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    73
                            <#if unit.@qmakeArgs[0]??>
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    74
                            <arg line="${unit.@qmakeArgs?xml}"/>
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    75
                            <#else>
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    76
                            <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
    77
                            </#if>
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    78
                            <arg value="${unit.@proFile?xml}"/>
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    79
                        </exec>
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    80
                    </then>
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    81
                    <else>
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    82
                       <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
    83
                    </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
    84
                </if>          
979
6c90564578a6 Update qmake template to run Orbit's configure.py tool
Shabe Razvi <shaber@symbian.org>
parents: 971
diff changeset
    85
	  </#if>
6c90564578a6 Update qmake template to run Orbit's configure.py tool
Shabe Razvi <shaber@symbian.org>
parents: 971
diff changeset
    86
6c90564578a6 Update qmake template to run Orbit's configure.py tool
Shabe Razvi <shaber@symbian.org>
parents: 971
diff changeset
    87
971
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    88
            </sequential>
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    89
    </#list>
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    90
        </parallel>
979
6c90564578a6 Update qmake template to run Orbit's configure.py tool
Shabe Razvi <shaber@symbian.org>
parents: 971
diff changeset
    91
6c90564578a6 Update qmake template to run Orbit's configure.py tool
Shabe Razvi <shaber@symbian.org>
parents: 971
diff changeset
    92
    </then>
6c90564578a6 Update qmake template to run Orbit's configure.py tool
Shabe Razvi <shaber@symbian.org>
parents: 971
diff changeset
    93
    </if>
971
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    94
    </target>
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    95
    
35d8126bcf87 Use qt.qmake.ant.template property for custom qmake template
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    96
</project>