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