sf-platform/compile.ant.xml
changeset 1283 dcbd9aa4a422
parent 1282 6a4e549c6310
child 1284 6d59ffe91cb2
equal deleted inserted replaced
1282:6a4e549c6310 1283:dcbd9aa4a422
     8     
     8     
     9     <antcall target="sf-do-compile" inheritAll="false" inheritRefs="true">
     9     <antcall target="sf-do-compile" inheritAll="false" inheritRefs="true">
    10         <param name="sysdef.configurations.list" value="${sf.spec.os.sysdef.clean.configurations.list}" />
    10         <param name="sysdef.configurations.list" value="${sf.spec.os.sysdef.clean.configurations.list}" />
    11         <reference refid="sf.spec.os.system.definition.files" torefid="system.definition.files" />
    11         <reference refid="sf.spec.os.system.definition.files" torefid="system.definition.files" />
    12     </antcall>
    12     </antcall>
    13 	<antcall target="sf-do-compile" inheritAll="false" inheritRefs="true">
    13 
    14         <param name="sysdef.configurations.list" value="${sf.spec.os.sysdef.clean.configurations.list}" />
    14       <!-- Export model to BOM, as generate-layers target is no longer called from compile-main target -->
       
    15       <!-- Name of file in BOM should always be system_model.xml, so that it can be predictably re-used again -->
       
    16       <copy file="${build.drive}/output/build/canonical_system_definition_${sf.spec.os.sysdef.clean.configurations.list}.xml" tofile="${build.log.dir}/BOM/system_model.xml"/>
       
    17 
       
    18     <antcall target="sf-do-compile" inheritAll="false" inheritRefs="true">
       
    19         <param name="sysdef.configurations.list" value="bldmelast" />
    15         <reference refid="sf.spec.tools.system.definition.files" torefid="system.definition.files" />
    20         <reference refid="sf.spec.tools.system.definition.files" torefid="system.definition.files" />
    16     </antcall>
    21     </antcall>
       
    22 
       
    23       <!-- Export model to BOM, as generate-layers target is no longer called from compile-main target -->
       
    24       <!-- Name of file in BOM should always be system_model.xml, so that it can be predictably re-used again -->
       
    25       <copy file="${build.drive}/output/build/canonical_system_definition_bldmelast.xml" tofile="${build.log.dir}/BOM/tools_model.xml"/>
       
    26 
    17   </target>
    27   </target>
       
    28 
    18   
    29   
    19   <!-- compile sbs.tools.config and sbs.config. tools built only if its not being unpacked first.
    30   <!-- compile sbs.tools.config and sbs.config. tools built only if its not being unpacked first.
    20        note: must be called from sf-os/s60-compile targets, as sys model input needed -->
    31        note: must be called from sf-os/s60-compile targets, as sys model input needed -->
    21   <target name="sf-do-compile" depends="create-canonical-sysdef-file">
    32   <target name="sf-do-compile" depends="create-canonical-sysdef-file">
    22     <echo message="INFO Using Helium 7+ for sf-do-compile"/>
    33     <echo message="INFO Using Helium 7+ for sf-do-compile"/>
    28     </antcall>
    39     </antcall>
    29 
    40 
    30     <!-- perform initial exports -->
    41     <!-- perform initial exports -->
    31     <antcall target="sf-do-full-export" inheritAll="false" inheritRefs="true">
    42     <antcall target="sf-do-full-export" inheritAll="false" inheritRefs="true">
    32         <param name="sf.export.stage.name" value="full_export"/>
    43         <param name="sf.export.stage.name" value="full_export"/>
       
    44         <param name="sysdef.configuration" value="${sysdef.configurations.list}"/>
    33     </antcall>	  
    45     </antcall>	  
    34 
    46 
    35     <!-- explicitly run qmake second time to allow -configure options to be applied -->
    47     <!-- explicitly run qmake second time to allow -configure options to be applied -->
    36     <antcall target="run-qmake" inheritAll="false" inheritRefs="true">
    48     <antcall target="run-qmake" inheritAll="false" inheritRefs="true">
    37       <param name="qmake.enabled" value="true"/>
    49       <param name="qmake.enabled" value="true"/>
    46       <then>
    58       <then>
    47         <echo message="INFO Building tools, unpack is not specified"/>        
    59         <echo message="INFO Building tools, unpack is not specified"/>        
    48         
    60         
    49         <!-- sf.spec.sbs.tools.config param used. do-target-build will decide to build sequentially/together -->
    61         <!-- sf.spec.sbs.tools.config param used. do-target-build will decide to build sequentially/together -->
    50         <antcall target="sf-do-target-compile" inheritAll="false" inheritRefs="true">
    62         <antcall target="sf-do-target-compile" inheritAll="false" inheritRefs="true">
    51             <param name="i.sf.spec.sbs.config" value="${sf.spec.sbs.tools.config}" />           
    63             <param name="i.sf.spec.sbs.config" value="${sf.spec.sbs.tools.config}" />   
       
    64             <param name="sysdef.configuration" value="${sysdef.configurations.list}"/>        
    52         </antcall>
    65         </antcall>
    53       </then>
    66       </then>
    54       <else>
    67       <else>
    55         <echo message="INFO Skipping tools build, tools were unpacked from ${sf.spec.toolsbaseline.location}"/>
    68         <echo message="INFO Skipping tools build, tools were unpacked from ${sf.spec.toolsbaseline.location}"/>
    56       </else>
    69       </else>
    57       </if>
    70       </if>
    58       	  	  
    71       	  	  
    59       <!-- sf.spec.sbs.config param used. do-target-build will decide to build sequentially/together -->
    72       <!-- sf.spec.sbs.config param used. do-target-build will decide to build sequentially/together -->
    60       <antcall target="sf-do-target-compile" inheritAll="false" inheritRefs="true">
    73       <antcall target="sf-do-target-compile" inheritAll="false" inheritRefs="true">
    61           <param name="i.sf.spec.sbs.config" value="${sf.spec.sbs.config}" />
    74           <param name="i.sf.spec.sbs.config" value="${sf.spec.sbs.config}" />
       
    75           <param name="sysdef.configuration" value="${sysdef.configurations.list}"/>
    62       </antcall>
    76       </antcall>
    63   
    77   
    64       <!-- Export model to BOM, as generate-layers target is no longer called from compile-main target -->
    78 
    65       <!-- Name of file in BOM should always be system_model.xml, so that it can be predictably re-used again -->
       
    66       <copy file="${build.drive}/output/build/canonical_system_definition_${sysdef.configurations.list}.xml" tofile="${build.log.dir}/BOM/system_model.xml"/>
       
    67   </target>
    79   </target>
    68 
    80 
    69   <!-- perform export only first to assist when parallel makefile parsing -->
    81   <!-- perform export only first to assist when parallel makefile parsing -->
    70   <target name="sf-do-full-export">
    82   <target name="sf-do-full-export">
    71   
    83   
    77         <sbsOptions>
    89         <sbsOptions>
    78             <arg line="-c ${i.sf.spec.sbs.config.expanded} -c ${i.sf.spec.sbs.tools.config.expanded}"/>
    90             <arg line="-c ${i.sf.spec.sbs.config.expanded} -c ${i.sf.spec.sbs.tools.config.expanded}"/>
    79             <arg line="-k" />
    91             <arg line="-k" />
    80             <arg line="-j ${sf.spec.sbs.numberofjobs}"/>
    92             <arg line="-j ${sf.spec.sbs.numberofjobs}"/>
    81             <arg line="-t ${sf.spec.sbs.retry.limit}"/>
    93             <arg line="-t ${sf.spec.sbs.retry.limit}"/>
    82             <arg name="--logfile" value="${build.drive}/output/logs/${build.id}_${sf.spec.os.sysdef.clean.configurations.list}_compile_${sf.export.stage.name}.log" />
    94             <arg name="--logfile" value="${build.drive}/output/logs/${build.id}_${sysdef.configuration}_compile_${sf.export.stage.name}.log" />
    83             <arg name="--makefile" value="${compile.log.dir}/${build.id}_${sf.spec.os.sysdef.clean.configurations.list}_compile_${sf.export.stage.name}_Makefile" />
    95             <arg name="--makefile" value="${compile.log.dir}/${build.id}_${sysdef.configuration}_compile_${sf.export.stage.name}_Makefile" />
    84             <arg line="--export-only"/>
    96             <arg line="--export-only"/>
    85         </sbsOptions>
    97         </sbsOptions>
    86     </hlm:sbsinput>
    98     </hlm:sbsinput>
    87     
    99     
    88     <!-- call helium's compile-main target using the sbsInput args defined above -->
   100     <!-- call helium's compile-main target using the sbsInput args defined above -->
    89     <echo message="INFO Full export for all targets"/>
   101     <echo message="INFO Full export for all targets"/>
    90     <antcall target="compile-main" inheritAll="false" inheritRefs="true">
   102     <antcall target="compile-main" inheritAll="false" inheritRefs="true">
    91         <param name="build.system" value="${sf.spec.build.system}" />
   103         <param name="build.system" value="${sf.spec.build.system}" />
       
   104         <param name="sysdef.configuration" value="${sysdef.configurations.list}"/>
    92         <param name="sbs.inputs.list" value="sf.export"/>
   105         <param name="sbs.inputs.list" value="sf.export"/>
    93     </antcall> 
   106     </antcall> 
    94   </target>
   107   </target>
    95 
   108 
    96   <!-- compile sbs.config list of targets either sequentially or together -->
   109   <!-- compile sbs.config list of targets either sequentially or together -->
   109                     <arg line="-k" />
   122                     <arg line="-k" />
   110                     <arg line="-j ${sf.spec.sbs.numberofjobs}"/>
   123                     <arg line="-j ${sf.spec.sbs.numberofjobs}"/>
   111                     <arg line="-t ${sf.spec.sbs.retry.limit}"/>
   124                     <arg line="-t ${sf.spec.sbs.retry.limit}"/>
   112                     <arg line="${sf.spec.sbs.options}"/>
   125                     <arg line="${sf.spec.sbs.options}"/>
   113                     <arg name="--filters" value="&quot;${sf.spec.sbs.filter.list}&quot;"/>
   126                     <arg name="--filters" value="&quot;${sf.spec.sbs.filter.list}&quot;"/>
   114                     <arg name="--logfile" value="${build.drive}/output/logs/${build.id}_@{item.sbs.splitconfig}_${sf.spec.os.sysdef.clean.configurations.list}_compile.log" />
   127                     <arg name="--logfile" value="${build.drive}/output/logs/${build.id}_@{item.sbs.splitconfig}_${sysdef.configuration}_compile.log" />
   115                     <arg name="--makefile" value="${compile.log.dir}/${build.id}_@{item.sbs.splitconfig}_${sf.spec.os.sysdef.clean.configurations.list}_Makefile" />
   128                     <arg name="--makefile" value="${compile.log.dir}/${build.id}_@{item.sbs.splitconfig}_${sysdef.configuration}_Makefile" />
   116                     <arg line="--noexport"/>
   129                     <arg line="--noexport"/>
   117                 </sbsOptions>
   130                 </sbsOptions>
   118             </hlm:sbsinput>
   131             </hlm:sbsinput>
   119 
   132 
   120             <!-- call helium's compile-main target using the sbsInput args defined above -->
   133             <!-- call helium's compile-main target using the sbsInput args defined above -->
   121             <echo message="INFO Iterative compile building target: @{item.sbs.splitconfig}"/>
   134             <echo message="INFO Iterative compile building target: @{item.sbs.splitconfig}"/>
   122             <antcall target="compile-main" inheritAll="false" inheritRefs="true">
   135             <antcall target="compile-main" inheritAll="false" inheritRefs="true">
   123               <param name="build.system" value="${sf.spec.build.system}" />
   136               <param name="build.system" value="${sf.spec.build.system}" />
       
   137               <param name="sysdef.configuration" value="${sysdef.configurations.list}"/>
   124               <param name="sbs.inputs.list" value="sf.build"/>
   138               <param name="sbs.inputs.list" value="sf.build"/>
   125             </antcall> 
   139             </antcall> 
   126                         
   140                         
   127         </sequential>
   141         </sequential>
   128         </for>
   142         </for>
   130       <else>
   144       <else>
   131            <!-- turn comma separated list into sbs friendly -c list, and _ separated list for friendly log names -->
   145            <!-- turn comma separated list into sbs friendly -c list, and _ separated list for friendly log names -->
   132            <propertyregex property="i.sf.spec.sbs.config.expanded"         override="true" input="${i.sf.spec.sbs.config}" regexp="(,)" replace=" -c " defaultValue="${i.sf.spec.sbs.config}" global="true"  casesensitive="false"/>
   146            <propertyregex property="i.sf.spec.sbs.config.expanded"         override="true" input="${i.sf.spec.sbs.config}" regexp="(,)" replace=" -c " defaultValue="${i.sf.spec.sbs.config}" global="true"  casesensitive="false"/>
   133            <propertyregex property="i.sf.spec.sbs.config.expanded.logname" override="true" input="${i.sf.spec.sbs.config}" regexp="(,)" replace="_"    defaultValue="${i.sf.spec.sbs.config}" global="true"  casesensitive="false"/>
   147            <propertyregex property="i.sf.spec.sbs.config.expanded.logname" override="true" input="${i.sf.spec.sbs.config}" regexp="(,)" replace="_"    defaultValue="${i.sf.spec.sbs.config}" global="true"  casesensitive="false"/>
   134            <echo message="INFO Target : ${i.sf.spec.sbs.config.expanded}"/>
   148            <echo message="INFO Target : ${i.sf.spec.sbs.config.expanded}"/>
   135            <echo message="INFO Logname: ${i.sf.spec.sbs.config.expanded.logname} + Config: ${sf.spec.os.sysdef.clean.configurations.list}"/>
   149            <echo message="INFO Logname: ${i.sf.spec.sbs.config.expanded.logname} + Config: ${sysdef.configuration}"/>
   136            
   150            
   137            <!-- TODO: Make this use above compile-main call? -->
   151            <!-- TODO: Make this use above compile-main call? -->
   138 
   152 
   139            <!-- define sbs args, log name etc -->
   153            <!-- define sbs args, log name etc -->
   140            <hlm:sbsinput id="sf.build">
   154            <hlm:sbsinput id="sf.build">
   143                     <arg line="-k" />
   157                     <arg line="-k" />
   144                     <arg line="-j ${sf.spec.sbs.numberofjobs}"/>
   158                     <arg line="-j ${sf.spec.sbs.numberofjobs}"/>
   145                     <arg line="-t ${sf.spec.sbs.retry.limit}"/>
   159                     <arg line="-t ${sf.spec.sbs.retry.limit}"/>
   146                     <arg line="${sf.spec.sbs.options}"/>
   160                     <arg line="${sf.spec.sbs.options}"/>
   147                     <arg name="--filters" value="&quot;${sf.spec.sbs.filter.list}&quot;"/>
   161                     <arg name="--filters" value="&quot;${sf.spec.sbs.filter.list}&quot;"/>
   148                     <arg name="--logfile" value="${build.drive}/output/logs/${build.id}_${i.sf.spec.sbs.config.expanded.logname}_${sf.spec.os.sysdef.clean.configurations.list}_compile.log" />
   162                     <arg name="--logfile" value="${build.drive}/output/logs/${build.id}_${i.sf.spec.sbs.config.expanded.logname}_${sysdef.configuration}_compile.log" />
   149                     <arg name="--makefile" value="${compile.log.dir}/${build.id}_${i.sf.spec.sbs.config.expanded.logname}_${sf.spec.os.sysdef.clean.configurations.list}_Makefile" />
   163                     <arg name="--makefile" value="${compile.log.dir}/${build.id}_${i.sf.spec.sbs.config.expanded.logname}_${sysdef.configuration}_Makefile" />
   150                     <arg line="--noexport"/>
   164                     <arg line="--noexport"/>
   151                 </sbsOptions>
   165                 </sbsOptions>
   152            </hlm:sbsinput>
   166            </hlm:sbsinput>
   153             
   167             
   154             <!-- call helium's compile-main target using the sbsInput args defined above -->
   168             <!-- call helium's compile-main target using the sbsInput args defined above -->
   155             <echo message="INFO Building target(s): ${i.sf.spec.sbs.config.expanded}"/>
   169             <echo message="INFO Building target(s): ${i.sf.spec.sbs.config.expanded}"/>
   156             <antcall target="compile-main" inheritAll="false" inheritRefs="true">
   170             <antcall target="compile-main" inheritAll="false" inheritRefs="true">
   157               <param name="build.system" value="${sf.spec.build.system}" />
   171               <param name="build.system" value="${sf.spec.build.system}" />
       
   172               <param name="sysdef.configuration" value="${sysdef.configurations.list}"/>
   158               <param name="sbs.inputs.list" value="sf.build"/>
   173               <param name="sbs.inputs.list" value="sf.build"/>
   159             </antcall> 
   174             </antcall> 
   160            
   175            
   161       </else>
   176       </else>
   162     </if>
   177     </if>
   163   </target>
   178   </target>
   164   
   179   
   165 </project>
   180 </project>
   166