Catchup from main repo
authorDarioS@UK-DarioS.symbian.int
Wed, 15 Apr 2009 16:46:01 +0100
changeset 62 2771e394c9bd
parent 61 6066a7d39270 (diff)
parent 40 54444a2ae2db (current diff)
child 63 f5604d0e720a
child 169 6e35d3992e68
child 173 3957aa453061
Catchup from main repo
common/build.xml
common/common_props.ant.xml
common/templates/source-spec.ant.xml.ftl
sf-platform/platform.properties
--- a/common/build.xml	Wed Apr 15 14:15:35 2009 +0100
+++ b/common/build.xml	Wed Apr 15 16:46:01 2009 +0100
@@ -1,199 +1,299 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project name="SF-COMMON-CONFIG">
-
-    <property environment="env"/> <!-- make environment variables available via env -->
-    
-    <dirname property="sf.common.config.dir" file="${ant.file.SF-COMMON-CONFIG}"/>
-    
-    <!-- import common properties -->
-    <import file="${sf.common.config.dir}/common_props.ant.xml" />
-    
-    <!-- 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="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="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}"/>
-    
-    <!-- import all core HELIUM targets -->
-    <import file="${helium.dir}/helium.ant.xml" />
-    
-    <!-- import common references -->
-    <import file="${sf.common.config.dir}/common_refs.ant.xml" />
-             
-    <!-- conditional import of generated source spec if available -->
-    <if><available  file="${sf.common.config.dir}/generated/source-spec.ant.xml" />
-        <then>		    		
-            <echo message="Generated source spec found, importing..." />
-    				<import file="${sf.common.config.dir}/generated/source-spec.ant.xml"/>
-    		</then>
-    </if>
-    
-    <!--
-    ** TARGET DEFINITIONS
-    -->   
-    
-    <target name="sf-prep" depends="sf-generate-source-spec, prep-drive,init-build-area,check-tool-dependencies,create-bom,log-build-env">
-        <echo>[SF-PREP]</echo>
-        <tempfile property="prep.dynamic.config" suffix="ant.xml" destdir="${temp.build.dir}"/>
-    </target>
-        
-    <target name="sf-build-all" depends="sf-prebuild,sf-build-noprep,sf-postbuild">
-        <echo>[SF-BUILD-ALL]</echo>
-    </target>
-    
-    <target name="sf-build" depends="sf-prep,sf-prebuild,sf-build-noprep,sf-postbuild">
-        <echo>[SF-BUILD]</echo>
-    </target>
-    
-    <target name="sf-parse-project-config">
-    <!-- TODO: Parse the project config and generate properties and csv file to be
-    used by the builds. -->
-        <echo message="Parse the project configuration" />
-    </target>
-    
-    <target name="sf-generate-source-spec" depends="sf-parse-project-config">
-        <!-- TODO: 1. Same file name souce-spec.ant.xml is used for all packages
-        for multiple package builds, this needs to be linked with package name. -->
-        <!-- TODO: 2. Change fmpp data to be a full property rather than relative path -->
-        
-        <fmpp sourceFile="${sf.common.config.dir}/templates/source-spec.ant.xml.ftl"
-              outputFile="${sf.common.config.dir}/generated/source-spec.ant.xml">
-              <data expandProperties="yes">
-                    ant: antProperties()
-                    data: csv(${sf.project.location}/${sf.spec.sourcesync.sourcespecfile}, {separator:','})
-              </data>
-        </fmpp>
-    </target>
-    
-    <target name="sf-prebuild">
-        <echo>[SF-PREBUILD]</echo>
-        
-        <if>
-            <istrue value="${sf.spec.baseline.enable}" />
-            <then>
-                <runtarget target="preparation-getenv"/>
-            </then>
-        </if>
-        
-        <if>
-            <istrue value="${sf.spec.sourcesync.enable}" />
-            <then>
-                <runtarget target="sf-get-source"/>
-            </then>
-        </if>     
-    </target>
-    
-  <target name="sf-postbuild" depends="sf-zip-logs">
-    <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>
-    
-		
-    <!-- package all logs into zipfile before publish -->
-    <target name="sf-zip-logs">
-		<if><istrue value="${sf.spec.logs.zip.enable}"/>
-			<then>
-				<property name="temp.log.zip" value="${env.TEMP}/build_logs_${sf.spec.job.name}_${build.number}.zip"/>
-				<echo message="Zip log requested, zipping logs..."/>
-				<zip destfile="${temp.log.zip}" basedir="${build.log.dir}"/>
-				<move file="${temp.log.zip}" todir="${build.log.dir}" failonerror="false"/>
-			</then>
-		</if>
-    </target>
-	
-	<!-- generate dir list using passed location and name 
-	if a baseline list is available then generate deltas too -->
-	
-	<target name="sf-list-dir">
-		<property name="sf.currentlist.name"   value="${sf.list.name}"/> 
-		<property name="sf.dir.location" value="${build.drive}/epoc32"/> 
-		
-		<if><istrue value="${sf.spec.dirlist.enable}"/>
-			<then>
-			<echo message="Dirlist name: ${sf.currentlist.name} requested for ${sf.dir.location}"/>
-			<exec executable="perl" dir="${build.log.dir}/" failonerror="true" output="${build.log.dir}/listdir_${build.id}_${sf.currentlist.name}.log">
-				<arg value="${sf.common.config.dir}/tools/listdir.pl"/>
-				<arg value="${sf.dir.location}"/>
-			</exec>
-			</then>
-		</if>
-	</target>
-	
-	<target name="sf-delta-dir">
-		<property name="sf.currentlist_a.name"   value="${sf.list_b.name}"/> 
-		<property name="sf.currentlist_b.name"   value="${sf.list_b.name}"/>
-		<property name="sf.dir.location" value="${build.drive}/epoc32"/> 
-    		
-		<if><istrue value="${sf.spec.dirdelta.enable}"/>
-		<then>
-		<echo message="Delta requested for ${sf.currentlist_a.name} vs ${sf.currentlist_b.name} "/>
-			<exec executable="perl" dir="${build.log.dir}/" failonerror="true" output="${build.log.dir}/listdir_${build.id}_${sf.currentlist_b.name}_delta.log">
-				<arg value="${sf.common.config.dir}/tools/difflist.pl"/>
-				<arg value="${build.log.dir}/listdir_${build.id}_${sf.currentlist_a.name}.log"/>
-				<arg value="${build.log.dir}/listdir_${build.id}_${sf.currentlist_b.name}.log"/>
-			</exec>
-		</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 -->
- 	
-    	<!-- hlm:argSet id="sbs.tools.var">
-			<hlm:arg name="config" value="${sf.spec.sbs.config}" />
-			<hlm:arg name="singlejob" value="..." />
-			<hlm:arg name="enable-filter" value="..." />
-		</hlm:argSet -->
-    	
-        <!-- target name="compile-main-prebuild" -->
-        <antcall target="compile-main" inheritAll="false">
-            <param name="build.system" value="${sf.spec.build.system}"/>
-            <param name="sysdef.configurations.list" value="${sf.spec.sysdef.configurations.list}" />
-            <!--<reference refid="sf.system.definition.files" torefid="system.definition.files" />-->
-        </antcall>    
-    </target>
-    
-    <target name="sf-get-source" depends="sf-generate-source-spec">
-        <ant antfile="${sf.common.config.dir}/generated/source-spec.ant.xml" />
-    </target>
-
-
-</project>
-
-
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="SF-COMMON-CONFIG">
+
+    <property environment="env"/> <!-- make environment variables available via env -->
+    
+    <dirname property="sf.common.config.dir" file="${ant.file.SF-COMMON-CONFIG}"/>
+    
+    <!-- import common properties -->
+    <import file="${sf.common.config.dir}/common_props.ant.xml" />
+    
+    <!-- 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="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="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}"/>
+    
+    <!-- import all core HELIUM targets -->
+    <import file="${helium.dir}/helium.ant.xml" />
+    
+    <!-- import common references -->
+    <import file="${sf.common.config.dir}/common_refs.ant.xml" />
+             
+    <!-- conditional import of generated source spec if available -->
+    <if><available  file="${sf.common.config.dir}/generated/source-spec.ant.xml" />
+        <then>		    		
+            <echo message="Generated source spec found, importing..." />
+    				<import file="${sf.common.config.dir}/generated/source-spec.ant.xml"/>
+    		</then>
+    </if>
+    
+    <!--
+    ** TARGET DEFINITIONS
+    -->   
+    
+    <target name="sf-prep" depends="sf-generate-source-spec,prep-drive,init-build-area,check-tool-dependencies,create-bom,log-build-env">
+        <echo>[SF-PREP]</echo>
+        <tempfile property="prep.dynamic.config" suffix="ant.xml" destdir="${temp.build.dir}"/>
+    </target>
+        
+    <target name="sf-build-all" depends="sf-prebuild,sf-build-noprep,sf-postbuild">
+        <echo>[SF-BUILD-ALL]</echo>
+    </target>
+    
+    <target name="sf-build" depends="sf-prep,sf-prebuild,sf-build-noprep,sf-postbuild">
+        <echo>[SF-BUILD]</echo>
+    </target>
+    
+    <target name="sf-parse-project-config">
+    <!-- TODO: Parse the project config and generate properties and csv file to be
+    used by the builds. -->
+        <echo message="Parse the project configuration" />
+    </target>
+    
+    <target name="sf-generate-source-spec" depends="sf-parse-project-config">
+        <!-- TODO: 1. Same file name souce-spec.ant.xml is used for all packages
+        for multiple package builds, this needs to be linked with package name. -->
+        <!-- TODO: 2. Change fmpp data to be a full property rather than relative path -->
+        
+        <fmpp sourceFile="${sf.common.config.dir}/templates/source-spec.ant.xml.ftl"
+              outputFile="${sf.common.config.dir}/generated/source-spec.ant.xml">
+              <data expandProperties="yes">
+                    ant: antProperties()
+                    data: csv(${sf.project.location}/${sf.spec.sourcesync.sourcespecfile}, {separator:','})
+              </data>
+        </fmpp>
+    </target>
+    
+    <target name="sf-prebuild">
+        <echo>[SF-PREBUILD]</echo>
+        
+        <!-- create BOM dir -->
+        <mkdir dir="${build.drive}/output/logs/BOM"/>
+        
+        <!-- record project and config information in BOM files -->
+        <delete file="${build.drive}/output/logs/BOM/config.csv" quiet="true"/>
+        <exec executable="hg" dir="${sf.config.dir}" outputproperty="sf.job.bom.config.repo">
+            <arg value="showconfig"/>
+            <arg value="paths.default"/>
+        </exec>
+        <exec executable="hg" dir="${sf.config.dir}" outputproperty="sf.job.bom.config.rev">
+            <arg value="identify"/>
+            <arg value="-n"/>
+        </exec>
+        <exec executable="hg" dir="${sf.config.dir}" outputproperty="sf.job.bom.config.checksum">
+            <arg value="identify"/>
+            <arg value="-i"/>
+        </exec>
+        <echo message="dir ${sf.config.dir} : revision ${sf.job.bom.config.rev}:${sf.job.bom.config.checksum}"/>
+        <exec executable="cmd" output="${build.drive}/output/logs/BOM/config.csv" append="true">
+            <arg value="/c"/>
+            <arg value="echo"/>
+            <arg value="${sf.job.bom.config.repo},sf-config,${sf.job.bom.config.rev}:${sf.job.bom.config.checksum}"/>
+        </exec>
+        <delete file="${build.drive}/output/logs/BOM/project.csv" quiet="true"/>
+        <exec executable="hg" dir="${sf.config.dir}/../build/config" outputproperty="sf.job.bom.project.repo">
+            <arg value="showconfig"/>
+            <arg value="paths.default"/>
+        </exec>
+        <exec executable="hg" dir="${sf.config.dir}/../build/config" outputproperty="sf.job.bom.project.rev">
+            <arg value="identify"/>
+            <arg value="-n"/>
+        </exec>
+        <exec executable="hg" dir="${sf.config.dir}/../build/config" outputproperty="sf.job.bom.project.checksum">
+            <arg value="identify"/>
+            <arg value="-i"/>
+        </exec>
+        <echo message="dir ${sf.config.dir}/../build/config : revision ${sf.job.bom.project.rev}:${sf.job.bom.project.checksum}"/>
+        <exec executable="cmd" output="${build.drive}/output/logs/BOM/project.csv" append="true">
+            <arg value="/c"/>
+            <arg value="echo"/>
+            <arg value="${sf.job.bom.project.repo},build/config,${sf.job.bom.project.rev}:${sf.job.bom.project.checksum}"/>
+        </exec>
+        
+        <if>
+            <istrue value="${sf.spec.baseline.enable}" />
+            <then>
+            
+                <!-- record baseline information in BOM file -->
+                <delete file="${build.drive}/output/logs/BOM/baseline.txt" quiet="true"/>
+                <exec executable="cmd" output="${build.drive}/output/logs/BOM/baseline.txt">
+                    <arg value="/c"/>
+                    <arg value="echo"/>
+                    <arg value="${sf.spec.baseline.location}"/>
+                </exec>
+                
+                <!-- run interal target preparation-getenv -->
+                <runtarget target="preparation-getenv"/>
+                
+            </then>
+        </if>
+        
+        <if>
+            <istrue value="${sf.spec.sourcesync.enable}" />
+            <then>
+                <runtarget target="sf-get-source"/>
+            </then>
+        </if>
+        
+      <if>
+        <istrue value="${sf.spec.publish.enable}"/>
+        <then>
+          <runtarget target="sf-diamondize-bom"/>
+        </then>
+      </if>
+    </target>
+    
+  <target name="sf-postbuild" depends="sf-zip-logs">
+    <echo>[SF-POSTBUILD]</echo>
+    
+    <!-- TAG SOURCE CODE -->
+    <if>
+      <istrue value="${sf.spec.tagafterbuild.enable}" />
+      <then>
+        <echo message="Apply tag to the source code used in this build"/>
+        <runtarget target="sf-tag-hg-code"/>
+      </then>
+    </if>
+
+    <!-- PUBLISH LOGS/REPORTS -->
+    <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>
+
+  <!-- package all logs into zipfile before publish -->
+  <target name="sf-zip-logs">
+    <if>
+      <istrue value="${sf.spec.logs.zip.enable}"/>
+      <then>
+        <property name="temp.log.zip" value="${env.TEMP}/build_logs_${sf.spec.job.name}_${build.number}.zip"/>
+        <echo message="Zip log requested, zipping logs..."/>
+        <zip destfile="${temp.log.zip}" basedir="${build.log.dir}"/>
+        <move file="${temp.log.zip}" todir="${build.log.dir}" failonerror="false"/>
+      </then>
+    </if>
+  </target>
+
+  <!-- generate dir list using passed location and name 
+  if a baseline list is available then generate deltas too -->
+
+  <target name="sf-list-dir">
+    <property name="sf.currentlist.name"   value="${sf.list.name}"/> 
+    <property name="sf.dir.location" value="${build.drive}/epoc32"/> 
+
+    <if>
+      <istrue value="${sf.spec.dirlist.enable}"/>
+      <then>
+        <echo message="Dirlist name: ${sf.currentlist.name} requested for ${sf.dir.location}"/>
+        <exec executable="perl" dir="${build.log.dir}/" failonerror="true" output="${build.log.dir}/listdir_${build.id}_${sf.currentlist.name}.log">
+          <arg value="${sf.common.config.dir}/tools/listdir.pl"/>
+          <arg value="${sf.dir.location}"/>
+        </exec>
+      </then>
+    </if>
+  </target>
+	
+  <target name="sf-delta-dir">
+    <property name="sf.currentlist_a.name"   value="${sf.list_b.name}"/> 
+    <property name="sf.currentlist_b.name"   value="${sf.list_b.name}"/>
+    <property name="sf.dir.location" value="${build.drive}/epoc32"/> 
+    		
+    <if>
+      <istrue value="${sf.spec.dirdelta.enable}"/>
+      <then>
+        <echo message="Delta requested for ${sf.currentlist_a.name} vs ${sf.currentlist_b.name} "/>
+        <exec executable="perl" dir="${build.log.dir}/" failonerror="true" output="${build.log.dir}/listdir_${build.id}_${sf.currentlist_b.name}_delta.log">
+          <arg value="${sf.common.config.dir}/tools/difflist.pl"/>
+          <arg value="${build.log.dir}/listdir_${build.id}_${sf.currentlist_a.name}.log"/>
+          <arg value="${build.log.dir}/listdir_${build.id}_${sf.currentlist_b.name}.log"/>
+        </exec>
+      </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 -->
+ 	
+    	<!-- hlm:argSet id="sbs.tools.var">
+			<hlm:arg name="config" value="${sf.spec.sbs.config}" />
+			<hlm:arg name="singlejob" value="..." />
+			<hlm:arg name="enable-filter" value="..." />
+		</hlm:argSet -->
+    	
+        <!-- target name="compile-main-prebuild" -->
+        <antcall target="compile-main" inheritAll="false">
+            <param name="build.system" value="${sf.spec.build.system}"/>
+            <param name="sysdef.configurations.list" value="${sf.spec.sysdef.configurations.list}" />
+            <!--<reference refid="sf.system.definition.files" torefid="system.definition.files" />-->
+        </antcall>    
+    </target>
+    
+    <target name="sf-get-source" depends="sf-generate-source-spec">
+        <ant antfile="${sf.common.config.dir}/generated/source-spec.ant.xml" />
+    </target>
+    
+    <target name="sf-tag-hg-code">
+      <property name="sf.tagafterbuild.tag" value="${sf.spec.job.name}_${sf.spec.job.codeline}.${sf.spec.job.number}"/>
+      <fmpp sourceFile="${sf.common.config.dir}/templates/tag-hg-code.ant.xml.ftl"
+            outputFile="${sf.common.config.dir}/generated/tag-hg-code.ant.xml">
+        <data expandProperties="yes">
+              ant: antProperties()
+              data: csv(${sf.project.location}/${sf.spec.sourcesync.sourcespecfile}, {separator:','})
+        </data>
+      </fmpp>
+      <ant antfile="${sf.common.config.dir}/generated/tag-hg-code.ant.xml"/>
+    </target>
+    
+    <target name="sf-diamondize-bom">
+      <fmpp sourceFile="${sf.common.config.dir}/templates/build-info.xml.ftl"
+            outputFile="${build.drive}/output/logs/BOM/build-info.xml">
+        <data expandProperties="yes">
+              ant: antProperties()
+              config: csv(${build.drive}/output/logs/BOM/config.csv,{separator:',',headers:[loc,dst,rev]})
+              project: csv(${build.drive}/output/logs/BOM/project.csv,{separator:',',headers:[loc,dst,rev]})
+              baseline: slicedText(${build.drive}/output/logs/BOM/baseline.txt,{trim})
+              sources: csv(${build.drive}/output/logs/BOM/sources.csv,{separator:',',headers:[loc,dst,rev]})
+              
+        </data>
+      </fmpp>
+    </target>
+
+</project>
+
+
--- a/common/common_props.ant.xml	Wed Apr 15 14:15:35 2009 +0100
+++ b/common/common_props.ant.xml	Wed Apr 15 16:46:01 2009 +0100
@@ -8,7 +8,7 @@
     <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.drive" value="M:"/>
     <property name="sf.spec.job.freespace" value="10"/>
     <property name="sf.spec.email.from" value="fbf@symbian.org"/> <!-- needs to be defined for S60 platform builds -->
     
