--- a/common/build.xml Fri May 29 14:45:54 2009 +0100
+++ b/common/build.xml Fri May 29 14:58:58 2009 +0100
@@ -145,7 +145,6 @@
<istrue value="${sf.spec.sourcesync.enable}" />
<then>
<runtarget target="sf-get-source"/>
- <runtarget target="sf-merge-epoc32"/>
<if><istrue value="${sf.spec.package.src.enable}"/>
<then>
@@ -153,6 +152,8 @@
<runtarget target="sf-package-source"/>
</then>
</if>
+
+ <runtarget target="sf-unpack-rnd"/>
</then>
<else>
<!-- record fact that no sources.csv used. required by diamondize-bom -->
@@ -169,10 +170,7 @@
<target name="sf-postbuild">
<echo>[SF-POSTBUILD]</echo>
-
- <!-- run build analysis tools -->
- <runtarget target="sf-run-analysis"/>
-
+
<!-- TAG SOURCE CODE -->
<if>
<istrue value="${sf.spec.tagafterbuild.enable}" />
@@ -190,12 +188,15 @@
</then>
</if>
- <if><istrue value="${sf.spec.test.send.enable}"/>
+ <if><istrue value="${sf.spec.test.sendpkg.enable}"/>
<then>
<runtarget target="sf-send-testpkg"/>
</then>
</if>
+ <!-- run build analysis tools -->
+ <runtarget target="sf-run-analysis"/>
+
<runtarget target="sf-zip-logs"/>
<!-- PUBLISH LOGS/REPORTS -->
@@ -342,6 +343,7 @@
</target>
<target name="sf-preprocess-package-config">
+ <mkdir dir="${sf.common.config.dir}/generated"/>
<exec executable="perl" dir="${build.drive}/" failonerror="false" output="${build.log.dir}/zipconfig.log">
<arg value="${sf.common.config.dir}/tools/populateziptemplate.pl"/>
<arg value="${sf.project.location}/${sf.spec.sourcesync.sourcespecfile}"/>
@@ -363,40 +365,35 @@
</antcall>
</target>
- <target name="sf-package-binary" depends="sf-preprocess-package-config">
+ <target name="sf-package-binary" depends="sf-preprocess-package-config,sf-package-postbuild-rnd">
<!--antcall target="sf-zip-content">
<param name="zip.config.file" value="${sf.common.config.dir}/generated/zip.cfg.xml.ftl"/>
<param name="zip.target.name" value="bin" />
</antcall-->
- <if><available file="${build.drive}/rnd/internal/initial" type="dir" />
+ <if><available file="${build.drive}/rnd_excludefile.txt" />
<then>
- <!-- get listing of rnd location for exclude later -->
- <antcall target="sf-list-dir" inheritAll="false">
- <param name="sf.list.name" value="rnd_binaries"/>
- <param name="sf.dir.location" value="${build.drive}/rnd/internal/initial"/>
- </antcall>
<echo message="Packaging with exclude list"/>
<exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_binaries_epoc32.log">
<arg value="a"/>
<arg value="-tzip"/>
- <arg value="-x@${build.log.dir}/listdir_${build.id}_rnd_binaries.log"/> <!-- excludes -->
+ <arg value="-x@${build.drive}/rnd_excludefile.txt"/> <!-- excludes -->
<arg value="-x!epoc32\build"/>
<arg value="-xr!*.sym"/>
<arg value="binaries_epoc.zip"/>
<arg value="epoc32\"/>
- </exec>
+ </exec>
+ <move file="${build.drive}/rnd_excludefile.txt" todir="${build.log.dir}/"/>
</then>
<else>
- <echo message="Packaging without exclude list"/>
- <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_binaries_epoc32.log">
+ <echo message="Packaging without exclude list"/>
+ <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_binaries_epoc32.log">
<arg value="a"/>
<arg value="-tzip"/>
<arg value="-x!epoc32\build"/> <!-- excludes -->
<arg value="-xr!*.sym"/>
<arg value="binaries_epoc.zip"/>
<arg value="epoc32\"/>
-
</exec>
</else>
</if>
@@ -405,23 +402,31 @@
</if>
</target>
- <target name="sf-merge-epoc32">
- <!-- conditional execution of merge if rnd dir is found -->
- <if><available file="${build.drive}/rnd" type="dir" />
- <then>
- <echo message="RnD binaries found, fast-copying into ${build.drive}/epoc32 tree"/>
- <hlm:fastcopy todir="${build.drive}/epoc32" verbose="true" overwrite="true" threadCount="4">
- <fileset dir="${build.drive}/rnd">
- <exclude name="**/.hg/**"/>
- </fileset>
- <regexpmapper from="internal/initial/epoc32/(.*)" to="\1" handledirsep="true"/>
- <!--regexpmapper from="[^/]+/[^/]+/epoc32/(.*)" to="\1" handledirsep="true"/-->
- <!-- TODO make match exactly 2 levels deep otherwise nested epoc32 trees will also be merged -->
- </hlm:fastcopy>
- </then>
- </if>
+ <target name="sf-package-postbuild-rnd" depends="sf-preprocess-package-config">
+
+ <!-- zip any RnD _includefile.txt files generated during source packaging -->
+ <exec executable="perl" dir="${build.drive}/" failonerror="false" output="${build.log.dir}/zip_postbuild.log">
+ <arg value="${sf.common.config.dir}/tools/zip_includefiles.pl"/>
+ </exec>
+ <!-- cleanup my moving includefiles to logs and zips to zips\postbuild -->
+ <move todir="${build.log.dir}">
+ <fileset dir="${build.drive}"><include name="*_includefile.txt"/></fileset>
+ </move>
+ <move todir="${build.drive}/output/zips/postbuild">
+ <fileset dir="${build.drive}"><include name="bin_rnd_*.zip"/></fileset>
+ </move>
+ <!-- TODO: merge with release_metadata.xml ? -->
</target>
-
+
+ <!-- unpack rnd zips if available -->
+ <target name="sf-unpack-rnd">
+ <echo message="Unpacking any available RnD binaries"/>
+ <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/unzip_${build.id}_binaries_rnd.log">
+ <arg value="x"/>
+ <arg value="${build.drive}/output/zips/bin_rnd*.zip"/>
+ </exec>
+ </target>
+
<target name ="sf-make-junction">
<mkdir dir="${sf.spec.test.epocroot}"/>
@@ -472,7 +477,7 @@
</exec>
<echo message="Running whatlog analysis"/>
- <exec executable="perl" dir="${build.log.dir}/analysis" failonerror="false" output="${build.log.dir}/analysis/${build.id}_what_results.log">
+ <exec executable="perl" dir="${build.log.dir}/analysis" failonerror="false" output="${build.log.dir}/analysis/${build.id}_what_results.csv">
<arg value="${sf.common.config.dir}/tools/analysis/parsewhatlog.pl"/>
<arg value="..\"/>
</exec>
@@ -480,8 +485,14 @@
<echo message="Running summary analysis"/>
<exec executable="perl" dir="${build.log.dir}/analysis" failonerror="false" output="${build.log.dir}/analysis/${build.id}_summary.log">
<arg value="${sf.common.config.dir}/tools/analysis/merge_csv.pl"/>
+ <arg value="${build.id}_what_results.csv"/>
<arg value="${build.id}_list_results.log"/>
- <arg value="${build.id}_what_results.log"/>
+ </exec>
+
+ <echo message="Running collision analysis"/>
+ <exec executable="perl" dir="${build.drive}" failonerror="false" output="${build.log.dir}/analysis/${build.id}_collisions.log">
+ <arg value="${sf.common.config.dir}/tools/analysis/find_collisions.pl"/>
+ <arg value="${build.log.dir}/analysis/${build.id}_what_results.csv"/>
</exec>
</target>