# HG changeset patch # User DarioS@UK-DarioS.symbian.int # Date 1239188344 -3600 # Node ID d835e951a92578aab172dcd7e4c7f1630e7a2f55 # Parent 34dc6e6caaa497196eac896be64c03028517da33 New implementation of generation of BOM sources.csv diff -r 34dc6e6caaa4 -r d835e951a925 common/build.xml --- a/common/build.xml Mon Apr 06 11:09:18 2009 +0100 +++ b/common/build.xml Wed Apr 08 11:59:04 2009 +0100 @@ -43,7 +43,7 @@ ** TARGET DEFINITIONS --> - <target name="sf-prep" depends="sf-generate-source-spec, prep-drive,init-build-area,check-tool-dependencies,create-bom,log-build-env"> + <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> @@ -79,6 +79,9 @@ <target name="sf-prebuild"> <echo>[SF-PREBUILD]</echo> + <!-- create BOM dir --> + <mkdir dir="${build.drive}/output/BOM"/> + <if> <istrue value="${sf.spec.baseline.enable}" /> <then> diff -r 34dc6e6caaa4 -r d835e951a925 common/templates/source-spec.ant.xml.ftl --- a/common/templates/source-spec.ant.xml.ftl Mon Apr 06 11:09:18 2009 +0100 +++ b/common/templates/source-spec.ant.xml.ftl Wed Apr 08 11:59:04 2009 +0100 @@ -6,6 +6,9 @@ <#assign dollar = "$"/> <#assign count = 0 /> +<!-- remove actual_sources.csv file --> +<delete file="${ant['build.drive']}/output/BOM/sources.csv" quiet="true"/> + <#list data as pkg_detail> <target name="sf-prebuild-${count}"> <#if (count > 0) > @@ -26,6 +29,19 @@ <exec command="hg identify -i" dir="${ant['build.drive']}${pkg_detail.dst}" outputproperty="sf.sourcesync.repo.i"/> <echo message="dir ${ant['build.drive']}${pkg_detail.dst} : revision ${sf.sourcesync.repo.n}:${sf.sourcesync.repo.i}"/> </hlm:scm> + + <!-- record info on sf-config repo/rev --> + <exec executable="hg" dir="${ant['build.drive']}${pkg_detail.dst}" outputproperty="sf.sourcesync.${count}.rev"> + <arg value="identify"/> + <arg value="-i"/> + </exec> + <echo message="dir ${ant['build.drive']}${pkg_detail.dst} : revision ${sf.sourcesync.${count}.rev}"/> + <exec executable="cmd" dir="${ant['build.drive']}/output/BOM" output="sources.csv" append="true"> + <arg value="/c"/> + <arg value="echo"/> + <arg value="${pkg_detail.source},${pkg_detail.dst},${sf.sourcesync.${count}.rev}"/> + </exec> + </sequential> </target> <#assign fileset = "${fileset}" + "<fileset dir=\"${ant['build.drive']}${pkg_detail.dst}\" includes=\"${pkg_detail.pattern}\"/>" />