@@ -45,8 +45,8 @@
     <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="\\lon-engbuild68\d$\SF_builds"/>
-    <property name="sf.spec.publish.rootdir" value="\\lon-engbuild68\d$\SF_builds"/>
+    <property name="sf.spec.publish.networkdrive" value="\\lon-engbuild87\d$\SF_builds"/>
+    <property name="sf.spec.publish.rootdir" value="\\lon-engbuild87\d$\SF_builds"/>
     
     <property name="sf.spec.tagafterbuild.enable" value="true"/>
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common/templates/build-info.xml.ftl	Wed Apr 15 16:46:01 2009 +0100
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<diamonds-build>
+  <content>
+    <project>
+      <name>Config</name>
+      <#list config as c>
+ 	  <baseline>${c.loc}#${c.rev}</baseline>
+ 	  </#list>
+    </project>
+    <project>
+      <name>Project</name>
+      <#list project as p>
+ 	  <baseline>${p.loc}#${p.rev}</baseline>
+ 	  </#list>
+    </project>
+    <project>
+      <name>Baseline</name>
+      <#list baseline as b>
+      <baseline>${b}</baseline>
+      </#list>
+    </project>
+    <project>
+ 	  <name>Sources</name>
+ 	  <#list sources as s>
+ 	  <baseline>${s.loc}#${s.rev}</baseline>
+ 	  </#list>
+    </project>
+  </content>
+</diamonds-build>
--- a/common/templates/source-spec.ant.xml.ftl	Wed Apr 15 14:15:35 2009 +0100
+++ b/common/templates/source-spec.ant.xml.ftl	Wed Apr 15 16:46:01 2009 +0100
@@ -6,6 +6,11 @@
 <#assign dollar = "$"/>
 <#assign count = 0 />
 
