buildframework/helium/tools/compile/qt/qt.ant.xml
changeset 628 7c4a911dc066
parent 587 85df38eb4012
child 645 b8d81fa19e7d
equal deleted inserted replaced
588:c7c26511138f 628:7c4a911dc066
    44     <property name="qt.qmake.default.args" value="-r"/>
    44     <property name="qt.qmake.default.args" value="-r"/>
    45 
    45 
    46     <!--* @property qmake.enabled
    46     <!--* @property qmake.enabled
    47     Enables the run of qMake over a build configuration so bld.inf and mmps are generated for the build.
    47     Enables the run of qMake over a build configuration so bld.inf and mmps are generated for the build.
    48     @type boolean
    48     @type boolean
       
    49     @editable required
    49     @scope public
    50     @scope public
    50     -->
    51     -->
       
    52     
       
    53     <!--* @property internal.qmake.enabled
       
    54     To run qmake based targets if qmake.enabled set to true.
       
    55     @type boolean
       
    56     @scope private
       
    57     -->
       
    58     
       
    59     <!-- Check, is qmake is enabled -->
       
    60     <condition property="internal.qmake.enabled">
       
    61         <istrue value="${qmake.enabled}"/>
       
    62     </condition>
    51     
    63     
    52     <!--
    64     <!--
    53         Executing qmake on all Qt components defined under the system definition file.
    65         Executing qmake on all Qt components defined under the system definition file.
    54         It must use schema v1.5.0+, and Qt unit must define a proFile attibute.   
    66         It must use schema v1.5.0+, and Qt unit must define a proFile attibute.   
    55      -->
    67      -->
    56     <target name="run-qmake">
    68     <target name="run-qmake" if="internal.qmake.enabled">
       
    69         <!-- Generating the build steps from the sysdef information -->
    57         <if>
    70         <if>
    58             <istrue value="${qmake.enabled}" />
    71             <istrue value="${sysdef3.enabled}" />
    59             <then>
    72             <then>
    60                 <!-- Generating the build steps from the sysdef information -->
    73                 <if>
       
    74                     <isreference refid="sysdef.filters.${sysdef.configuration}" />
       
    75                     <then>
       
    76                         <hlm:filterSysdef epocroot="${build.drive}/" srcfile="${canonical.sysdef.file}" 
       
    77                             destfile="${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}.xml">
       
    78                             <filterSet refid="sysdef.filters.${sysdef.configuration}" />
       
    79                         </hlm:filterSysdef>
       
    80                     </then>
       
    81                     <else>
       
    82                         <echo message="The sysdef.filters.${sysdef.configuration} sysdefFilterSet is not defined." />
       
    83                         <copy file="${canonical.sysdef.file}"
       
    84                             tofile="${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}.xml" />
       
    85                     </else>
       
    86                 </if>
       
    87             </then>
       
    88             <else>
    61                 <hlm:generate-layers />
    89                 <hlm:generate-layers />
    62                 <if>
    90             </else>
    63                     <or>
    91         </if>
    64                         <equals arg1="${build.system}" arg2="ec-helium" />
    92         <if>
    65                         <equals arg1="${build.system}" arg2="sbs-ec" />
    93             <or>
    66                     </or>
    94                 <equals arg1="${build.system}" arg2="ec-helium" />
    67                     <then>
    95                 <equals arg1="${build.system}" arg2="sbs-ec" />
    68                         <fmpp sourceFile="${qt.qmake.makefile.template}"
    96             </or>
    69                             outputFile="${temp.build.dir}/run-qmake-${sysdef.configuration}.mk">
    97             <then>
    70                             <data expandProperties="yes">
    98                 <fmpp sourceFile="${qt.qmake.makefile.template}" outputFile="${temp.build.dir}/run-qmake-${sysdef.configuration}.mk">
    71                                 data: xml(${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}.xml)
    99                     <data expandProperties="yes">
    72                                 ant: antProperties()
   100                         data: xml(${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}.xml)
    73                             </data>
   101                         ant: antProperties()
    74                         </fmpp>
   102                     </data>
    75                         <hlm:assertFileExists file="${temp.build.dir}/run-qmake-${sysdef.configuration}.mk" />
   103                 </fmpp>
    76     
   104                 <hlm:assertFileExists file="${temp.build.dir}/run-qmake-${sysdef.configuration}.mk" />
    77                         <!-- Running the qmake steps -->
   105                 <!-- Running the qmake steps -->
    78                         <hlm:emakeMacro name="run-qmake-${sysdef.configuration}" makefile="${temp.build.dir}/run-qmake-${sysdef.configuration}.mk"
   106                 <hlm:emakeMacro name="run-qmake-${sysdef.configuration}" makefile="${temp.build.dir}/run-qmake-${sysdef.configuration}.mk"
    79                                 target="all" dir="${build.drive}/" log="${compile.log.dir}/${build.id}_${sysdef.configuration}.qmake.log"
   107                                 target="all" dir="${build.drive}/" log="${compile.log.dir}/${build.id}_${sysdef.configuration}.qmake.log"
    80                                 annodetail="basic,history,file,waiting"
   108                                 annodetail="basic,history,file,waiting"
    81                                 failonerror="false" 
   109                                 failonerror="false" 
    82                                 phase="compile"/>
   110                                 phase="compile"/>
    83                         <hlm:assertFileExists file="${compile.log.dir}/${build.id}_${sysdef.configuration}.qmake.log" />
   111                 <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"/>
       
   118             </then>
   112             </then>
   119             <else>
   113             <else>
   120                 <echo>Skipping qmake step, because qmake.enabled is not set to true.</echo>
   114                 <fmpp sourceFile="${qt.qmake.ant.template}" outputFile="${temp.build.dir}/run-qmake-${sysdef.configuration}.ant.xml">
       
   115                     <data expandProperties="yes">
       
   116                         data: xml(${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}.xml)
       
   117                         ant: antProperties()
       
   118                     </data>
       
   119                 </fmpp>
       
   120                 <hlm:assertFileExists file="${temp.build.dir}/run-qmake-${sysdef.configuration}.ant.xml" />
       
   121     
       
   122                 <!-- Running the qmake steps -->
       
   123                 <ant antfile="${temp.build.dir}/run-qmake-${sysdef.configuration}.ant.xml" dir="${build.drive}/"
       
   124                     output="${compile.log.dir}/${build.id}_${sysdef.configuration}.qmake.log"/>
       
   125                 <hlm:assertFileExists file="${compile.log.dir}/${build.id}_${sysdef.configuration}.qmake.log" />
   121             </else>
   126             </else>
   122         </if>
   127         </if>
       
   128         <copy file="${compile.log.dir}/${build.id}_${sysdef.configuration}.qmake.log" tofile="${compile.log.dir}/${build.id}_${sysdef.configuration}.qmake.generated.txt">
       
   129             <filterchain>
       
   130                 <linecontainsregexp>
       
   131                     <regexp pattern="Generating"/>
       
   132                 </linecontainsregexp>
       
   133             </filterchain>
       
   134         </copy>
       
   135         <replaceregexp file="${compile.log.dir}/${build.id}_${sysdef.configuration}.qmake.generated.txt" match="^\s*(?:\[exec\])?\s*Generating[^/\\]*." replace="" byline="true"/>
       
   136         <hlm:assertFileExists file="${compile.log.dir}/${build.id}_${sysdef.configuration}.qmake.generated.txt"/>
       
   137         <hlm:metadatarecord database="${metadata.dbfile}">
       
   138             <hlm:textmetadatainput>
       
   139                 <fileset casesensitive="false" file="${compile.log.dir}/${build.id}_${sysdef.configuration}.qmake.log" />
       
   140                 <metadatafilterset refid="filterset.qmake" />
       
   141             </hlm:textmetadatainput>
       
   142         </hlm:metadatarecord>
       
   143         <hlm:signalMacro logfile="${compile.log.dir}/${build.id}_${sysdef.configuration}.qmake.log" 
       
   144                     signal.input="signalRunQMakeInput" phase="compile"/>
   123     </target>
   145     </target>
   124 
   146 
   125 </project>
   147 </project>