sf-platform/build.xml
changeset 192 d5964b46ccaf
parent 111 5b0bc2f89660
child 207 6d9dd19b6949
equal deleted inserted replaced
191:56e7098e1ace 192:d5964b46ccaf
    15    -->
    15    -->
    16 
    16 
    17   <!-- workaround until GenXML can merge v2.0.0 fragments -->
    17   <!-- workaround until GenXML can merge v2.0.0 fragments -->
    18   <target name="create-canonical-sysdef-file">
    18   <target name="create-canonical-sysdef-file">
    19 
    19 
    20        <if>
    20     <runtarget target="preprocess-sysdef-files"/>
    21           <!-- TODO use scripting to match this -->
    21     <echo message="Exporting preprocessed System Definition"/>
    22           <equals arg1="${sf.spec.sysdef.version}" arg2="1.4.0" />
    22     <if><istrue value="${sf.spec.splitbuild}"/>
    23           <then>
    23        <then>
    24             <echo message="Using System Definition v1.4.0 "/>
    24        <if><istrue value="${sf.spec.os.skipbuild}" />
    25             <runtarget target="compile.create-canonical-sysdef-file"/>
    25             <then><echo message="Skipping OS sysdef creation"/></then>
    26           </then>
    26        <else>
    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?-->
    27             <!-- TODO use better method to export or wait for GenXML fix?-->
    32             <copy file="${build.output.dir}\build\input\0000000000000001_system_definition.xml"
    28             <copy file="${build.output.dir}\build\input\0000000000000001_system_model_os.xml"
    33                   tofile="${canonical.sysdef.file}" failonerror="true" verbose="true"/>
    29             tofile="${canonical.sysdef.file}" failonerror="false" verbose="true"/>
    34           </else>
    30        </else>
       
    31        </if>
       
    32 
       
    33        <if><istrue value="${sf.spec.s60.skipbuild}" />
       
    34             <then><echo message="Skipping S60 sysdef creation"/></then>
       
    35        <else>
       
    36             <!-- TODO use better method to export or wait for GenXML fix?-->
       
    37             <copy file="${build.output.dir}\build\input\0000000000000001_system_model_s60.xml"
       
    38             tofile="${canonical.sysdef.file}" failonerror="false" verbose="true"/>
       
    39 	   </else>
       
    40 	   </if>
       
    41 	   </then>
       
    42 	
       
    43 	<else>
       
    44 	    <!-- TODO use better method to export or wait for GenXML fix?-->
       
    45         <copy file="${build.output.dir}\build\input\*_system_model_os.xml"
       
    46         tofile="${canonical.sysdef.file}" failonerror="false" verbose="true"/>
       
    47 
       
    48 	    <!-- TODO targets for single sysdef build -->
       
    49 	    <runtarget target="sf-os-compile"/>
       
    50 	</else>
    35         </if>
    51         </if>
    36 
    52 
    37   </target>
    53   </target>
    38 
    54 
    39   <!--
    55   <!--
    70                 </copy>
    86                 </copy>
    71             </sequential>
    87             </sequential>
    72         </for>
    88         </for>
    73     </target>
    89     </target>
    74 
    90 
    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   <!--
    91   <!--
   102     == Name: SF-COMPILE
    92     == Name: SF-COMPILE
   103     ==
    93     ==
   104     == Desc: Override of common sf-compile target defined in
    94     == Desc: Override of common sf-compile target defined in
   105     ==       common\build.xml
    95     ==       common\build.xml
   138     ==
   128     ==
   139     -->
   129     -->
   140   <target name="sf-os-compile">
   130   <target name="sf-os-compile">
   141 
   131 
   142         <hlm:argSet id="sbs.tools2.var">
   132         <hlm:argSet id="sbs.tools2.var">
   143                 <hlm:arg name="config" value="tools2_rel" />
   133                 <hlm:arg name="config" value="tools2_rel.whatlog" />
   144                 <hlm:arg name="singlejob" value="false" />
   134                 <hlm:arg name="singlejob" value="false" />
   145                 <hlm:arg name="enable-filter" value="${sf.spec.logs.raptorfilter.enable}" />
   135                 <hlm:arg name="enable-filter" value="${sf.spec.logs.raptorfilter.enable}" />
   146         </hlm:argSet>
   136         </hlm:argSet>
   147 
   137 
   148 		<hlm:argSet id="sbs.tools2.clean.var">
   138 		<hlm:argSet id="sbs.tools2.clean.var">
   149                 <hlm:arg name="config" value="tools2_rel" />
   139                 <hlm:arg name="config" value="tools2_rel.whatlog" />
   150                 <hlm:arg name="singlejob" value="false" />
   140                 <hlm:arg name="singlejob" value="false" />
   151                 <hlm:arg name="enable-filter" value="${sf.spec.logs.raptorfilter.enable}" />
   141                 <hlm:arg name="enable-filter" value="${sf.spec.logs.raptorfilter.enable}" />
   152 				<hlm:arg name="command" value="CLEAN" />
   142 		<hlm:arg name="command" value="CLEAN --check" />
   153         </hlm:argSet>
   143         </hlm:argSet>
   154 
   144 
   155         <hlm:argSet id="sbs.tools.var">
   145         <hlm:argSet id="sbs.tools.var">
   156                 <hlm:arg name="config" value="tools_rel" />
   146                 <hlm:arg name="config" value="tools_rel.whatlog" />
   157                 <hlm:arg name="singlejob" value="true" />
   147                 <hlm:arg name="singlejob" value="true" />
   158                 <hlm:arg name="enable-filter" value="${sf.spec.logs.raptorfilter.enable}" />
   148                 <hlm:arg name="enable-filter" value="${sf.spec.logs.raptorfilter.enable}" />
   159         </hlm:argSet>
   149         </hlm:argSet>
   160 
   150 
   161 		<hlm:argSet id="sbs.tools.clean.var">
   151 		<hlm:argSet id="sbs.tools.clean.var">
   162                 <hlm:arg name="config" value="tools_rel" />
   152                 <hlm:arg name="config" value="tools_rel.whatlog" />
   163                 <hlm:arg name="singlejob" value="true" />
   153                 <hlm:arg name="singlejob" value="true" />
   164                 <hlm:arg name="enable-filter" value="${sf.spec.logs.raptorfilter.enable}" />
   154                 <hlm:arg name="enable-filter" value="${sf.spec.logs.raptorfilter.enable}" />
   165 				<hlm:arg name="command" value="CLEAN" />
   155 		<hlm:arg name="command" value="CLEAN --check" />
   166         </hlm:argSet>
   156         </hlm:argSet>
   167 
   157 
   168         <hlm:argSet id="sbs.main.sbs.var">
   158         <hlm:argSet id="sbs.main.sbs.var">
   169                 <hlm:arg name="config" value="${sf.spec.sbs.config}" />
   159                 <hlm:arg name="config" value="${sf.spec.sbs.config}" />
   170                 <hlm:arg name="enable-filter" value="${sf.spec.logs.raptorfilter.enable}" />
   160                 <hlm:arg name="enable-filter" value="${sf.spec.logs.raptorfilter.enable}" />
   171         </hlm:argSet>
   161         </hlm:argSet>
   172 
   162 
   173 		<hlm:argSet id="sbs.main.clean.sbs.var">
   163 		<hlm:argSet id="sbs.main.clean.sbs.var">
   174                 <hlm:arg name="config" value="${sf.spec.sbs.config}" />
   164                 <hlm:arg name="config" value="${sf.spec.sbs.config}" />
   175                 <hlm:arg name="enable-filter" value="${sf.spec.logs.raptorfilter.enable}" />
   165                 <hlm:arg name="enable-filter" value="${sf.spec.logs.raptorfilter.enable}" />
   176 				<hlm:arg name="command" value="CLEAN" />
   166 		<hlm:arg name="command" value="CLEAN --check" />
   177         </hlm:argSet>
   167         </hlm:argSet>
   178 		
   168 		
   179 		<hlm:argSet id="sbs.main.what.sbs.var">
   169 		<hlm:argSet id="sbs.main.what.sbs.var">
   180                 <hlm:arg name="config" value="${sf.spec.sbs.config}" />
   170                 <hlm:arg name="config" value="${sf.spec.sbs.config}" />
   181                 <hlm:arg name="enable-filter" value="${sf.spec.logs.raptorfilter.enable}" />
   171                 <hlm:arg name="enable-filter" value="${sf.spec.logs.raptorfilter.enable}" />
   182 				<hlm:arg name="command" value="WHAT" />
   172 		<hlm:arg name="command" value="WHAT" />
   183         </hlm:argSet>
   173         </hlm:argSet>
   184 
   174 
   185         <hlm:sbsMakeOptions engine="gmake" id="sbs.toolsbuild.options" />
   175         <hlm:sbsMakeOptions engine="gmake" id="sbs.toolsbuild.options" />
   186         <hlm:sbsMakeOptions engine="gmake" id="sbs.fullbuild.options" />
   176         <hlm:sbsMakeOptions engine="gmake" id="sbs.fullbuild.options" />
   187 
   177 
   200                 <reference refid="sbs.fullbuild.options" torefid="sbs.make.options" />
   190                 <reference refid="sbs.fullbuild.options" torefid="sbs.make.options" />
   201                 <reference refid="sf.spec.os.system.definition.files" torefid="system.definition.files" />
   191                 <reference refid="sf.spec.os.system.definition.files" torefid="system.definition.files" />
   202         </antcall>
   192         </antcall>
   203 		
   193 		
   204 		<!-- OS clean main build -->
   194 		<!-- OS clean main build -->
   205         <antcall target="compile-main" inheritAll="false" inheritRefs="true">
   195 		<if><istrue value="${sf.spec.baseline.clean}"/>
   206                 <param name="build.system" value="${sf.spec.build.system}" />
   196 			<then>
   207                 <param name="compile.sysdef.dtd.stub" value="${sf.spec.os.sysdef.dtd}" />
   197 				<antcall target="compile-main" inheritAll="false" inheritRefs="true">
   208                 <param name="sysdef.configurations.list" value="${sf.spec.os.sysdef.clean.configurations.list}" />
   198 						<param name="build.system" value="${sf.spec.build.system}" />
   209                 <param name="sf.spec.sysdef.version" value ="${sf.spec.os.sysdef.version}"/>
   199 						<param name="compile.sysdef.dtd.stub" value="${sf.spec.os.sysdef.dtd}" />
   210                 <reference refid="sbs.main.clean.sbs.var" torefid="sbs.var" />
   200 						<param name="sysdef.configurations.list" value="${sf.spec.os.sysdef.clean.configurations.list}" />
   211                 <reference refid="sbs.fullbuild.options" torefid="sbs.make.options" />
   201 						<param name="sf.spec.sysdef.version" value ="${sf.spec.os.sysdef.version}"/>
   212                 <reference refid="sf.spec.os.system.definition.files" torefid="system.definition.files" />
   202 						<reference refid="sbs.main.clean.sbs.var" torefid="sbs.var" />
   213         </antcall>
   203 						<reference refid="sbs.fullbuild.options" torefid="sbs.make.options" />
       
   204 						<reference refid="sf.spec.os.system.definition.files" torefid="system.definition.files" />
       
   205 				</antcall>
       
   206 			</then>
       
   207 		</if>
   214 		
   208 		
   215 		<antcall target="sf-list-dir" inheritAll="false">
   209 		<antcall target="sf-list-dir" inheritAll="false">
   216 			<param name="sf.list.name" value="post-clean"/>
   210 			<param name="sf.list.name" value="post-clean"/>
   217 		</antcall>
   211 		</antcall>
   218 
   212 
   271 		<!-- what has been built in tools2+tools+main -->
   265 		<!-- what has been built in tools2+tools+main -->
   272 		<antcall target="sf-delta-dir" inheritAll="false">
   266 		<antcall target="sf-delta-dir" inheritAll="false">
   273 			<param name="sf.list_a.name" value="post-clean"/>
   267 			<param name="sf.list_a.name" value="post-clean"/>
   274 			<param name="sf.list_b.name" value="post-build-main"/>
   268 			<param name="sf.list_b.name" value="post-build-main"/>
   275 		</antcall>
   269 		</antcall>
       
   270 		
       
   271 		<!-- what has been cleaned and rebuilt -->
       
   272 		<antcall target="sf-intersect-dir" inheritAll="false">
       
   273 			<param name="sf.list_a.name" value="post-clean_delta"/>       <!-- clean list -->
       
   274 			<param name="sf.list_b.name" value="post-build-main_delta"/>  <!-- built list -->
       
   275 		</antcall>
       
   276 		
       
   277 		<!-- what has been cleaned and not rebuilt -->
       
   278 		
   276   </target>
   279   </target>
   277 
   280 
   278   <!--
   281   <!--
   279     == Name: SF-S60-COMPILE
   282     == Name: SF-S60-COMPILE
   280     ==
   283     ==
   304     		</hlm:argSet>
   307     		</hlm:argSet>
   305 
   308 
   306 			<hlm:argSet id="sbs.main.clean.sbs.var">
   309 			<hlm:argSet id="sbs.main.clean.sbs.var">
   307           			<hlm:arg name="config" value="${sf.spec.sbs.config}" />
   310           			<hlm:arg name="config" value="${sf.spec.sbs.config}" />
   308           			<hlm:arg name="enable-filter" value="${sf.spec.logs.raptorfilter.enable}" />
   311           			<hlm:arg name="enable-filter" value="${sf.spec.logs.raptorfilter.enable}" />
   309 					<hlm:arg name="command" value="CLEAN" />
   312 				<hlm:arg name="command" value="CLEAN --check" />
   310     		</hlm:argSet>
   313     		</hlm:argSet>
   311 			
   314 			
   312 			<hlm:argSet id="sbs.main.what.sbs.var">
   315 			<hlm:argSet id="sbs.main.what.sbs.var">
   313           			<hlm:arg name="config" value="${sf.spec.sbs.config}" />
   316           			<hlm:arg name="config" value="${sf.spec.sbs.config}" />
   314           			<hlm:arg name="enable-filter" value="${sf.spec.logs.raptorfilter.enable}" />
   317           			<hlm:arg name="enable-filter" value="${sf.spec.logs.raptorfilter.enable}" />
   315 					<hlm:arg name="command" value="WHAT" />
   318 				<hlm:arg name="command" value="WHAT" />
   316     		</hlm:argSet>
   319     		</hlm:argSet>
   317 
   320 
   318     		<hlm:sbsMakeOptions engine="gmake" id="sbs.toolsbuild.options" />
   321     		<hlm:sbsMakeOptions engine="gmake" id="sbs.toolsbuild.options" />
   319     		<hlm:sbsMakeOptions engine="gmake" id="sbs.fullbuild.options" />
   322     		<hlm:sbsMakeOptions engine="gmake" id="sbs.fullbuild.options" />
   320 
   323 
   331           			<reference refid="sbs.fullbuild.options" torefid="sbs.make.options" />
   334           			<reference refid="sbs.fullbuild.options" torefid="sbs.make.options" />
   332           			<reference refid="sf.spec.s60.system.definition.files" torefid="system.definition.files" />
   335           			<reference refid="sf.spec.s60.system.definition.files" torefid="system.definition.files" />
   333     		</antcall>
   336     		</antcall>
   334 			
   337 			
   335 			<!-- s60 clean main build -->
   338 			<!-- s60 clean main build -->
   336     		<antcall target="compile-main" inheritAll="false" inheritRefs="true">
   339 			<if><istrue value="${sf.spec.baseline.clean}"/>
   337           			<param name="build.system" value="${sf.spec.build.system}" />
   340 				<then>
   338           			<param name="sysdef.configurations.list" value="${sf.spec.s60.sysdef.clean.configurations.list}" />
   341 					<antcall target="compile-main" inheritAll="false" inheritRefs="true">
   339                     <param name="sf.spec.sysdef.version" value="${sf.spec.s60.sysdef.version}"/>
   342 							<param name="build.system" value="${sf.spec.build.system}" />
   340           			<reference refid="sbs.main.clean.sbs.var" torefid="sbs.var" />
   343 							<param name="sysdef.configurations.list" value="${sf.spec.s60.sysdef.clean.configurations.list}" />
   341           			<reference refid="sbs.fullbuild.options" torefid="sbs.make.options" />
   344 							<param name="sf.spec.sysdef.version" value="${sf.spec.s60.sysdef.version}"/>
   342           			<reference refid="sf.spec.s60.system.definition.files" torefid="system.definition.files" />
   345 							<reference refid="sbs.main.clean.sbs.var" torefid="sbs.var" />
   343     		</antcall>
   346 							<reference refid="sbs.fullbuild.options" torefid="sbs.make.options" />
       
   347 							<reference refid="sf.spec.s60.system.definition.files" torefid="system.definition.files" />
       
   348 					</antcall>
       
   349 				</then>
       
   350 			</if>
   344 
   351 
   345 			<antcall target="sf-list-dir" inheritAll="false">
   352 			<antcall target="sf-list-dir" inheritAll="false">
   346 				<param name="sf.list.name" value="post-s60-clean"/>
   353 				<param name="sf.list.name" value="post-s60-clean"/>
   347 			</antcall>
   354 			</antcall>
   348 			
   355 			
   369 
   376 
   370     		<!-- s60 main build -->
   377     		<!-- s60 main build -->
   371     		<antcall target="compile-main" inheritAll="false" inheritRefs="true">
   378     		<antcall target="compile-main" inheritAll="false" inheritRefs="true">
   372           			<param name="build.system" value="${sf.spec.build.system}" />
   379           			<param name="build.system" value="${sf.spec.build.system}" />
   373           			<param name="sysdef.configurations.list" value="${sf.spec.s60.sysdef.clean.configurations.list}" />
   380           			<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}"/>
   381                                 <param name="sf.spec.sysdef.version" value="${sf.spec.s60.sysdef.version}"/>
   375           			<reference refid="sbs.main.sbs.var" torefid="sbs.var" />
   382           			<reference refid="sbs.main.sbs.var" torefid="sbs.var" />
   376           			<reference refid="sbs.fullbuild.options" torefid="sbs.make.options" />
   383           			<reference refid="sbs.fullbuild.options" torefid="sbs.make.options" />
   377           			<reference refid="sf.spec.s60.system.definition.files" torefid="system.definition.files" />
   384           			<reference refid="sf.spec.s60.system.definition.files" torefid="system.definition.files" />
   378     		</antcall>
   385     		</antcall>
   379 			
   386 			
       
   387 			<runtarget target="sf-s60-create-cenrep"/>
       
   388 			
   380 			<antcall target="sf-list-dir" inheritAll="false">
   389 			<antcall target="sf-list-dir" inheritAll="false">
   381 				<param name="sf.list.name" value="post-s60-build-main"/>
   390 				<param name="sf.list.name" value="post-s60-build-main"/>
   382 			</antcall>
   391 			</antcall>
   383 
   392 
   384     		<!-- s60 postbuild bldmelast using ebs -->
   393 			<!-- what has been built by tools+2+main -->
   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">
   394 			<antcall target="sf-delta-dir" inheritAll="false">
   397 				<param name="sf.list_a.name" value="s60-baseline"/>
   395 				<param name="sf.list_a.name" value="s60-baseline"/>
   398 				<param name="sf.list_b.name" value="post-s60-bldmelast"/>
   396 				<param name="sf.list_b.name" value="post-s60-build-main"/>
   399 			</antcall>		
   397 			</antcall>		
       
   398 			
       
   399 			<!-- what has been cleaned and rebuilt -->
       
   400 			<antcall target="sf-intersect-dir" inheritAll="false">
       
   401 				<param name="sf.list_a.name" value="post-s60-clean_delta"/>       <!-- clean list -->
       
   402 				<param name="sf.list_b.name" value="post-s60-build-main_delta"/>  <!-- built list -->
       
   403 			</antcall>
       
   404 		
       
   405 	</target>
       
   406 
       
   407 	<target name="sf-s60-create-cenrep">
       
   408         <echo message="INFO Generating CenRep"/>
       
   409         <exec executable="${helium.dir}/../ConfigurationTool/cli_build.cmd" dir="${build.drive}" failonerror="false" output="${build.log.dir}/${build.id}_create_cenrep.log">
       
   410 		  <arg value="-master_conf"/>
       
   411 		  <arg value="s60"/>
       
   412 		  <arg value="-impl"/>
       
   413 		  <arg value="/epoc32/rom/config/confml_data/s60"/>
       
   414 		  <arg value="-confml"/>
       
   415 		  <arg value="/epoc32/rom/config/confml_data/s60"/>
       
   416 		  <arg value="-ignore_errors"/>
       
   417         </exec>
       
   418 		
       
   419 		<if><available  file="${build.drive}/cli_build_error.log" />
       
   420 		<then>
       
   421             <echo message="INFO CenRep error log found, moving to ${build.log.dir}" />
       
   422     		<move file="${build.drive}/cli_build_error.log" todir="${build.log.dir}" failonerror="false"/>
       
   423 		</then>
       
   424 		</if>
       
   425 		
   400 	</target>
   426 	</target>
   401 
   427 
   402   <!-- import sf-common-config -->
   428   <!-- import sf-common-config -->
   403   <import file="../common/build.xml" />
   429   <import file="../common/build.xml" />
   404 
   430