sf-platform/build.xml
changeset 62 2771e394c9bd
parent 40 54444a2ae2db
child 65 0099c046d4f3
equal deleted inserted replaced
61:6066a7d39270 62:2771e394c9bd
     1 <?xml version="1.0" encoding="UTF-8"?>
     1 <?xml version="1.0" encoding="UTF-8"?>
     2 <project name="SF-PLATFORM-CONFIG">
     2 <project name="SF-PLATFORM-CONFIG" xmlns:hlm="http://www.nokia.com/helium">
     3   <!-- location of this config -->
     3   <!-- location of this config -->
     4   <dirname property="sf.platform.config.dir" file="${ant.file.SF-PLATFORM-CONFIG}"/>
     4   <dirname property="sf.platform.config.dir" file="${ant.file.SF-PLATFORM-CONFIG}"/>
     5   
     5 
     6   <!--
     6   <!--
     7   * Property defaults
     7   * Property defaults
     8    -->
     8    -->
     9 
     9 
    10   <!--
    10   <!--
    11   
    11   TODO if needed in future
    12   * Load platform specific properties. Mandatory that this file exists otherwise
    12 
    13   * the target will fail.
    13   * Load platform specific properties.
    14   
    14 
    15    -->
    15    -->
    16   <loadproperties srcFile="${sf.platform.config.dir}/platform.properties"/>
    16 
    17   
    17   <!-- workaround until GenXML can merge v2.0.0 fragments -->
       
    18   <target name="create-canonical-sysdef-file">
       
    19 
       
    20        <if>
       
    21           <!-- TODO use scripting to match this -->
       
    22           <equals arg1="${sf.spec.sysdef.version}" arg2="1.4.0" />
       
    23           <then>
       
    24             <echo message="Using System Definition v1.4.0 "/>
       
    25             <runtarget target="compile.create-canonical-sysdef-file"/>
       
    26           </then>
       
    27           <else>
       
    28             <runtarget target="preprocess-sysdef-files"/>
       
    29             <echo message="Exporting preprocessed System Definition"/>
       
    30 
       
    31             <!-- TODO use better method to export or wait for GenXML fix?-->
       
    32             <copy file="${build.output.dir}\build\input\0000000000000001_system_definition.xml"
       
    33                   tofile="${canonical.sysdef.file}" failonerror="true" verbose="true"/>
       
    34           </else>
       
    35         </if>
       
    36 
       
    37   </target>
       
    38 
       
    39   <!--
       
    40     == Name: PREPROCESS-SYSDEF-FILES
       
    41     ==
       
    42     == Desc: Override of default target in order to deal with symbian os
       
    43     ==       system_definition.xml that does not have /sf source prefix
       
    44     ==
       
    45     ==       TODO get this moved as a Helium core target?
       
    46     -->
       
    47   <target name="preprocess-sysdef-files">
       
    48         <mkdir dir="${build.output.dir}/build/input"/>
       
    49         <delete verbose="true">
       
    50             <fileset dir="${build.output.dir}/build/input/" includes="**"/>
       
    51         </delete>
       
    52 
       
    53         <for param="file">
       
    54             <resources refid="system.definition.files"/>
       
    55             <sequential>
       
    56                 <copy todir="${build.output.dir}/build/input" verbose="true">
       
    57                     <fileset file="@{file}"/>
       
    58                     <filterchain>
       
    59                         <replaceregex pattern="bldFile=&quot;os" replace="bldFile=&quot;sf\\\\os" flags="gi"/>
       
    60                         <replaceregex pattern="mrp=&quot;os" replace="mrp=&quot;sf\\\\os" flags="gi"/>
       
    61                         <replaceregex pattern="bldFile=&quot;mw" replace="bldFile=&quot;sf\\\\mw" flags="gi"/>
       
    62                         <replaceregex pattern="mrp=&quot;mw" replace="mrp=&quot;sf\\\\mw" flags="gi"/>
       
    63                         <replaceregex pattern="bldFile=&quot;app" replace="bldFile=&quot;sf\\\\app" flags="gi"/>
       
    64                         <replaceregex pattern="mrp=&quot;app" replace="mrp=&quot;sf\\\\app" flags="gi"/>
       
    65                         <expandproperties/>
       
    66                     </filterchain>
       
    67                     <mapper>
       
    68                         <scriptmapper language="jep" src="${helium.dir}/tools/common/jep/unique_filename.jep"/>
       
    69                     </mapper>
       
    70                 </copy>
       
    71             </sequential>
       
    72         </for>
       
    73     </target>
       
    74 
       
    75     <target name="generate-layers">
       
    76        <echo message="canno-file:${canonical.sysdef.file}"/>
       
    77        <echo message="raptor-filters:raptor_${sysdef.configuration}"/>
       
    78 
       
    79 	   <!-- split builds currently generate layer sysdef from original -->
       
    80 	   <if><istrue value="${sf.spec.splitbuild}"/>
       
    81        <then>
       
    82            <hlm:compileGenxmlFilterMacro xmlns:hlm="http://www.nokia.com/helium" input="${canonical.sysdef.file}" filter="raptor_${sysdef.configuration}" output="${build.output.dir}/build/canonical_system_definition_${sysdef.configuration}_temp.xml"/>
       
    83 	   </then>
       
    84 	   <else>
       
    85 	       <!-- but all we want is a sysdef with the config name appended, so just copy it -->
       
    86            <echo message="INFO: skip genxml and copy sysdef to sysdef+config name"/>
       
    87            <copy file="${canonical.sysdef.file}" tofile="${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}_temp.xml"/>
       
    88        </else>
       
    89     </if>
       
    90 
       
    91 	<copy file="${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}_temp.xml" tofile="${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}.xml">
       
    92 		<filterchain>
       
    93 			<linecontainsregexp negate="true">
       
    94 			  <regexp pattern="^\s*$"/>
       
    95 			</linecontainsregexp>
       
    96 		</filterchain>
       
    97 	</copy>
       
    98 	<delete file="${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}_temp.xml"/>
       
    99 	</target>
       
   100 
       
   101   <!--
       
   102     == Name: SF-COMPILE
       
   103     ==
       
   104     == Desc: Override of common sf-compile target defined in
       
   105     ==       common\build.xml
       
   106     ==
       
   107     ==       os  build will be skipped if sf.spec.os.skipbuild=true
       
   108     ==       s60 build will be skipped if sf.spec.s60.skipbuild=true
       
   109     ==
       
   110     -->
       
   111   <target name="sf-compile">
       
   112 
       
   113     <!-- TODO clean up to single target once genxml v2.0.0 merge is fixed -->
       
   114     <if><istrue value="${sf.spec.splitbuild}"/>
       
   115        <then>
       
   116        <if><istrue value="${sf.spec.os.skipbuild}" />
       
   117             <then><echo message="Skipping OS build"/></then>
       
   118        <else><runtarget target="sf-os-compile"/></else></if>
       
   119 
       
   120        <if><istrue value="${sf.spec.s60.skipbuild}" />
       
   121             <then><echo message="Skipping S60 build"/></then>
       
   122        <else><runtarget target="sf-s60-compile"/></else></if>
       
   123 	   </then>
       
   124 	   <else>
       
   125 	        <!-- TODO targets for single sysdef build -->
       
   126 	        <runtarget target="sf-os-compile"/>
       
   127 	   </else>
       
   128     </if>
       
   129   </target>
       
   130 
       
   131   <!--
       
   132     == Name: SF-OS-COMPILE
       
   133     ==
       
   134     == Desc: Compile OS part of build using the spec defined in:
       
   135     ==
       
   136     ==         - job_props.ant.xml
       
   137     ==         - job_refs.ant.xml
       
   138     ==
       
   139     -->
       
   140   <target name="sf-os-compile">
       
   141 
       
   142         <hlm:argSet id="sbs.tools2.var">
       
   143                 <hlm:arg name="config" value="tools2_rel" />
       
   144                 <hlm:arg name="singlejob" value="false" />
       
   145                 <hlm:arg name="enable-filter" value="${sf.spec.logs.raptorfilter.enable}" />
       
   146         </hlm:argSet>
       
   147 
       
   148 		<hlm:argSet id="sbs.tools2.clean.var">
       
   149                 <hlm:arg name="config" value="tools2_rel" />
       
   150                 <hlm:arg name="singlejob" value="false" />
       
   151                 <hlm:arg name="enable-filter" value="${sf.spec.logs.raptorfilter.enable}" />
       
   152 				<hlm:arg name="command" value="CLEAN" />
       
   153         </hlm:argSet>
       
   154 
       
   155         <hlm:argSet id="sbs.tools.var">
       
   156                 <hlm:arg name="config" value="tools_rel" />
       
   157                 <hlm:arg name="singlejob" value="true" />
       
   158                 <hlm:arg name="enable-filter" value="${sf.spec.logs.raptorfilter.enable}" />
       
   159         </hlm:argSet>
       
   160 
       
   161 		<hlm:argSet id="sbs.tools.clean.var">
       
   162                 <hlm:arg name="config" value="tools_rel" />
       
   163                 <hlm:arg name="singlejob" value="true" />
       
   164                 <hlm:arg name="enable-filter" value="${sf.spec.logs.raptorfilter.enable}" />
       
   165 				<hlm:arg name="command" value="CLEAN" />
       
   166         </hlm:argSet>
       
   167 
       
   168         <hlm:argSet id="sbs.main.sbs.var">
       
   169                 <hlm:arg name="config" value="${sf.spec.sbs.config}" />
       
   170                 <hlm:arg name="enable-filter" value="${sf.spec.logs.raptorfilter.enable}" />
       
   171         </hlm:argSet>
       
   172 
       
   173 		<hlm:argSet id="sbs.main.clean.sbs.var">
       
   174                 <hlm:arg name="config" value="${sf.spec.sbs.config}" />
       
   175                 <hlm:arg name="enable-filter" value="${sf.spec.logs.raptorfilter.enable}" />
       
   176 				<hlm:arg name="command" value="CLEAN" />
       
   177         </hlm:argSet>
       
   178 		
       
   179 		<hlm:argSet id="sbs.main.what.sbs.var">
       
   180                 <hlm:arg name="config" value="${sf.spec.sbs.config}" />
       
   181                 <hlm:arg name="enable-filter" value="${sf.spec.logs.raptorfilter.enable}" />
       
   182 				<hlm:arg name="command" value="WHAT" />
       
   183         </hlm:argSet>
       
   184 
       
   185         <hlm:sbsMakeOptions engine="gmake" id="sbs.toolsbuild.options" />
       
   186         <hlm:sbsMakeOptions engine="gmake" id="sbs.fullbuild.options" />
       
   187 
       
   188 		<!-- generate baseline dir list to allow delta creation -->
       
   189 		<antcall target="sf-list-dir" inheritAll="false">
       
   190 			<param name="sf.list.name" value="baseline"/>
       
   191 		</antcall>
       
   192 
       
   193 		<!-- OS what -->
       
   194         <antcall target="compile-main" inheritAll="false" inheritRefs="true">
       
   195                 <param name="build.system" value="${sf.spec.build.system}" />
       
   196                 <param name="compile.sysdef.dtd.stub" value="${sf.spec.os.sysdef.dtd}" />
       
   197                 <param name="sysdef.configurations.list" value="${sf.spec.os.sysdef.clean.configurations.list}" />
       
   198                 <param name="sf.spec.sysdef.version" value ="${sf.spec.os.sysdef.version}"/>
       
   199                 <reference refid="sbs.main.what.sbs.var" torefid="sbs.var" />
       
   200                 <reference refid="sbs.fullbuild.options" torefid="sbs.make.options" />
       
   201                 <reference refid="sf.spec.os.system.definition.files" torefid="system.definition.files" />
       
   202         </antcall>
       
   203 		
       
   204 		<!-- OS clean main build -->
       
   205         <antcall target="compile-main" inheritAll="false" inheritRefs="true">
       
   206                 <param name="build.system" value="${sf.spec.build.system}" />
       
   207                 <param name="compile.sysdef.dtd.stub" value="${sf.spec.os.sysdef.dtd}" />
       
   208                 <param name="sysdef.configurations.list" value="${sf.spec.os.sysdef.clean.configurations.list}" />
       
   209                 <param name="sf.spec.sysdef.version" value ="${sf.spec.os.sysdef.version}"/>
       
   210                 <reference refid="sbs.main.clean.sbs.var" torefid="sbs.var" />
       
   211                 <reference refid="sbs.fullbuild.options" torefid="sbs.make.options" />
       
   212                 <reference refid="sf.spec.os.system.definition.files" torefid="system.definition.files" />
       
   213         </antcall>
       
   214 		
       
   215 		<antcall target="sf-list-dir" inheritAll="false">
       
   216 			<param name="sf.list.name" value="post-clean"/>
       
   217 		</antcall>
       
   218 
       
   219 		<!-- what has been cleaned from baseline PDK by sos model -->
       
   220 		<antcall target="sf-delta-dir" inheritAll="false">
       
   221 			<param name="sf.list_a.name" value="baseline"/>
       
   222 			<param name="sf.list_b.name" value="post-clean"/>
       
   223 		</antcall>		
       
   224 		
       
   225         <!-- OS tools2 build first-->
       
   226         <antcall target="compile-main" inheritAll="false" inheritRefs="true">
       
   227                 <param name="build.system" value="${sf.spec.build.system}" />
       
   228                 <param name="compile.sysdef.dtd.stub" value="${sf.spec.os.sysdef.dtd}" />
       
   229                 <param name="sysdef.configurations.list" value="${sf.spec.os.sysdef.clean.configurations.list}" />
       
   230                 <param name="sf.spec.sysdef.version" value ="${sf.spec.os.sysdef.version}"/>
       
   231                 <reference refid="sbs.tools2.var" torefid="sbs.var" />
       
   232                 <reference refid="sbs.toolsbuild.options" torefid="sbs.make.options" />
       
   233                 <reference refid="sf.spec.os.system.definition.files" torefid="system.definition.files" />
       
   234         </antcall>
       
   235 
       
   236 		<antcall target="sf-list-dir" inheritAll="false">
       
   237 			<param name="sf.list.name" value="post-build-tools2"/>
       
   238 		</antcall>
       
   239 		
       
   240 		
       
   241         <!-- OS tools build after tools2 -->
       
   242         <antcall target="compile-main" inheritAll="false" inheritRefs="true">
       
   243                 <param name="build.system" value="${sf.spec.build.system}" />
       
   244                 <param name="compile.sysdef.dtd.stub" value="${sf.spec.os.sysdef.dtd}" />
       
   245                 <param name="sysdef.configurations.list" value="${sf.spec.os.sysdef.clean.configurations.list}" />
       
   246                 <param name="sf.spec.sysdef.version" value ="${sf.spec.os.sysdef.version}"/>
       
   247                 <reference refid="sbs.tools.var" torefid="sbs.var" />
       
   248                 <reference refid="sbs.toolsbuild.options" torefid="sbs.make.options" />
       
   249                 <reference refid="sf.spec.os.system.definition.files" torefid="system.definition.files" />
       
   250         </antcall>
       
   251 
       
   252 		<antcall target="sf-list-dir" inheritAll="false">
       
   253 			<param name="sf.list.name" value="post-build-tools"/>
       
   254 		</antcall>
       
   255 		
       
   256         <!-- OS main build -->
       
   257         <antcall target="compile-main" inheritAll="false" inheritRefs="true">
       
   258                 <param name="build.system" value="${sf.spec.build.system}" />
       
   259                 <param name="compile.sysdef.dtd.stub" value="${sf.spec.os.sysdef.dtd}" />
       
   260                 <param name="sysdef.configurations.list" value="${sf.spec.os.sysdef.clean.configurations.list}" />
       
   261                 <param name="sf.spec.sysdef.version" value ="${sf.spec.os.sysdef.version}"/>
       
   262                 <reference refid="sbs.main.sbs.var" torefid="sbs.var" />
       
   263                 <reference refid="sbs.fullbuild.options" torefid="sbs.make.options" />
       
   264                 <reference refid="sf.spec.os.system.definition.files" torefid="system.definition.files" />
       
   265         </antcall>
       
   266 		
       
   267 		<antcall target="sf-list-dir" inheritAll="false">
       
   268 			<param name="sf.list.name" value="post-build-main"/>
       
   269 		</antcall>
       
   270 		
       
   271 		<!-- what has been built in tools2+tools+main -->
       
   272 		<antcall target="sf-delta-dir" inheritAll="false">
       
   273 			<param name="sf.list_a.name" value="post-clean"/>
       
   274 			<param name="sf.list_b.name" value="post-build-main"/>
       
   275 		</antcall>
       
   276   </target>
       
   277 
       
   278   <!--
       
   279     == Name: SF-S60-COMPILE
       
   280     ==
       
   281     == Desc: Compile S60 part of build using the spec defined in:
       
   282     ==
       
   283     ==         - job_props.ant.xml
       
   284     ==         - job_refs.ant.xml
       
   285     ==
       
   286     -->
       
   287   <target name="sf-s60-compile">
       
   288 
       
   289         <hlm:argSet id="sbs.tools.var">
       
   290           			<hlm:arg name="config" value="${sf.spec.sbs.tools.config}" />
       
   291           			<hlm:arg name="singlejob" value="true" />
       
   292           			<hlm:arg name="enable-filter" value="${sf.spec.logs.raptorfilter.enable}" />
       
   293     		</hlm:argSet>
       
   294 
       
   295 			<hlm:argSet id="sbs.tools.clean.var">
       
   296           			<hlm:arg name="config" value="${sf.spec.sbs.tools.config}" />
       
   297           			<hlm:arg name="singlejob" value="true" />
       
   298           			<hlm:arg name="enable-filter" value="${sf.spec.logs.raptorfilter.enable}" />
       
   299     		</hlm:argSet>
       
   300 
       
   301     		<hlm:argSet id="sbs.main.sbs.var">
       
   302           			<hlm:arg name="config" value="${sf.spec.sbs.config}" />
       
   303           			<hlm:arg name="enable-filter" value="${sf.spec.logs.raptorfilter.enable}" />
       
   304     		</hlm:argSet>
       
   305 
       
   306 			<hlm:argSet id="sbs.main.clean.sbs.var">
       
   307           			<hlm:arg name="config" value="${sf.spec.sbs.config}" />
       
   308           			<hlm:arg name="enable-filter" value="${sf.spec.logs.raptorfilter.enable}" />
       
   309 					<hlm:arg name="command" value="CLEAN" />
       
   310     		</hlm:argSet>
       
   311 			
       
   312 			<hlm:argSet id="sbs.main.what.sbs.var">
       
   313           			<hlm:arg name="config" value="${sf.spec.sbs.config}" />
       
   314           			<hlm:arg name="enable-filter" value="${sf.spec.logs.raptorfilter.enable}" />
       
   315 					<hlm:arg name="command" value="WHAT" />
       
   316     		</hlm:argSet>
       
   317 
       
   318     		<hlm:sbsMakeOptions engine="gmake" id="sbs.toolsbuild.options" />
       
   319     		<hlm:sbsMakeOptions engine="gmake" id="sbs.fullbuild.options" />
       
   320 
       
   321 		<antcall target="sf-list-dir" inheritAll="false">
       
   322 			<param name="sf.list.name" value="s60-baseline"/>
       
   323 		</antcall>
       
   324 		
       
   325 			<!-- s60 what  -->
       
   326     		<antcall target="compile-main" inheritAll="false" inheritRefs="true">
       
   327           			<param name="build.system" value="${sf.spec.build.system}" />
       
   328           			<param name="sysdef.configurations.list" value="${sf.spec.s60.sysdef.clean.configurations.list}" />
       
   329                     <param name="sf.spec.sysdef.version" value="${sf.spec.s60.sysdef.version}"/>
       
   330           			<reference refid="sbs.main.what.sbs.var" torefid="sbs.var" />
       
   331           			<reference refid="sbs.fullbuild.options" torefid="sbs.make.options" />
       
   332           			<reference refid="sf.spec.s60.system.definition.files" torefid="system.definition.files" />
       
   333     		</antcall>
       
   334 			
       
   335 			<!-- s60 clean main build -->
       
   336     		<antcall target="compile-main" inheritAll="false" inheritRefs="true">
       
   337           			<param name="build.system" value="${sf.spec.build.system}" />
       
   338           			<param name="sysdef.configurations.list" value="${sf.spec.s60.sysdef.clean.configurations.list}" />
       
   339                     <param name="sf.spec.sysdef.version" value="${sf.spec.s60.sysdef.version}"/>
       
   340           			<reference refid="sbs.main.clean.sbs.var" torefid="sbs.var" />
       
   341           			<reference refid="sbs.fullbuild.options" torefid="sbs.make.options" />
       
   342           			<reference refid="sf.spec.s60.system.definition.files" torefid="system.definition.files" />
       
   343     		</antcall>
       
   344 
       
   345 			<antcall target="sf-list-dir" inheritAll="false">
       
   346 				<param name="sf.list.name" value="post-s60-clean"/>
       
   347 			</antcall>
       
   348 			
       
   349 			<!-- what has been cleaned from baseline PDK by s60 model -->
       
   350 			<antcall target="sf-delta-dir" inheritAll="false">
       
   351 				<param name="sf.list_a.name" value="s60-baseline"/>
       
   352 				<param name="sf.list_b.name" value="post-s60-clean"/>
       
   353 			</antcall>		
       
   354 			
       
   355 
       
   356             <!-- s60  tools build -->
       
   357     		<antcall target="compile-main" inheritAll="false" inheritRefs="true">
       
   358           			<param name="build.system" value="${sf.spec.build.system}" />
       
   359           			<param name="sysdef.configurations.list" value="${sf.spec.s60.sysdef.clean.configurations.list}" />
       
   360 					<param name="sf.spec.sysdef.version" value ="${sf.spec.s60.sysdef.version}"/>
       
   361           			<reference refid="sbs.tools.var" torefid="sbs.var" />
       
   362           			<reference refid="sbs.toolsbuild.options" torefid="sbs.make.options" />
       
   363           			<reference refid="sf.spec.s60.system.definition.files" torefid="system.definition.files" />
       
   364     		</antcall>
       
   365 
       
   366 			<antcall target="sf-list-dir" inheritAll="false">
       
   367 				<param name="sf.list.name" value="post-s60-build-tools"/>
       
   368 			</antcall>
       
   369 
       
   370     		<!-- s60 main build -->
       
   371     		<antcall target="compile-main" inheritAll="false" inheritRefs="true">
       
   372           			<param name="build.system" value="${sf.spec.build.system}" />
       
   373           			<param name="sysdef.configurations.list" value="${sf.spec.s60.sysdef.clean.configurations.list}" />
       
   374                     <param name="sf.spec.sysdef.version" value="${sf.spec.s60.sysdef.version}"/>
       
   375           			<reference refid="sbs.main.sbs.var" torefid="sbs.var" />
       
   376           			<reference refid="sbs.fullbuild.options" torefid="sbs.make.options" />
       
   377           			<reference refid="sf.spec.s60.system.definition.files" torefid="system.definition.files" />
       
   378     		</antcall>
       
   379 			
       
   380 			<antcall target="sf-list-dir" inheritAll="false">
       
   381 				<param name="sf.list.name" value="post-s60-build-main"/>
       
   382 			</antcall>
       
   383 
       
   384     		<!-- s60 postbuild bldmelast using ebs -->
       
   385     		<antcall target="compile-main" inheritAll="false">
       
   386           			<param name="build.system" value="ebs" />
       
   387           			<param name="sysdef.configurations.list" value="S60_bldmelast" />
       
   388           			<reference refid="sf.spec.s60.system.definition.files" torefid="system.definition.files" />
       
   389     		</antcall>
       
   390 
       
   391 			<antcall target="sf-list-dir" inheritAll="false">
       
   392 				<param name="sf.list.name" value="post-s60-bldmelast"/>
       
   393 			</antcall>
       
   394 
       
   395 			<!-- what has been built by tools+2+main+bldmelast -->
       
   396 			<antcall target="sf-delta-dir" inheritAll="false">
       
   397 				<param name="sf.list_a.name" value="s60-baseline"/>
       
   398 				<param name="sf.list_b.name" value="post-s60-bldmelast"/>
       
   399 			</antcall>		
       
   400 	</target>
       
   401 
    18   <!-- import sf-common-config -->
   402   <!-- import sf-common-config -->
    19   <import file="../common/build.xml" />
   403   <import file="../common/build.xml" />
    20   
   404 
    21 </project>
   405 </project>
    22 
   406