+    <!-- remove previous version of BOM file (if exists)  -->
+    <target name="reset-bom-sources-csv">
+        <delete file="${ant['build.drive']}/output/logs/BOM/sources.csv" quiet="true"/>
+    </target>
+
 <#list data as pkg_detail>
     <target name="sf-prebuild-${count}">
         <#if (count > 0) >
@@ -23,6 +28,23 @@
                     </hlm:latestTag>
                 </hlm:update>
             </hlm:scm>
+            
+            <!-- record info on source code repo/rev in BOM file  -->
+            <exec executable="hg" dir="${ant['build.drive']}${pkg_detail.dst}" outputproperty="sf.sourcesync.${count}.rev">
+                <arg value="identify"/>
+                <arg value="-n"/>
+            </exec>
+            <exec executable="hg" dir="${ant['build.drive']}${pkg_detail.dst}" outputproperty="sf.sourcesync.${count}.checksum">
+                <arg value="identify"/>
+                <arg value="-i"/>
+            </exec>
+            <echo message="dir ${ant['build.drive']}${pkg_detail.dst} : revision ${dollar}{sf.sourcesync.${count}.rev}:${dollar}{sf.sourcesync.${count}.checksum}"/>
+            <exec executable="cmd" output="${ant['build.drive']}/output/logs/BOM/sources.csv" append="true">
+                <arg value="/c"/>
+                <arg value="echo"/>
+                <arg value="${pkg_detail.source},${pkg_detail.dst},${dollar}{sf.sourcesync.${count}.rev}:${dollar}{sf.sourcesync.${count}.checksum}"/>
+            </exec>
+        
         </sequential>
     </target>
     
