Commit
authordariosestito@L063522.prod.ad.symbian.intra
Mon, 30 Mar 2009 13:05:39 +0100
changeset 33 4753c9491d0c
parent 32 efb1d1f8809a (current diff)
parent 31 c54ae3330cbd (diff)
child 34 c10840c6fcbb
Commit
common/common_props.ant.xml
--- a/common/build.xml	Mon Mar 30 12:57:31 2009 +0100
+++ b/common/build.xml	Mon Mar 30 13:05:39 2009 +0100
@@ -10,14 +10,17 @@
     
     <!-- setup Helium internal properties from their equivalent in the project spec -->
     <property name="build.name" value="${sf.spec.job.name}"/>
+    <property name="core.build.version" value="${sf.spec.job.codeline}"/>
     <property name="build.number" value="${sf.spec.job.number}"/>
+    <property name="build.drive" value="${sf.spec.job.drive}"/>
     <property name="build.family" value="${sf.project.type}"/>
-    <property name="core.build.version" value="${sf.spec.corebuildversion}"/>
     <property name="email.from" value="${sf.spec.email.from}"/>
     <property name="local.free.space" value="${sf.spec.job.freespace}"/>
     <property name="network.free.space" value="${sf.spec.publish.network.freespace}"/>
     <property name="network.drive" value="${sf.spec.publish.networkdrive}"/>
-    <property name="publish.root.dir" value="${sf.spec.publish.publish.rootdir}"/>
+    <property name="prep.root.dir" value="${sf.spec.job.rootdir}"/>
+    <property name="publish" value="${sf.spec.publish.enable}"/>
+    <property name="publish.root.dir" value="${sf.spec.publish.rootdir}"/>
     <property name="build.system" value="${sf.spec.build.system}"/>
     <property name="base_release.path" value="${sf.spec.baseline.location}"/>
     <property name="base_release.getenv_options" value="${sf.spec.baseline.getenv_options}"/>
@@ -91,14 +94,36 @@
         </if>     
     </target>
     
-    <target name="sf-postbuild">
-        <echo>[SF-POSTBUILD]</echo>
-    </target>
+  <target name="sf-postbuild">
+    <echo>[SF-POSTBUILD]</echo>
+    <runtarget target="publish"/>
+    <if>
+      <istrue value="${sf.spec.publish.enable}" />
+      <then>
+        <echo message="Publish log files and reports to ${sf.spec.publish.rootdir}"/>
+        <runtarget target="publish"/>
+      </then>
+    </if>
+  </target>
     
     <target name="sf-build-noprep" depends="sf-compile">
         <echo>[SF-BUILD-NOPREP]</echo>
     </target>
     
+    <target name="create-canonical-sysdef-file">
+      <if>
+        <istrue value="${sf.spec.systemdefinition.assemble}"/>
+        <then>
+          <echo message="Calling Helium create-canonical-sysdef-file target to assemble sysdef fragments."/>
+          <runtarget target="compile.create-canonical-sysdef-file"/>
+        </then>
+        <else>
+          <echo message="Will use ${build.drive}/${sf.spec.systemdefinition.location} as is as sysdef file"/>
+          <copy file="${build.drive}/${sf.spec.systemdefinition.location}" tofile="${build.drive}/output/build/canonical_system_definition.xml" failonerror="true" verbose="true"/>
+        </else>
+      </if>
+    </target>
+    
     <target name="sf-compile">    
     
     	<!-- TODO: add here assigments to raptor-related ant references -->
--- a/common/common_props.ant.xml	Mon Mar 30 12:57:31 2009 +0100
+++ b/common/common_props.ant.xml	Mon Mar 30 13:05:39 2009 +0100
@@ -1,18 +1,22 @@
 <?xml version="1.0"?>
 
 <project name="SF-COMMON-PROPS" >
-	
-	<property name="sf.spec.sbs.config" value="ramv5"/>
 
     <property name="sf.project.type" value="package"/>
 	
