buildframework/helium/tools/compile/qt/qt.ant.xml
changeset 587 85df38eb4012
parent 217 0f5e3a7fb6af
child 628 7c4a911dc066
equal deleted inserted replaced
217:0f5e3a7fb6af 587:85df38eb4012
    41     <!-- Setting default arguments to qMake command line, if the qmakeArgs is defined from the system definition file then those arguments are discarded.
    41     <!-- Setting default arguments to qMake command line, if the qmakeArgs is defined from the system definition file then those arguments are discarded.
    42     @type string
    42     @type string
    43     -->
    43     -->
    44     <property name="qt.qmake.default.args" value="-r"/>
    44     <property name="qt.qmake.default.args" value="-r"/>
    45 
    45 
       
    46     <!--* @property qmake.enabled
       
    47     Enables the run of qMake over a build configuration so bld.inf and mmps are generated for the build.
       
    48     @type boolean
       
    49     @scope public
       
    50     -->
       
    51     
    46     <!--
    52     <!--
    47         Executing qmake on all Qt components defined under the system definition file.
    53         Executing qmake on all Qt components defined under the system definition file.
    48         It must use schema v1.5.0+, and Qt unit must define a proFile attibute.   
    54         It must use schema v1.5.0+, and Qt unit must define a proFile attibute.   
    49      -->
    55      -->
    50     <target name="run-qmake" if="qmake.enabled">
    56     <target name="run-qmake">
    51         <!-- Generating the build steps from the sysdef information -->
       
    52         <hlm:generate-layers />
       
    53         <if>
    57         <if>
    54             <or>
    58             <istrue value="${qmake.enabled}" />
    55                 <equals arg1="${build.system}" arg2="ec-helium" />
       
    56                 <equals arg1="${build.system}" arg2="sbs-ec" />
       
    57             </or>
       
    58             <then>
    59             <then>
    59                 <fmpp sourceFile="${qt.qmake.makefile.template}"
    60                 <!-- Generating the build steps from the sysdef information -->
    60                     outputFile="${temp.build.dir}/run-qmake-${sysdef.configuration}.mk">
    61                 <hlm:generate-layers />
    61                     <data expandProperties="yes">
    62                 <if>
    62                         data: xml(${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}.xml)
    63                     <or>
    63                         ant: antProperties()
    64                         <equals arg1="${build.system}" arg2="ec-helium" />
    64                     </data>
    65                         <equals arg1="${build.system}" arg2="sbs-ec" />
    65                 </fmpp>
    66                     </or>
    66                 <hlm:assertFileExists file="${temp.build.dir}/run-qmake-${sysdef.configuration}.mk" />
    67                     <then>
       
    68                         <fmpp sourceFile="${qt.qmake.makefile.template}"
       
    69                             outputFile="${temp.build.dir}/run-qmake-${sysdef.configuration}.mk">
       
    70                             <data expandProperties="yes">
       
    71                                 data: xml(${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}.xml)
       
    72                                 ant: antProperties()
       
    73                             </data>
       
    74                         </fmpp>
       
    75                         <hlm:assertFileExists file="${temp.build.dir}/run-qmake-${sysdef.configuration}.mk" />
    67     
    76     
    68                 <!-- Running the qmake steps -->
    77                         <!-- Running the qmake steps -->
    69                 <hlm:emakeMacro name="run-qmake-${sysdef.configuration}" makefile="${temp.build.dir}/run-qmake-${sysdef.configuration}.mk"
    78                         <hlm:emakeMacro name="run-qmake-${sysdef.configuration}" makefile="${temp.build.dir}/run-qmake-${sysdef.configuration}.mk"
    70                     target="all" dir="${build.drive}/" log="${compile.log.dir}/${build.id}_${sysdef.configuration}.qmake.log"
    79                                 target="all" dir="${build.drive}/" log="${compile.log.dir}/${build.id}_${sysdef.configuration}.qmake.log"
    71                     annodetail="basic,history,file,waiting"
    80                                 annodetail="basic,history,file,waiting"
    72                     failonerror="false" 
    81                                 failonerror="false" 
    73                     phase="compile"/>
    82                                 phase="compile"/>
    74                 <hlm:assertFileExists file="${compile.log.dir}/${build.id}_${sysdef.configuration}.qmake.log" />
    83                         <hlm:assertFileExists file="${compile.log.dir}/${build.id}_${sysdef.configuration}.qmake.log" />
       
    84                     </then>
       
    85                     <else>
       
    86                         <fmpp sourceFile="${qt.qmake.ant.template}"
       
    87                             outputFile="${temp.build.dir}/run-qmake-${sysdef.configuration}.ant.xml">
       
    88                             <data expandProperties="yes">
       
    89                                 data: xml(${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}.xml)
       
    90                                 ant: antProperties()
       
    91                             </data>
       
    92                         </fmpp>
       
    93                         <hlm:assertFileExists file="${temp.build.dir}/run-qmake-${sysdef.configuration}.ant.xml" />
       
    94     
       
    95                         <!-- Running the qmake steps -->
       
    96                         <ant antfile="${temp.build.dir}/run-qmake-${sysdef.configuration}.ant.xml" dir="${build.drive}/"
       
    97                             output="${compile.log.dir}/${build.id}_${sysdef.configuration}.qmake.log"/>
       
    98                         <hlm:assertFileExists file="${compile.log.dir}/${build.id}_${sysdef.configuration}.qmake.log" />
       
    99                     </else>
       
   100                 </if>
       
   101                 <copy file="${compile.log.dir}/${build.id}_${sysdef.configuration}.qmake.log" tofile="${compile.log.dir}/${build.id}_${sysdef.configuration}.qmake.generated.txt">
       
   102                     <filterchain>
       
   103                         <linecontainsregexp>
       
   104                             <regexp pattern="Generating"/>
       
   105                         </linecontainsregexp>
       
   106                     </filterchain>
       
   107                 </copy>
       
   108                 <replaceregexp file="${compile.log.dir}/${build.id}_${sysdef.configuration}.qmake.generated.txt" match="^\s*(?:\[exec\])?\s*Generating[^/\\]*." replace="" byline="true"/>
       
   109                 <hlm:assertFileExists file="${compile.log.dir}/${build.id}_${sysdef.configuration}.qmake.generated.txt"/>
       
   110                 <hlm:metadatarecord database="${metadata.dbfile}">
       
   111                     <hlm:textmetadatainput>
       
   112                         <fileset casesensitive="false" file="${compile.log.dir}/${build.id}_${sysdef.configuration}.qmake.log" />
       
   113                         <metadatafilterset refid="filterset.qmake" />
       
   114                     </hlm:textmetadatainput>
       
   115                 </hlm:metadatarecord>
       
   116                 <hlm:signalMacro logfile="${build.id}_${sysdef.configuration}.qmake.log" 
       
   117                     signal.input="signalRunQMakeInput" phase="compile"/>
    75             </then>
   118             </then>
    76             <else>
   119             <else>
    77                 <fmpp sourceFile="${qt.qmake.ant.template}"
   120                 <echo>Skipping qmake step, because qmake.enabled is not set to true.</echo>
    78                     outputFile="${temp.build.dir}/run-qmake-${sysdef.configuration}.ant.xml">
       
    79                     <data expandProperties="yes">
       
    80                         data: xml(${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}.xml)
       
    81                         ant: antProperties()
       
    82                     </data>
       
    83                 </fmpp>
       
    84                 <hlm:assertFileExists file="${temp.build.dir}/run-qmake-${sysdef.configuration}.ant.xml" />
       
    85     
       
    86                 <!-- Running the qmake steps -->
       
    87                 <ant antfile="${temp.build.dir}/run-qmake-${sysdef.configuration}.ant.xml" dir="${build.drive}/"
       
    88                     output="${compile.log.dir}/${build.id}_${sysdef.configuration}.qmake.log"/>
       
    89                 <hlm:assertFileExists file="${compile.log.dir}/${build.id}_${sysdef.configuration}.qmake.log" />
       
    90             </else>
   121             </else>
    91         </if>
   122         </if>
    92         <copy file="${compile.log.dir}/${build.id}_${sysdef.configuration}.qmake.log" tofile="${compile.log.dir}/${build.id}_${sysdef.configuration}.qmake.generated.txt">
       
    93             <filterchain>
       
    94                 <linecontainsregexp>
       
    95                     <regexp pattern="Generating"/>
       
    96                 </linecontainsregexp>
       
    97             </filterchain>
       
    98         </copy>
       
    99         <replaceregexp file="${compile.log.dir}/${build.id}_${sysdef.configuration}.qmake.generated.txt" match="^\s*(?:\[exec\])?\s*Generating[^/\\]*." replace="" byline="true"/>
       
   100         <hlm:assertFileExists file="${compile.log.dir}/${build.id}_${sysdef.configuration}.qmake.generated.txt"/>
       
   101         <hlm:metadatarecord database="${metadata.dbfile}">
       
   102             <hlm:textmetadatainput>
       
   103                 <fileset casesensitive="false" file="${compile.log.dir}/${build.id}_${sysdef.configuration}.qmake.log" />
       
   104                 <metadatafilterset refid="filterset.qmake" />
       
   105             </hlm:textmetadatainput>
       
   106         </hlm:metadatarecord>
       
   107         <hlm:signalMacro logfile="${build.id}_${sysdef.configuration}.qmake.log" 
       
   108             signal.input="signalRunQMakeInput" phase="compile"/>
       
   109     </target>
   123     </target>
       
   124 
   110 </project>
   125 </project>