1) Add support for parallel makefile generation by spliting compile into two-step operation. export first, followed by compile.
authorShabe Razvi <shaber@symbian.org>
Mon, 22 Mar 2010 15:24:58 +0000
changeset 939 4dd6f1dde1fe
parent 938 8b364fe9ff75
child 940 5d6e2c958c66
1) Add support for parallel makefile generation by spliting compile into two-step operation. export first, followed by compile. 2) Remove smoketest from sources.csv and into sources_test.csv. This enables a fully resolved csv file to be fed directly back into a platform build.
common/build.xml
sf-platform/compile.ant.xml
--- a/common/build.xml	Mon Mar 22 14:25:05 2010 +0000
+++ b/common/build.xml	Mon Mar 22 15:24:58 2010 +0000
@@ -404,6 +404,9 @@
     
     <target name="sf-get-source" depends="sf-generate-source-spec">
         <stopwatch name="sf-get-source"/>
+        <!-- Get test manifest, and move resolved csv so that it doesnt conflict with source-spec.ant.xml -->
+        <ant antfile="${temp.build.dir}/source-test-spec.ant.xml" />
+        <move file="${build.drive}/output/logs/BOM/sources.csv" tofile="${build.drive}/output/logs/BOM/sources_test.csv"/>
         <ant antfile="${temp.build.dir}/source-spec.ant.xml" />
         <stopwatch name="sf-get-source" action="elapsed"/>
     </target>
@@ -461,8 +464,16 @@
               <data expandProperties="yes">
                     ant: antProperties()
                     data: [
+                        csv(${sf.source.csv.file}, {separator:','})
+                    ]
+              </data>
+        </fmpp>
+        <fmpp sourceFile="${sf.common.config.dir}/templates/source-spec.ant.xml.ftl"
+              outputFile="${temp.build.dir}/source-test-spec.ant.xml">
+              <data expandProperties="yes">
+                    ant: antProperties()
+                    data: [
                         csv(${sf.test.csv.file}, {separator:','})
-                        csv(${sf.source.csv.file}, {separator:','})
                     ]
               </data>
         </fmpp>
--- a/sf-platform/compile.ant.xml	Mon Mar 22 14:25:05 2010 +0000
+++ b/sf-platform/compile.ant.xml	Mon Mar 22 15:24:58 2010 +0000
@@ -22,7 +22,7 @@
   
   <!-- compile sbs.tools.config and sbs.config. tools built only if its not being unpacked first.
        note: must be called from sf-os/s60-compile targets, as sys model input needed -->
-  <target name="sf-do-compile">
+  <target name="sf-do-compile" depends="sf-do-full-export">
     <echo message="INFO Using Helium 7+ for sf-do-compile"/>
         
     <propertyregex property="sf.unpack.tools" override="true" input="${sf.spec.baseline.getenv_options}" regexp="-i tools" select="true" defaultValue="false" casesensitive="false"/>
@@ -55,15 +55,35 @@
       <copy file="${build.drive}/output/build/canonical_system_definition_${sysdef.configurations.list}.xml" todir="${build.log.dir}/BOM/"/>
   </target>
 
+  <!-- perform export only first to assist when parallel makefile parsing -->
+  <target name="sf-do-full-export">
+    <hlm:sbsinput id="sf.export">
+        <sbsOptions>
+            <arg line="-k" />
+            <arg line="-t ${sf.spec.sbs.retry.limit}"/>
+            <arg name="--logfile" value="${compile.log.dir}/${build.id}_${sf.spec.os.sysdef.clean.configurations.list}_compile_full_export.log" />
+            <arg name="--makefile" value="${compile.log.dir}/${build.id}_${sf.spec.os.sysdef.clean.configurations.list}_compile_full_export_Makefile" />
+            <arg line="--export-only"/>
+        </sbsOptions>
+    </hlm:sbsinput>
+    
+    <!-- call helium's compile-main target using the sbsInput args defined above -->
+    <echo message="INFO Full export for all targets"/>
+    <antcall target="compile-main" inheritAll="false" inheritRefs="true">
+        <param name="build.system" value="${sf.spec.build.system}" />
+        <param name="sbs.inputs.list" value="sf.export"/>
+    </antcall> 
+  </target>
 
   <!-- compile sbs.config list of targets either sequentially or together -->
   <target name="sf-do-target-compile">
-
+  
     <if>
       <istrue value="${sf.os.compile.iterate}"/>
       <then>
         <for list="${i.sf.spec.sbs.config}" delimiter="," param="item.sbs.splitconfig">
         <sequential>
+        
             <!-- define sbs args, log name etc -->
             <hlm:sbsinput id="sf.build">
                 <sbsOptions>
@@ -75,16 +95,17 @@
                     <arg name="--filters" value="&quot;${sf.spec.sbs.filter.list}&quot;"/>
                     <arg name="--logfile" value="${compile.log.dir}/${build.id}_@{item.sbs.splitconfig}_${sf.spec.os.sysdef.clean.configurations.list}_compile.log" />
                     <arg name="--makefile" value="${compile.log.dir}/${build.id}_@{item.sbs.splitconfig}_${sf.spec.os.sysdef.clean.configurations.list}_Makefile" />
+                    <arg line="--noexport"/>
                 </sbsOptions>
             </hlm:sbsinput>
-            
+
             <!-- call helium's compile-main target using the sbsInput args defined above -->
             <echo message="INFO Iterative compile building target: @{item.sbs.splitconfig}"/>
             <antcall target="compile-main" inheritAll="false" inheritRefs="true">
               <param name="build.system" value="${sf.spec.build.system}" />
               <param name="sbs.inputs.list" value="sf.build"/>
             </antcall> 
-            
+                        
         </sequential>
         </for>
       </then>
@@ -96,7 +117,7 @@
            <echo message="INFO Logname: ${i.sf.spec.sbs.config.expanded.logname} + Config: ${sf.spec.os.sysdef.clean.configurations.list}"/>
            
            <!-- TODO: Make this use above compile-main call? -->
-           
+
            <!-- define sbs args, log name etc -->
            <hlm:sbsinput id="sf.build">
                 <sbsOptions>
@@ -108,6 +129,7 @@
                     <arg name="--filters" value="&quot;${sf.spec.sbs.filter.list}&quot;"/>
                     <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" />
                     <arg name="--makefile" value="${compile.log.dir}/${build.id}_${i.sf.spec.sbs.config.expanded.logname}_${sf.spec.os.sysdef.clean.configurations.list}_Makefile" />
+                    <arg line="--noexport"/>
                 </sbsOptions>
            </hlm:sbsinput>