-    <property name="sf.spec.job.name" value="mypackage"/>
-    <property name="sf.spec.job.number" value="77"/>
-    <property name="sf.spec.job.rootdir" value="myrootdir"/>
+    <property name="sf.spec.job.name" value="myproduct"/>
+    <property name="sf.spec.job.codeline" value="MCL"/>
+    <property name="sf.spec.job.number" value="001"/> <!-- this is always overriden from the commandline -->
+    <property name="sf.spec.job.rootdir" value="D:\fbf_job"/>
+    <property name="sf.spec.job.drive" value="G:"/>
     <property name="sf.spec.job.freespace" value="10"/>
-    <property name="sf.spec.corebuildversion" value="mycorebuildversion"/>
     <property name="sf.spec.email.from" value="fbf@symbian.org"/> <!-- needs to be defined for S60 platform builds -->
     
+    <property name="sf.spec.systemdefinition.assemble" value="true"/>
+    <!-- property name="sf.spec.systemdefinition.file" value=""/ -->
+    
+    <property name="sf.spec.sbs.config" value="armv5"/>
+    
     <property name="sf.spec.build.target" value="all"/>
     <property name="sf.spec.build.variant" value=""/>
     <property name="sf.spec.build.productioncode.enable" value="true"/>
@@ -23,6 +27,7 @@
     <property name="sf.spec.build.clean.enable" value="true"/>
     <property name="sf.spec.sysdef.configurations.list" value="s60_build,s60_bldmelast"/>
     
+    
     <property name="sf.spec.referenceroms.createimages.enable" value="false"/>
     <property name="sf.spec.testroms.createimages.enable" value="false"/>
     
@@ -36,11 +41,12 @@
     <property name="sf.spec.toolsbaseline.enable" value="true"/>
     <property name="sf.spec.toolsbaseline.select" value="auto"/>
     
+    <property name="sf.spec.publish.enable" value="true"/>
     <property name="sf.spec.publish.unpackagedartefacts.enable" value="true"/>
     <property name="sf.spec.publish.packagedartefacts.enable" value="true"/>
     <property name="sf.spec.publish.network.freespace" value="10"/>
-    <property name="sf.spec.publish.networkdrive" value="\\builds01\devbuilds\GRACE"/>
-    <property name="sf.spec.publish.publish.rootdir" value="\\builds01\devbuilds\GRACE"/>
+    <property name="sf.spec.publish.networkdrive" value="\\lon-engbuild68\d$\SF_builds"/>
+    <property name="sf.spec.publish.rootdir" value="\\lon-engbuild68\d$\SF_builds"/>
     
     <property name="sf.spec.tagafterbuild.enable" value="true"/>
 </project>
--- a/sf-platform/build.xml	Mon Mar 30 12:57:31 2009 +0100
+++ b/sf-platform/build.xml	Mon Mar 30 13:05:39 2009 +0100
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project name="SF-PLATFORM-CONFIG">
+<project name="SF-PLATFORM-CONFIG" xmlns:hlm="http://www.nokia.com/helium">
   <!-- location of this config -->
   <dirname property="sf.platform.config.dir" file="${ant.file.SF-PLATFORM-CONFIG}"/>
   
@@ -15,6 +15,189 @@
    -->
   <loadproperties srcFile="${sf.platform.config.dir}/platform.properties"/>
   
