sf-platform/build.xml
changeset 52 c54ae3330cbd
parent 0 571f289c60b8
child 55 c10840c6fcbb
equal deleted inserted replaced
30:62563fa42f57 52:c54ae3330cbd
     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
    13   * the target will fail.
    13   * the target will fail.
    14   
    14   
    15    -->
    15    -->
    16   <loadproperties srcFile="${sf.platform.config.dir}/platform.properties"/>
    16   <loadproperties srcFile="${sf.platform.config.dir}/platform.properties"/>
    17   
    17   
       
    18   <!-- workaround until GenXML can merge v2.0.0 fragments -->
       
    19   <target name="create-canonical-sysdef-file">
       
    20             
       
    21        <if>
       
    22           <!-- TODO use scripting to match this -->
       
    23           <equals arg1="${sf.spec.sysdef.version}" arg2="1.4.0" /> 
       
    24           <then>
       
    25             <echo message="Using System Definition v1.4.0 "/>
       
    26             <runtarget target="compile.create-canonical-sysdef-file"/>
       
    27           </then>
       
    28           <else>
       
    29             <runtarget target="preprocess-sysdef-files"/>  
       
    30             <echo message="Exporting preprocessed System Definition"/> 
       
    31             
       
    32             <!-- TODO use better method to export or wait for GenXML fix?-->
       
    33             <copy file="${build.output.dir}\build\input\0000000000000001_system_definition.xml" 
       
    34                   tofile="${canonical.sysdef.file}" failonerror="true" verbose="true"/>
       
    35           </else>
       
    36         </if>
       
    37           
       
    38   </target>
       
    39     
       
    40   <!-- 
       
    41     == Name: PREPROCESS-SYSDEF-FILES
       
    42     ==
       
    43     == Desc: Override of default target in order to deal with symbian os
       
    44     ==       system_definition.xml that does not have /sf source prefix    
       
    45     ==       
       
    46     ==       TODO get this moved as a Helium core target?
       
    47     -->
       
    48   <target name="preprocess-sysdef-files">
       
    49         <mkdir dir="${build.output.dir}/build/input"/>
       
    50         <delete verbose="true">
       
    51             <fileset dir="${build.output.dir}/build/input/" includes="**"/>
       
    52         </delete>
       
    53         
       
    54         <for param="file">
       
    55             <resources refid="system.definition.files"/>
       
    56             <sequential>
       
    57                 <copy todir="${build.output.dir}/build/input" verbose="true">
       
    58                     <fileset file="@{file}"/>
       
    59                     <filterchain>
       
    60                         <replaceregex pattern="bldFile=&quot;os" replace="bldFile=&quot;sf\\\\os" flags="gi"/>
       
    61                         <replaceregex pattern="mrp=&quot;os" replace="mrp=&quot;sf\\\\os" flags="gi"/>
       
    62                         <replaceregex pattern="bldFile=&quot;mw" replace="bldFile=&quot;sf\\\\mw" flags="gi"/>
       
    63                         <replaceregex pattern="mrp=&quot;mw" replace="mrp=&quot;sf\\\\mw" flags="gi"/>
       
    64                         <replaceregex pattern="bldFile=&quot;app" replace="bldFile=&quot;sf\\\\app" flags="gi"/>
       
    65                         <replaceregex pattern="mrp=&quot;app" replace="mrp=&quot;sf\\\\app" flags="gi"/>
       
    66                         <expandproperties/>
       
    67                     </filterchain>
       
    68                     <mapper>
       
    69                         <scriptmapper language="jep" src="${helium.dir}/tools/common/jep/unique_filename.jep"/>
       
    70                     </mapper>
       
    71                 </copy>
       
    72             </sequential>
       
    73         </for>
       
    74     </target>
       
    75   
       
    76   <!-- 
       
    77     == Name: SF-COMPILE
       
    78     ==
       
    79     == Desc: Override of common sf-compile target defined in
       
    80     ==       common\build.xml
       
    81     ==       
       
    82     ==       os  build will be skipped if sf.spec.os.skipbuild=true
       
    83     ==       s60 build will be skipped if sf.spec.s60.skipbuild=true
       
    84     == 
       
    85     -->
       
    86   <target name="sf-compile">
       
    87 
       
    88        <if><istrue value="${sf.spec.os.skipbuild}" />
       
    89             <then><echo message="Skipping OS build"/></then>      
       
    90        <else><runtarget target="sf-os-compile"/></else></if>
       
    91        
       
    92        <if><istrue value="${sf.spec.s60.skipbuild}" />
       
    93             <then><echo message="Skipping S60 build"/></then>       
       
    94        <else><runtarget target="sf-s60-compile"/></else></if>
       
    95        
       
    96   </target>
       
    97 
       
    98   <!-- 
       
    99     == Name: SF-OS-COMPILE
       
   100     ==
       
   101     == Desc: Compile OS part of build using the spec defined in:
       
   102     == 
       
   103     ==         - job_props.ant.xml
       
   104     ==         - job_refs.ant.xml
       
   105     ==
       
   106     -->
       
   107   <target name="sf-os-compile">
       
   108       
       
   109         <hlm:argSet id="sbs.tools.var">
       
   110                 <hlm:arg name="config" value="${sf.spec.sbs.tools.config}" />
       
   111                 <hlm:arg name="singlejob" value="true" />
       
   112                 <hlm:arg name="enable-filter" value="true" />
       
   113         </hlm:argSet>
       
   114 
       
   115         <hlm:argSet id="sbs.main.sbs.var">
       
   116                 <hlm:arg name="config" value="${sf.spec.sbs.config}" />
       
   117                 <hlm:arg name="enable-filter" value="true" />
       
   118         </hlm:argSet>
       
   119 
       
   120         <hlm:sbsMakeOptions engine="gmake" id="sbs.toolsbuild.options" />
       
   121         <hlm:sbsMakeOptions engine="gmake" id="sbs.fullbuild.options" />
       
   122 
       
   123         <!-- OS tools build -->
       
   124         <antcall target="compile-main" inheritAll="false" inheritRefs="true">
       
   125                 <param name="build.system" value="${sf.spec.build.system}" />
       
   126                 <param name="compile.sysdef.dtd.stub" value="${sf.spec.os.sysdef.dtd}" />
       
   127                 <param name="sysdef.configurations.list" value="${sf.spec.os.sysdef.clean.configurations.list}" />
       
   128                 <param name="sf.spec.sysdef.version" value ="${sf.spec.os.sysdef.version}"/>
       
   129                 <reference refid="sbs.tools.var" torefid="sbs.var" />
       
   130                 <reference refid="sbs.toolsbuild.options" torefid="sbs.make.options" />
       
   131                 <reference refid="sf.spec.os.system.definition.files" torefid="system.definition.files" />
       
   132         </antcall>
       
   133 
       
   134         <!-- OS main build -->
       
   135         <antcall target="compile-main" inheritAll="false" inheritRefs="true">
       
   136                 <param name="build.system" value="${sf.spec.build.system}" />
       
   137                 <param name="compile.sysdef.dtd.stub" value="${sf.spec.os.sysdef.dtd}" />
       
   138                 <param name="sysdef.configurations.list" value="${sf.spec.os.sysdef.clean.configurations.list}" />
       
   139                 <param name="sf.spec.sysdef.version" value ="${sf.spec.os.sysdef.version}"/>                    
       
   140                 <reference refid="sbs.main.sbs.var" torefid="sbs.var" />
       
   141                 <reference refid="sbs.fullbuild.options" torefid="sbs.make.options" />
       
   142                 <reference refid="sf.spec.os.system.definition.files" torefid="system.definition.files" />
       
   143         </antcall>            
       
   144   </target>
       
   145   
       
   146   <!-- 
       
   147     == Name: SF-S60-COMPILE
       
   148     ==
       
   149     == Desc: Compile S60 part of build using the spec defined in:
       
   150     == 
       
   151     ==         - job_props.ant.xml
       
   152     ==         - job_refs.ant.xml
       
   153     ==
       
   154     -->
       
   155   <target name="sf-s60-compile">
       
   156   
       
   157         <hlm:argSet id="sbs.tools.var">
       
   158           			<hlm:arg name="config" value="${sf.spec.sbs.tools.config}" />
       
   159           			<hlm:arg name="singlejob" value="true" />
       
   160           			<hlm:arg name="enable-filter" value="true" />
       
   161     		</hlm:argSet>
       
   162     
       
   163     		<hlm:argSet id="sbs.main.sbs.var">
       
   164           			<hlm:arg name="config" value="${sf.spec.sbs.config}" />
       
   165           			<hlm:arg name="enable-filter" value="true" />
       
   166     		</hlm:argSet>
       
   167         
       
   168     		<hlm:sbsMakeOptions engine="gmake" id="sbs.toolsbuild.options" />
       
   169     		<hlm:sbsMakeOptions engine="gmake" id="sbs.fullbuild.options" />
       
   170     
       
   171         <!-- s60 clean tools build -->
       
   172     		<antcall target="compile-main" inheritAll="false" inheritRefs="true">
       
   173           			<param name="build.system" value="${sf.spec.build.system}" />
       
   174           			<param name="sysdef.configurations.list" value="${sf.spec.s60.sysdef.clean.configurations.list}" />
       
   175                 <param name="sf.spec.sysdef.version" value ="${sf.spec.s60.sysdef.version}"/> 
       
   176                                   
       
   177           			<reference refid="sbs.tools.var" torefid="sbs.var" />
       
   178           			<reference refid="sbs.toolsbuild.options" torefid="sbs.make.options" />
       
   179           			<reference refid="sf.spec.s60.system.definition.files" torefid="system.definition.files" />
       
   180     		</antcall>
       
   181     
       
   182     		<!-- s60 clean main build -->
       
   183     		<antcall target="compile-main" inheritAll="false" inheritRefs="true">
       
   184           			<param name="build.system" value="${sf.spec.build.system}" />
       
   185           			<param name="sysdef.configurations.list" value="${sf.spec.s60.sysdef.clean.configurations.list}" />
       
   186                 <param name="sf.spec.sysdef.version" value="${sf.spec.s60.sysdef.version}"/> 
       
   187           			<reference refid="sbs.main.sbs.var" torefid="sbs.var" />
       
   188           			<reference refid="sbs.fullbuild.options" torefid="sbs.make.options" />
       
   189           			<reference refid="sf.spec.s60.system.definition.files" torefid="system.definition.files" />
       
   190     		</antcall>
       
   191     
       
   192     		<!-- s60 postbuild bldmelast using ebs -->
       
   193     		<antcall target="compile-main" inheritAll="false">
       
   194           			<param name="build.system" value="ebs" />
       
   195           			<param name="sysdef.configurations.list" value="S60_bldmelast" />
       
   196           			<reference refid="sf.spec.s60.system.definition.files" torefid="system.definition.files" />
       
   197     		</antcall>
       
   198 
       
   199 	</target>
       
   200   
    18   <!-- import sf-common-config -->
   201   <!-- import sf-common-config -->
    19   <import file="../common/build.xml" />
   202   <import file="../common/build.xml" />
    20   
   203   
    21 </project>
   204 </project>
    22 
   205