@@ -37,7 +59,7 @@
         ${fileset}
     </path>
 
-<target name="all">
+<target name="all" depends="reset-bom-sources-csv">
 
   <parallel>
     ${sync_list}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common/templates/tag-hg-code.ant.xml.ftl	Wed Apr 15 16:46:01 2009 +0100
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<project name="SF-TAG-HG-CODE" default="all" xmlns:hlm="http://www.nokia.com/helium">
+
+<#assign target_depends = "" />
+<#assign count = 0 />
+
+<#list data as pkg_detail>
+    <target name="sf-tag-hg-code-${count}">
+        <sequential>
+        
+          <trycatch> <!-- build must not fail if this command gives an error -->
+            <try>
+              <hlm:scm verbose="true" scmUrl="scm:hg:${pkg_detail.source}">
+                <hlm:tag basedir="${ant['sf.spec.job.drive']}${pkg_detail.dst}" name="${ant['sf.tagafterbuild.tag']}" level="normal"/>
+              </hlm:scm>
+            </try>
+            <catch>
+              <echo message="WARNING: failed to tag code with label '${ant['sf.tagafterbuild.tag']}' (does the tag already exist?)"/>
+            </catch>
+          </trycatch>
+          
+        </sequential>
+    </target>
+    
+    <#if (count == 0) >
+    				<#assign target_depends = "${target_depends}" + "sf-tag-hg-code-${count}" />
+    </#if>
+    <#if (count > 0) >
+            <#assign target_depends ="${target_depends}" + ","+"sf-tag-hg-code-${count}"/>
+    </#if>
+    
+    <#assign count = count + 1 />
+</#list>
+
+<target name="all" depends="${target_depends}"/>
+
+</project>
\ No newline at end of file