+  <!-- workaround until GenXML can merge v2.0.0 fragments -->
+  <target name="create-canonical-sysdef-file">
+            
+       <if>
+          <!-- TODO use scripting to match this -->
+          <equals arg1="${sf.spec.sysdef.version}" arg2="1.4.0" /> 
+          <then>
+            <echo message="Using System Definition v1.4.0 "/>
+            <runtarget target="compile.create-canonical-sysdef-file"/>
+          </then>
+          <else>
+            <runtarget target="preprocess-sysdef-files"/>  
+            <echo message="Exporting preprocessed System Definition"/> 
+            
+            <!-- TODO use better method to export or wait for GenXML fix?-->
+            <copy file="${build.output.dir}\build\input\0000000000000001_system_definition.xml" 
+                  tofile="${canonical.sysdef.file}" failonerror="true" verbose="true"/>
+          </else>
+        </if>
+          
+  </target>
+    
+  <!-- 
+    == Name: PREPROCESS-SYSDEF-FILES
+    ==
+    == Desc: Override of default target in order to deal with symbian os
+    ==       system_definition.xml that does not have /sf source prefix    
+    ==       
+    ==       TODO get this moved as a Helium core target?
+    -->
+  <target name="preprocess-sysdef-files">
+        <mkdir dir="${build.output.dir}/build/input"/>
+        <delete verbose="true">
+            <fileset dir="${build.output.dir}/build/input/" includes="**"/>
+        </delete>
+        
+        <for param="file">
+            <resources refid="system.definition.files"/>
+            <sequential>
+                <copy todir="${build.output.dir}/build/input" verbose="true">
+                    <fileset file="@{file}"/>
+                    <filterchain>
+                        <replaceregex pattern="bldFile=&quot;os" replace="bldFile=&quot;sf\\\\os" flags="gi"/>
+                        <replaceregex pattern="mrp=&quot;os" replace="mrp=&quot;sf\\\\os" flags="gi"/>
+                        <replaceregex pattern="bldFile=&quot;mw" replace="bldFile=&quot;sf\\\\mw" flags="gi"/>
+                        <replaceregex pattern="mrp=&quot;mw" replace="mrp=&quot;sf\\\\mw" flags="gi"/>
+                        <replaceregex pattern="bldFile=&quot;app" replace="bldFile=&quot;sf\\\\app" flags="gi"/>
+                        <replaceregex pattern="mrp=&quot;app" replace="mrp=&quot;sf\\\\app" flags="gi"/>
+                        <expandproperties/>
+                    </filterchain>
+                    <mapper>
+                        <scriptmapper language="jep" src="${helium.dir}/tools/common/jep/unique_filename.jep"/>
+                    </mapper>
+                </copy>
+            </sequential>
+        </for>
+    </target>
+  
+  <!-- 
+    == Name: SF-COMPILE
+    ==
+    == Desc: Override of common sf-compile target defined in
+    ==       common\build.xml
+    ==       
+    ==       os  build will be skipped if sf.spec.os.skipbuild=true
+    ==       s60 build will be skipped if sf.spec.s60.skipbuild=true
+    == 
+    -->
+  <target name="sf-compile">
+
+       <if><istrue value="${sf.spec.os.skipbuild}" />
+            <then><echo message="Skipping OS build"/></then>      
+       <else><runtarget target="sf-os-compile"/></else></if>
+       
+       <if><istrue value="${sf.spec.s60.skipbuild}" />
+            <then><echo message="Skipping S60 build"/></then>       
+       <else><runtarget target="sf-s60-compile"/></else></if>
+       
+  </target>
+
+  <!-- 
+    == Name: SF-OS-COMPILE
+    ==
+    == Desc: Compile OS part of build using the spec defined in:
+    == 
+    ==         - job_props.ant.xml
+    ==         - job_refs.ant.xml
+    ==
+    -->
+  <target name="sf-os-compile">
+      
+        <hlm:argSet id="sbs.tools.var">
+                <hlm:arg name="config" value="${sf.spec.sbs.tools.config}" />
+                <hlm:arg name="singlejob" value="true" />
+                <hlm:arg name="enable-filter" value="true" />
+        </hlm:argSet>
+
+        <hlm:argSet id="sbs.main.sbs.var">
+                <hlm:arg name="config" value="${sf.spec.sbs.config}" />
+                <hlm:arg name="enable-filter" value="true" />
+        </hlm:argSet>
+
+        <hlm:sbsMakeOptions engine="gmake" id="sbs.toolsbuild.options" />
+        <hlm:sbsMakeOptions engine="gmake" id="sbs.fullbuild.options" />
+
+        <!-- OS tools build -->
+        <antcall target="compile-main" inheritAll="false" inheritRefs="true">
+                <param name="build.system" value="${sf.spec.build.system}" />
+                <param name="compile.sysdef.dtd.stub" value="${sf.spec.os.sysdef.dtd}" />
+                <param name="sysdef.configurations.list" value="${sf.spec.os.sysdef.clean.configurations.list}" />
+                <param name="sf.spec.sysdef.version" value ="${sf.spec.os.sysdef.version}"/>
+                <reference refid="sbs.tools.var" torefid="sbs.var" />
+                <reference refid="sbs.toolsbuild.options" torefid="sbs.make.options" />
+                <reference refid="sf.spec.os.system.definition.files" torefid="system.definition.files" />
+        </antcall>
+
+        <!-- OS main build -->
+        <antcall target="compile-main" inheritAll="false" inheritRefs="true">
+                <param name="build.system" value="${sf.spec.build.system}" />
+                <param name="compile.sysdef.dtd.stub" value="${sf.spec.os.sysdef.dtd}" />
+                <param name="sysdef.configurations.list" value="${sf.spec.os.sysdef.clean.configurations.list}" />
+                <param name="sf.spec.sysdef.version" value ="${sf.spec.os.sysdef.version}"/>                    
+                <reference refid="sbs.main.sbs.var" torefid="sbs.var" />
+                <reference refid="sbs.fullbuild.options" torefid="sbs.make.options" />
+                <reference refid="sf.spec.os.system.definition.files" torefid="system.definition.files" />
+        </antcall>            
+  </target>
+  
+  <!-- 
+    == Name: SF-S60-COMPILE
+    ==
+    == Desc: Compile S60 part of build using the spec defined in:
+    == 
+    ==         - job_props.ant.xml
+    ==         - job_refs.ant.xml
+    ==
+    -->
+  <target name="sf-s60-compile">
+  
+        <hlm:argSet id="sbs.tools.var">
+          			<hlm:arg name="config" value="${sf.spec.sbs.tools.config}" />
+          			<hlm:arg name="singlejob" value="true" />
+          			<hlm:arg name="enable-filter" value="true" />
+    		</hlm:argSet>
+    
+    		<hlm:argSet id="sbs.main.sbs.var">
+          			<hlm:arg name="config" value="${sf.spec.sbs.config}" />
+          			<hlm:arg name="enable-filter" value="true" />
+    		</hlm:argSet>
+        
+    		<hlm:sbsMakeOptions engine="gmake" id="sbs.toolsbuild.options" />
+    		<hlm:sbsMakeOptions engine="gmake" id="sbs.fullbuild.options" />
+    
+        <!-- s60 clean tools build -->
+    		<antcall target="compile-main" inheritAll="false" inheritRefs="true">
+          			<param name="build.system" value="${sf.spec.build.system}" />
+          			<param name="sysdef.configurations.list" value="${sf.spec.s60.sysdef.clean.configurations.list}" />
+                <param name="sf.spec.sysdef.version" value ="${sf.spec.s60.sysdef.version}"/> 
+                                  
+          			<reference refid="sbs.tools.var" torefid="sbs.var" />
+          			<reference refid="sbs.toolsbuild.options" torefid="sbs.make.options" />
+          			<reference refid="sf.spec.s60.system.definition.files" torefid="system.definition.files" />
+    		</antcall>
+    
+    		<!-- s60 clean main build -->
+    		<antcall target="compile-main" inheritAll="false" inheritRefs="true">
+          			<param name="build.system" value="${sf.spec.build.system}" />
+          			<param name="sysdef.configurations.list" value="${sf.spec.s60.sysdef.clean.configurations.list}" />
+                <param name="sf.spec.sysdef.version" value="${sf.spec.s60.sysdef.version}"/> 
+          			<reference refid="sbs.main.sbs.var" torefid="sbs.var" />
+          			<reference refid="sbs.fullbuild.options" torefid="sbs.make.options" />
+          			<reference refid="sf.spec.s60.system.definition.files" torefid="system.definition.files" />
+    		</antcall>
+    
+    		<!-- s60 postbuild bldmelast using ebs -->
+    		<antcall target="compile-main" inheritAll="false">
+          			<param name="build.system" value="ebs" />
+          			<param name="sysdef.configurations.list" value="S60_bldmelast" />
+          			<reference refid="sf.spec.s60.system.definition.files" torefid="system.definition.files" />
+    		</antcall>
+
+	</target>
+  
   <!-- import sf-common-config -->
   <import file="../common/build.xml" />