sf-tools/build.xml
changeset 964 ca156d459030
child 966 e06b37cce80d
equal deleted inserted replaced
963:daf51fe459d8 964:ca156d459030
       
     1 <?xml version="1.0" encoding="UTF-8"?>
       
     2 <project name="SF-TOOLS-CONFIG" xmlns:hlm="http://www.nokia.com/helium">
       
     3   <!-- location of this config -->
       
     4   <dirname property="sf.tools.config.dir" file="${ant.file.SF-TOOLS-CONFIG}"/>
       
     5 
       
     6   <!-- import package properties -->
       
     7   <import file="${sf.tools.config.dir}/tools_props.ant.xml" optional="true"/>
       
     8   
       
     9   <!-- import common properties/targets/references -->
       
    10   <import file="../common/build.xml" />
       
    11   
       
    12   <!-- import package references -->
       
    13   <import file="${sf.tools.config.dir}/tools_refs.ant.xml"  optional="true"/>
       
    14   
       
    15     <!-- Support Helium 7+ only for Tools build -->
       
    16     <if>
       
    17         <or>
       
    18           <equals arg1="${helium.version}" arg2="5.0"/>
       
    19           <equals arg1="${last.major.helium.version}" arg2="5.0"/>
       
    20         </or>
       
    21         <then>
       
    22             <fail>INFO Tools build requires minimum of Helium 7.0</fail>
       
    23         </then>
       
    24     </if>
       
    25     
       
    26   <target name="sf-build-noprep" depends="sf-platform-bootstrap-gt,sf-compile,sf-postbuild">
       
    27     <echo>[SF-BUILD-NOPREP] INFO:(tools)</echo>
       
    28     <echo>[SF-BUILD-NOPREP] WARNING: Not generating model from packages</echo>
       
    29   </target>
       
    30     
       
    31     <target name="sf-platform-bootstrap-gt" >
       
    32     <echo>INFO: Bootstrap files required by SBSv2</echo>
       
    33     <!-- do initial stuff to get raptor working -->
       
    34     <copy todir="${build.drive}/epoc32/include/variant/" failonerror="true" verbose="true">
       
    35         <fileset dir="${build.drive}/${sf.spec.bldmefirst.gt.hrh}" includes="*.hrh"/>
       
    36     </copy>
       
    37     <copy file="${build.drive}/${sf.spec.bldmefirst.gt.variant}" tofile="${build.drive}/epoc32/tools/variant/variant.cfg" failonerror="true" verbose="true" overwrite="true" preservelastmodified="true" />
       
    38     <if><isset property="sf.spec.bldmefirst.gt.hrh.os"/>
       
    39     <then>
       
    40       <copy file="${build.drive}/${sf.spec.bldmefirst.gt.hrh.os}" tofile="${build.drive}/epoc32/include/variant/Symbian_OS.hrh" failonerror="false" overwrite="true" verbose="true" preservelastmodified="true" />
       
    41     </then>
       
    42     </if>
       
    43     
       
    44     <echo>INFO: Explicit export of files needed for tools build</echo>
       
    45     <exec executable="cmd" dir="${build.drive}" failonerror="false" output="${build.log.dir}/${build.id}_bootstrap_export.log">
       
    46         <arg value="/c sbs.bat EXPORT --export-only -b /sf/os/kernelhwsrv/kernel/eka/bld.inf -b /sf/os/kernelhwsrv/userlibandfileserver/fileserver/group/bld.inf -k -c tools2"/>
       
    47     </exec>
       
    48 
       
    49     <echo message="INFO Getting bootstrap environment listing"/>
       
    50     <antcall target="sf-list-dir" inheritAll="false">
       
    51       <param name="sf.list.name" value="bootstrap"/>
       
    52     </antcall>
       
    53   </target>
       
    54   
       
    55   
       
    56   
       
    57   
       
    58  <target name="sf-compile" depends="sf-platform-bootstrap-gt">
       
    59 
       
    60    <!-- turn comma separated list into sbs friendly -c list, and _ separated list for friendly log names -->
       
    61    <propertyregex property="i.sf.spec.sbs.config.expanded"         override="true" input="${sf.spec.sbs.config}" regexp="(,)" replace=" -c " defaultValue="${sf.spec.sbs.config}" global="true"  casesensitive="false"/>
       
    62    <propertyregex property="i.sf.spec.sbs.config.expanded.logname" override="true" input="${sf.spec.sbs.config}" regexp="(,)" replace="_"    defaultValue="${sf.spec.sbs.config}" global="true"  casesensitive="false"/>
       
    63    <echo message="INFO Target : ${i.sf.spec.sbs.config.expanded}"/>
       
    64    <echo message="INFO Logname: ${i.sf.spec.sbs.config.expanded.logname} + Config: ${sf.spec.sysdef.configurations.list}"/>
       
    65 
       
    66    <!-- define sbs args, log name etc -->
       
    67    <hlm:sbsinput id="sf.build">
       
    68         <sbsOptions>
       
    69             <arg line="-c ${i.sf.spec.sbs.config.expanded}"/>
       
    70             <arg line="-k" />
       
    71             <arg line="-t ${sf.spec.sbs.retry.limit}"/>
       
    72             <arg line="${sf.spec.sbs.options}"/>
       
    73             <arg name="--filters" value="&quot;${sf.spec.sbs.filter.list}&quot;"/>
       
    74             <arg name="--logfile" value="${compile.log.dir}/${build.id}_${i.sf.spec.sbs.config.expanded.logname}_compile.log" />
       
    75             <arg name="--makefile" value="${compile.log.dir}/${build.id}_${i.sf.spec.sbs.config.expanded.logname}_Makefile" />
       
    76         </sbsOptions>
       
    77    </hlm:sbsinput>
       
    78     
       
    79     <!-- call helium's compile-main target using the sbsInput args defined above -->
       
    80     <echo message="INFO Building target(s): ${i.sf.spec.sbs.config.expanded}"/>
       
    81     <antcall target="compile-main" inheritAll="false" inheritRefs="true">
       
    82       <param name="build.system"               value="${sf.spec.build.system}" />
       
    83       <param name="sysdef.configurations.list" value="${sf.spec.sysdef.configurations.list}" />
       
    84       <param name="sbs.inputs.list"            value="sf.build"/>
       
    85       <reference refid="sf.spec.tools.system.definition.files" torefid="system.definition.files" />
       
    86     </antcall> 
       
    87 
       
    88  </target>
       
    89 
       
    90  <target name="sf-package-binary">
       
    91 
       
    92     <exec executable="7z" dir="${build.drive}/epoc32" output="${build.log.dir}/zip_${build.id}_binaries_${sf.spec.job.name}.log">
       
    93         <arg value="a"/>
       
    94         <arg value="-t${sf.spec.package.zip.format}"/>
       
    95         <arg value="-x@${build.log.dir}/listdir_${build.id}_bootstrap.log"/>
       
    96         <arg value="-x!build\"/>
       
    97         <arg value="${build.drive}/output/zips/release/binaries_${sf.spec.job.name}.zip"/>
       
    98     </exec>
       
    99 
       
   100     <antcall target="sf-zip-content">
       
   101         <param name="zip.config.file" value="${temp.build.dir}/zip.cfg.xml.ftl"/>
       
   102         <param name="zip.target.name" value="bin-${sf.spec.job.name}-metadata" />
       
   103     </antcall>
       
   104 
       
   105  </target>
       
   106  
       
   107   <target name="create-canonical-sysdef-file">
       
   108      <copy file="${sf.spec.systemdefinition.location}" tofile="${canonical.sysdef.file}" failonerror="true" verbose="true"/>
       
   109   </target>
       
   110 
       
   111  <!-- do nothing for these in a tools build -->
       
   112  <target name="sf-run-analysis"/>
       
   113  <target name="sf-copy-rom-logs"/>
       
   114     
       
   115 </project>
       
   116