Merge all changes fbf_configs_0.0.a
authorshaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
Fri, 06 Mar 2009 15:05:38 +0000
changeset 9 29394d95b3e1
parent 8 b7bfb0cc6f4a (diff)
parent 6 8bbcf7b2218d (current diff)
child 10 03654ea08a40
child 11 5a54277d3867
Merge all changes
common/build.xml
--- a/common/build.xml	Thu Mar 05 18:20:11 2009 +0000
+++ b/common/build.xml	Fri Mar 06 15:05:38 2009 +0000
@@ -1,88 +1,100 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project name="SF-COMMON-CONFIG">
-	<dirname property="sf.common.config.dir" file="${ant.file.SF-COMMON-CONFIG}"/>
 
-        <!-- import default properties file config -->
-        <import file="${sf.common.config.dir}/properties.default.ant.xml"/>        
-
-	<!-- import all core HELIUM targets -->
-	<import file="${helium.dir}/helium.ant.xml" />
-        
-        <!-- import sysdef file location config -->
-        <import file="${sf.common.config.dir}/../../build/hg-pkg-build.ant.xml"/>
+    <dirname property="sf.common.config.dir" file="${ant.file.SF-COMMON-CONFIG}"/>
+    
+    <!-- import default properties file config -->
+    <import file="${sf.common.config.dir}/properties.default.ant.xml"/>
+    
+    <!-- import all core HELIUM targets -->
+    <import file="${helium.dir}/helium.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 DEFINITIONS
-        -->
-        
-        <target name="sf-prep" depends="sf-parse-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" depends="sf-parse-spec,sf-prebuild,sf-build-run,sf-postbuild"-->
-        <target name="sf-build" depends="sf-parse-spec,sf-prebuild,sf-build-run">
-            <echo>[SF-BUILD]</echo>
-        </target>
-        
-        <target name="sf-build-noprep">
-            <echo>[SF-BUILD-NO-PREP]</echo>
-        </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 -->
         
-        <target name="sf-parse-spec">
-            <echo>[SF-PARSE-SPEC]</echo>
-            
-        </target>
-
-      <target name="sf-prebuild"> 
-            <echo>[SF-PREBUILD]</echo>                                    
-            
-            <if>
-                <istrue value="${sf.baseline.enable}" />
-                <then>
-                    <runtarget target="preparation-getenv"/>
-                </then>
-            </if>
-            
-            <if>
-                <istrue value="${sf.prebuild.getsrc}" />
-                <then>
-                    <runtarget target="sf-get-source"/>
-                </then>
-            </if>            
-            
-            
-        </target>
+        <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.common.config.dir}/../../build/config/${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>
         
-        <target name="sf-postbuild">            
-            <echo>[SF-POSTBUILD]</echo>                        
-        </target>        
-        
-        <target name="sf-build-run" depends="sf-compile">            
-            <echo>[SF-BUILD-RUN]</echo>
-        </target>
-
-        <target name="sf-compile">
-            
-                <!--<path id="sf.system.definition.files">
-                    <fileset dir="${sf.common.config.dir}/sysdefs" includes="*.sysdef.xml"/>
-                    <fileset dir="${build.drive}/sf/app/camera"        includes="*.sysdef.xml"/>
-                </path>
-                -->
-            
-            	<!-- target name="compile-main-prebuild" -->
-		<antcall target="compile-main" inheritAll="false">
-			<param name="build.system" value="sbs" />
-			<param name="sysdef.configurations.list" value="s60_build_clean,s60_build" />
-			<!--<reference refid="sf.system.definition.files" torefid="system.definition.files" />-->
-		</antcall>
-            
-        </target>
-
-
-    <target name="sf-get-source">
-        <ant antfile="${sf.common.config.dir}/../../build/hg-pkg-build.ant.xml" />
-    </target>        
+        <if>
+            <istrue value="${sf.spec.sourcesync.enable}" />
+            <then>
+                <runtarget target="sf-get-source"/>
+            </then>
+        </if>     
+    </target>
+    
+    <target name="sf-postbuild">
+        <echo>[SF-POSTBUILD]</echo>
+    </target>
+    
+    <target name="sf-build-noprep" depends="sf-compile">
+        <echo>[SF-BUILD-NOPREP]</echo>
+    </target>
+    
+    <target name="sf-compile">    
+        <!-- target name="compile-main-prebuild" -->
+        <antcall target="compile-main" inheritAll="false">
+            <param name="build.system" value="sbs" />
+            <param name="sysdef.configurations.list" value="s60_build_clean,s60_build" />
+            <!--<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>
 
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common/templates/source-spec.ant.xml.ftl	Fri Mar 06 15:05:38 2009 +0000
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<project name="hg-build-gen-xml" default="all" xmlns:hlm="http://www.nokia.com/helium">
+
+<#assign fileset = "" />
+<#assign target_depends = "" />
+<#assign dollar = "$"/>
+<#assign count = 0 />
+
+<#list data as pkg_detail>
+    <target name="sf-prebuild-${count}">
+        <#if (count > 0) >
+            <#assign fileset = "${fileset}" + "," />
+        </#if>
+        <sequential>
+            <delete dir="${ant['build.drive']}${pkg_detail.dst}" failonerror="false"/>
+            <mkdir dir="${ant['build.drive']}${pkg_detail.dst}"/>
+            <hlm:scm verbose="true" scmUrl="scm:hg:${pkg_detail.source}">
+                <hlm:checkout basedir="${ant['build.drive']}${pkg_detail.dst}"/>
+                <hlm:tags basedir="${ant['build.drive']}${pkg_detail.dst}" reference="hg.tags.id${dollar}{refid}"/>
+                <hlm:update basedir="${ant['build.drive']}${pkg_detail.dst}">
+                    <hlm:latestTag pattern="${pkg_detail.tag}">
+                        <hlm:tagSet refid="hg.tags.id${dollar}{refid}" />
+                    </hlm:latestTag>
+                </hlm:update>
+            </hlm:scm>
+        </sequential>
+    </target>
+    <#assign fileset = "${fileset}" + "<fileset dir=\"${ant['build.drive']}${pkg_detail.dst}\" includes=\"${pkg_detail.pattern}\"/>" />
+    <#assign target_depends = "${target_depends}" + "sf-prebuild-${count}" />
+    <#assign count = "${count}" + 1 />
+</#list>
+
+    <path id="system.definition.files">
+        <fileset dir="${dollar}{sf.common.config.dir}/sysdefs" includes="*.sysdef.xml"/>
+        ${fileset}
+    </path>
+
+<target name="all" depends="${target_depends}"/>
+
+</project>
\ No newline at end of file