sf-platform/compile.ant.xml
changeset 939 4dd6f1dde1fe
parent 917 ebd555518364
child 940 5d6e2c958c66
equal deleted inserted replaced
938:8b364fe9ff75 939:4dd6f1dde1fe
    20     </antcall>
    20     </antcall>
    21   </target>
    21   </target>
    22   
    22   
    23   <!-- compile sbs.tools.config and sbs.config. tools built only if its not being unpacked first.
    23   <!-- compile sbs.tools.config and sbs.config. tools built only if its not being unpacked first.
    24        note: must be called from sf-os/s60-compile targets, as sys model input needed -->
    24        note: must be called from sf-os/s60-compile targets, as sys model input needed -->
    25   <target name="sf-do-compile">
    25   <target name="sf-do-compile" depends="sf-do-full-export">
    26     <echo message="INFO Using Helium 7+ for sf-do-compile"/>
    26     <echo message="INFO Using Helium 7+ for sf-do-compile"/>
    27         
    27         
    28     <propertyregex property="sf.unpack.tools" override="true" input="${sf.spec.baseline.getenv_options}" regexp="-i tools" select="true" defaultValue="false" casesensitive="false"/>
    28     <propertyregex property="sf.unpack.tools" override="true" input="${sf.spec.baseline.getenv_options}" regexp="-i tools" select="true" defaultValue="false" casesensitive="false"/>
    29   
    29   
    30     <if> <!-- If tools baseline unpack has not been specified, or its not a "fast" build then try to build them -->
    30     <if> <!-- If tools baseline unpack has not been specified, or its not a "fast" build then try to build them -->
    53   
    53   
    54       <!-- Export model to BOM, as generate-layers target is no longer called from compile-main target -->
    54       <!-- Export model to BOM, as generate-layers target is no longer called from compile-main target -->
    55       <copy file="${build.drive}/output/build/canonical_system_definition_${sysdef.configurations.list}.xml" todir="${build.log.dir}/BOM/"/>
    55       <copy file="${build.drive}/output/build/canonical_system_definition_${sysdef.configurations.list}.xml" todir="${build.log.dir}/BOM/"/>
    56   </target>
    56   </target>
    57 
    57 
       
    58   <!-- perform export only first to assist when parallel makefile parsing -->
       
    59   <target name="sf-do-full-export">
       
    60     <hlm:sbsinput id="sf.export">
       
    61         <sbsOptions>
       
    62             <arg line="-k" />
       
    63             <arg line="-t ${sf.spec.sbs.retry.limit}"/>
       
    64             <arg name="--logfile" value="${compile.log.dir}/${build.id}_${sf.spec.os.sysdef.clean.configurations.list}_compile_full_export.log" />
       
    65             <arg name="--makefile" value="${compile.log.dir}/${build.id}_${sf.spec.os.sysdef.clean.configurations.list}_compile_full_export_Makefile" />
       
    66             <arg line="--export-only"/>
       
    67         </sbsOptions>
       
    68     </hlm:sbsinput>
       
    69     
       
    70     <!-- call helium's compile-main target using the sbsInput args defined above -->
       
    71     <echo message="INFO Full export for all targets"/>
       
    72     <antcall target="compile-main" inheritAll="false" inheritRefs="true">
       
    73         <param name="build.system" value="${sf.spec.build.system}" />
       
    74         <param name="sbs.inputs.list" value="sf.export"/>
       
    75     </antcall> 
       
    76   </target>
    58 
    77 
    59   <!-- compile sbs.config list of targets either sequentially or together -->
    78   <!-- compile sbs.config list of targets either sequentially or together -->
    60   <target name="sf-do-target-compile">
    79   <target name="sf-do-target-compile">
    61 
    80   
    62     <if>
    81     <if>
    63       <istrue value="${sf.os.compile.iterate}"/>
    82       <istrue value="${sf.os.compile.iterate}"/>
    64       <then>
    83       <then>
    65         <for list="${i.sf.spec.sbs.config}" delimiter="," param="item.sbs.splitconfig">
    84         <for list="${i.sf.spec.sbs.config}" delimiter="," param="item.sbs.splitconfig">
    66         <sequential>
    85         <sequential>
       
    86         
    67             <!-- define sbs args, log name etc -->
    87             <!-- define sbs args, log name etc -->
    68             <hlm:sbsinput id="sf.build">
    88             <hlm:sbsinput id="sf.build">
    69                 <sbsOptions>
    89                 <sbsOptions>
    70                     <arg line="-c @{item.sbs.splitconfig}"/>
    90                     <arg line="-c @{item.sbs.splitconfig}"/>
    71                     <arg line="-k" />
    91                     <arg line="-k" />
    73                     <arg line="-t ${sf.spec.sbs.retry.limit}"/>
    93                     <arg line="-t ${sf.spec.sbs.retry.limit}"/>
    74                     <arg line="${sf.spec.sbs.options}"/>
    94                     <arg line="${sf.spec.sbs.options}"/>
    75                     <arg name="--filters" value="&quot;${sf.spec.sbs.filter.list}&quot;"/>
    95                     <arg name="--filters" value="&quot;${sf.spec.sbs.filter.list}&quot;"/>
    76                     <arg name="--logfile" value="${compile.log.dir}/${build.id}_@{item.sbs.splitconfig}_${sf.spec.os.sysdef.clean.configurations.list}_compile.log" />
    96                     <arg name="--logfile" value="${compile.log.dir}/${build.id}_@{item.sbs.splitconfig}_${sf.spec.os.sysdef.clean.configurations.list}_compile.log" />
    77                     <arg name="--makefile" value="${compile.log.dir}/${build.id}_@{item.sbs.splitconfig}_${sf.spec.os.sysdef.clean.configurations.list}_Makefile" />
    97                     <arg name="--makefile" value="${compile.log.dir}/${build.id}_@{item.sbs.splitconfig}_${sf.spec.os.sysdef.clean.configurations.list}_Makefile" />
       
    98                     <arg line="--noexport"/>
    78                 </sbsOptions>
    99                 </sbsOptions>
    79             </hlm:sbsinput>
   100             </hlm:sbsinput>
    80             
   101 
    81             <!-- call helium's compile-main target using the sbsInput args defined above -->
   102             <!-- call helium's compile-main target using the sbsInput args defined above -->
    82             <echo message="INFO Iterative compile building target: @{item.sbs.splitconfig}"/>
   103             <echo message="INFO Iterative compile building target: @{item.sbs.splitconfig}"/>
    83             <antcall target="compile-main" inheritAll="false" inheritRefs="true">
   104             <antcall target="compile-main" inheritAll="false" inheritRefs="true">
    84               <param name="build.system" value="${sf.spec.build.system}" />
   105               <param name="build.system" value="${sf.spec.build.system}" />
    85               <param name="sbs.inputs.list" value="sf.build"/>
   106               <param name="sbs.inputs.list" value="sf.build"/>
    86             </antcall> 
   107             </antcall> 
    87             
   108                         
    88         </sequential>
   109         </sequential>
    89         </for>
   110         </for>
    90       </then>
   111       </then>
    91       <else>
   112       <else>
    92            <!-- turn comma separated list into sbs friendly -c list, and _ separated list for friendly log names -->
   113            <!-- turn comma separated list into sbs friendly -c list, and _ separated list for friendly log names -->
    94            <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"/>
   115            <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"/>
    95            <echo message="INFO Target : ${i.sf.spec.sbs.config.expanded}"/>
   116            <echo message="INFO Target : ${i.sf.spec.sbs.config.expanded}"/>
    96            <echo message="INFO Logname: ${i.sf.spec.sbs.config.expanded.logname} + Config: ${sf.spec.os.sysdef.clean.configurations.list}"/>
   117            <echo message="INFO Logname: ${i.sf.spec.sbs.config.expanded.logname} + Config: ${sf.spec.os.sysdef.clean.configurations.list}"/>
    97            
   118            
    98            <!-- TODO: Make this use above compile-main call? -->
   119            <!-- TODO: Make this use above compile-main call? -->
    99            
   120 
   100            <!-- define sbs args, log name etc -->
   121            <!-- define sbs args, log name etc -->
   101            <hlm:sbsinput id="sf.build">
   122            <hlm:sbsinput id="sf.build">
   102                 <sbsOptions>
   123                 <sbsOptions>
   103                     <arg line="-c ${i.sf.spec.sbs.config.expanded}"/>
   124                     <arg line="-c ${i.sf.spec.sbs.config.expanded}"/>
   104                     <arg line="-k" />
   125                     <arg line="-k" />
   106                     <arg line="-t ${sf.spec.sbs.retry.limit}"/>
   127                     <arg line="-t ${sf.spec.sbs.retry.limit}"/>
   107                     <arg line="${sf.spec.sbs.options}"/>
   128                     <arg line="${sf.spec.sbs.options}"/>
   108                     <arg name="--filters" value="&quot;${sf.spec.sbs.filter.list}&quot;"/>
   129                     <arg name="--filters" value="&quot;${sf.spec.sbs.filter.list}&quot;"/>
   109                     <arg name="--logfile" value="${compile.log.dir}/${build.id}_${i.sf.spec.sbs.config.expanded.logname}_${sf.spec.os.sysdef.clean.configurations.list}_compile.log" />
   130                     <arg name="--logfile" value="${compile.log.dir}/${build.id}_${i.sf.spec.sbs.config.expanded.logname}_${sf.spec.os.sysdef.clean.configurations.list}_compile.log" />
   110                     <arg name="--makefile" value="${compile.log.dir}/${build.id}_${i.sf.spec.sbs.config.expanded.logname}_${sf.spec.os.sysdef.clean.configurations.list}_Makefile" />
   131                     <arg name="--makefile" value="${compile.log.dir}/${build.id}_${i.sf.spec.sbs.config.expanded.logname}_${sf.spec.os.sysdef.clean.configurations.list}_Makefile" />
       
   132                     <arg line="--noexport"/>
   111                 </sbsOptions>
   133                 </sbsOptions>
   112            </hlm:sbsinput>
   134            </hlm:sbsinput>
   113             
   135             
   114             <!-- call helium's compile-main target using the sbsInput args defined above -->
   136             <!-- call helium's compile-main target using the sbsInput args defined above -->
   115             <echo message="INFO Building target(s): ${i.sf.spec.sbs.config.expanded}"/>
   137             <echo message="INFO Building target(s): ${i.sf.spec.sbs.config.expanded}"/>