Add sf-rombuild target to build ROMs. Backout ARM license check suppression.
authorShabe Razvi <shaber@symbian.org>
Mon, 19 Oct 2009 17:55:16 +0100
changeset 698 382728cd25d2
parent 694 260b05585dc3
child 699 cdfb88270be0
Add sf-rombuild target to build ROMs. Backout ARM license check suppression.
build.xml
common/build.postbuild.xml
common/build.xml
common/common_props.ant.xml
--- a/build.xml	Mon Oct 19 13:21:41 2009 +0100
+++ b/build.xml	Mon Oct 19 17:55:16 2009 +0100
@@ -6,10 +6,6 @@
   <property name="sf.subproject.path" value=""/>
   <property name="sf.project.location" value="${sf.config.dir}/../build/config/${sf.subproject.path}"/>
   <property name="sf.project.name" value="job"/>
-   
-  <target name="set-arm-version"/>
-  <target name="check-env-arm-license"/>
-  <target name="get-arm-license"/>
   
   <!-- import job properties -->
   <import file="${sf.project.location}/${sf.project.name}_props.ant.xml" optional="yes"/>
--- a/common/build.postbuild.xml	Mon Oct 19 13:21:41 2009 +0100
+++ b/common/build.postbuild.xml	Mon Oct 19 17:55:16 2009 +0100
@@ -2,6 +2,14 @@
 <project name="SF-POSTBUILD" xmlns:hlm="http://www.nokia.com/helium">
     <target name="sf-postbuild">
         <echo>[SF-POSTBUILD]</echo>
+        
+        <if><istrue value="${sf.spec.referenceroms.createimages.enable}"/>
+        <then>
+            <echo message="INFO Building ROMs defined for this project"/>
+            <runtarget target="sf-rombuild"/>
+        </then>
+        </if>
+        
         <parallel>                
             <!-- TAG SOURCE CODE -->
             <if>
--- a/common/build.xml	Mon Oct 19 13:21:41 2009 +0100
+++ b/common/build.xml	Mon Oct 19 17:55:16 2009 +0100
@@ -568,6 +568,68 @@
         <!-- And copy the XSL so the output can be transformed by a browser -->
         <copy file="${sf.common.config.dir}/tools/brag/brag.xsl" toDir="${build.log.dir}/summary/"/>
     </target>
-    
+       
+
+    <target name="sf-rombuild">
+      <!-- TODO If ANT gets a better way to do conditions based on value then use it instead! -->
+      <property name="sf.rombuild.dir" value="${build.drive}/sf/os/kernelhwsrv/kernel/eka/rombuild"/>
+      
+      <for list="${sf.spec.sbs.config}" delimiter="," param="sf.spec.sbs.config.variant">
+          <sequential>
+          <propertyregex property="udeb" input="@{sf.spec.sbs.config.variant}" regexp="(armv5$|armv5\.|armv5_udeb)" select="\1"/>
+          <propertyregex property="urel" input="@{sf.spec.sbs.config.variant}" regexp="(armv5$|armv5\.|armv5_urel)" select="\1"/>
+          </sequential>
+      </for> 
+      
+      <condition property="sf.spec.sbs.config.expanded" value="udeb">
+      <and><isset property="udeb"/><not><isset property="urel"/></not></and>
+      </condition>
+      
+      <condition property="sf.spec.sbs.config.expanded" value="urel">
+      <and><isset property="urel"/><not><isset property="udeb"/></not></and>
+      </condition>
+      
+      <condition property="sf.spec.sbs.config.expanded" value="udeb,urel">
+      <and><isset property="udeb"/><isset property="urel"/></and>
+      </condition>
+      
+      <if><isset property="sf.spec.sbs.config.expanded"/>
+      <then>
+          <echo message="INFO Found armv5, building ${sf.spec.sbs.config.expanded}"/>      
+          
+          <for list="${sf.spec.referenceroms.list}" delimiter="," param="sf.spec.referenceroms.variant">
+              <sequential>
+              <for list="${sf.spec.sbs.config.expanded}" delimiter="," param="sf.spec.sbs.config.expanded.i">
+                  <sequential>
+                      <echo message="INFO Building textshell ROM variant @{sf.spec.sbs.config.expanded.i} @{sf.spec.referenceroms.variant}"/>
+                      <exec executable="cmd" dir="${sf.rombuild.dir}" failonerror="false" 
+                      output="${build.log.dir}/ROM_@{sf.spec.referenceroms.variant}_@{sf.spec.sbs.config.expanded.i}_out.log" logError="true">
+                          <arg value="/c"/>
+                          <arg value="rom --variant=@{sf.spec.referenceroms.variant} --inst=armv5 --build=@{sf.spec.sbs.config.expanded.i} --type=tshell"/>
+                      </exec>
+                      
+                      <if><available  file="${sf.rombuild.dir}/ROMBUILD.LOG"/>
+                      <then>
+                          <move file="${sf.rombuild.dir}/ROMBUILD.LOG" tofile="${build.log.dir}/ROMBUILD_@{sf.spec.referenceroms.variant}_@{sf.spec.sbs.config.expanded.i}.log"/>
+                      </then>
+                      <else>
+                          <echo message="ERROR Failed to build @{sf.spec.sbs.config.expanded.i} ROM for @{sf.spec.referenceroms.variant} variant"/>
+                      </else>
+                      </if>
+                  </sequential>
+             </for>
+             </sequential>
+          </for>
+          
+          <move todir="${build.drive}/epoc32/rom/"  verbose="true" failonerror="false">
+            <fileset dir="${sf.rombuild.dir}">
+              <include name="**/*.IMG"/>
+            </fileset>
+          </move>
+      </then>
+      <else><echo message="INFO ROM Build requested but no valid build variants defined by sf.spec.sbs.config. Skipping."/></else>
+      </if>
+    </target>
+
 </project>
 
--- a/common/common_props.ant.xml	Mon Oct 19 13:21:41 2009 +0100
+++ b/common/common_props.ant.xml	Mon Oct 19 17:55:16 2009 +0100
@@ -35,6 +35,8 @@
     
     
     <property name="sf.spec.referenceroms.createimages.enable" value="false"/>
+    <property name="sf.spec.referenceroms.list" value=""/>
+    
     <property name="sf.spec.testroms.createimages.enable" value="false"/>
     
     <property name="sf.spec.sourcesync.enable" value="true"/>