common/templates/source-spec.ant.xml.ftl
author Simon Howkins <simonh@symbian.org>
Fri, 07 Aug 2009 14:33:52 +0100
changeset 282 aee074ee2646
parent 252 52c893932513
child 288 a0e85954c23c
permissions -rw-r--r--
Changed preference for selecting package definition files, so that it takes the one from our tree in preference to the one in the package itself. This means that we can just delete items from our tree when we're happy to switch to using the one in the package (as this will vary from package to package). Added sorting of the attributes when outputting the system definition, to match the de facto standard in the system definition we started with.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7
389e1e1f1583 Rename and move of generated source sync xml and also tidy up
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents:
diff changeset
     1
<?xml version="1.0"?>
17
c677077df18c Fix FMPP template to allow multiple repositories
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents: 7
diff changeset
     2
<project name="SF-SOURCESPEC" default="all" xmlns:hlm="http://www.nokia.com/helium">
7
389e1e1f1583 Rename and move of generated source sync xml and also tidy up
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents:
diff changeset
     3
389e1e1f1583 Rename and move of generated source sync xml and also tidy up
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents:
diff changeset
     4
<#assign fileset = "" />
55
c10840c6fcbb Update Platform Config to build tools2 before tools - which must be run in single thread. Also update sync template to sync in parallel.
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents: 17
diff changeset
     5
<#assign sync_list = "" />
91
c86f60d45216 Make BOM identify thread safe
BuildAdmin@LON-ENGBUILD87
parents: 62
diff changeset
     6
<#assign bom_list  = "" />
7
389e1e1f1583 Rename and move of generated source sync xml and also tidy up
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents:
diff changeset
     7
<#assign dollar = "$"/>
389e1e1f1583 Rename and move of generated source sync xml and also tidy up
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents:
diff changeset
     8
<#assign count = 0 />
389e1e1f1583 Rename and move of generated source sync xml and also tidy up
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents:
diff changeset
     9
46
68c06bb4fbe2 Added recording of baseline info in a BOM file
DarioS@UK-DarioS.symbian.int
parents: 43
diff changeset
    10
    <!-- remove previous version of BOM file (if exists)  -->
42
4db6721a5a24 Adding removal of sources.csv before populating it
DarioS@UK-DarioS.symbian.int
parents: 41
diff changeset
    11
    <target name="reset-bom-sources-csv">
48
f5faa19dd3ed Added the revision number, moved BOM folder under /logs/
DarioS@UK-DarioS.symbian.int
parents: 46
diff changeset
    12
        <delete file="${ant['build.drive']}/output/logs/BOM/sources.csv" quiet="true"/>
42
4db6721a5a24 Adding removal of sources.csv before populating it
DarioS@UK-DarioS.symbian.int
parents: 41
diff changeset
    13
    </target>
37
d835e951a925 New implementation of generation of BOM sources.csv
DarioS@UK-DarioS.symbian.int
parents: 36
diff changeset
    14
7
389e1e1f1583 Rename and move of generated source sync xml and also tidy up
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents:
diff changeset
    15
<#list data as pkg_detail>
389e1e1f1583 Rename and move of generated source sync xml and also tidy up
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents:
diff changeset
    16
    <target name="sf-prebuild-${count}">
389e1e1f1583 Rename and move of generated source sync xml and also tidy up
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents:
diff changeset
    17
        <#if (count > 0) >
17
c677077df18c Fix FMPP template to allow multiple repositories
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents: 7
diff changeset
    18
            <#assign fileset = "${fileset}"  />
7
389e1e1f1583 Rename and move of generated source sync xml and also tidy up
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents:
diff changeset
    19
        </#if>
389e1e1f1583 Rename and move of generated source sync xml and also tidy up
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents:
diff changeset
    20
        <sequential>
251
c75afb49c4d3 Add branch and changeset support for getting source. BOM sources.csv can now be reused directly.
Shabe Razvi <shaber@symbian.org>
parents: 203
diff changeset
    21
            <!-- create sf\layer dir  -->
7
389e1e1f1583 Rename and move of generated source sync xml and also tidy up
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents:
diff changeset
    22
            <delete dir="${ant['build.drive']}${pkg_detail.dst}" failonerror="false"/>
389e1e1f1583 Rename and move of generated source sync xml and also tidy up
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents:
diff changeset
    23
            <mkdir dir="${ant['build.drive']}${pkg_detail.dst}"/>
251
c75afb49c4d3 Add branch and changeset support for getting source. BOM sources.csv can now be reused directly.
Shabe Razvi <shaber@symbian.org>
parents: 203
diff changeset
    24
            <delete dir="${ant['build.drive']}${pkg_detail.dst}" failonerror="false"/>
c75afb49c4d3 Add branch and changeset support for getting source. BOM sources.csv can now be reused directly.
Shabe Razvi <shaber@symbian.org>
parents: 203
diff changeset
    25
c75afb49c4d3 Add branch and changeset support for getting source. BOM sources.csv can now be reused directly.
Shabe Razvi <shaber@symbian.org>
parents: 203
diff changeset
    26
            <exec executable="hg" dir="${ant['build.drive']}">
c75afb49c4d3 Add branch and changeset support for getting source. BOM sources.csv can now be reused directly.
Shabe Razvi <shaber@symbian.org>
parents: 203
diff changeset
    27
                <arg value="clone"/>
c75afb49c4d3 Add branch and changeset support for getting source. BOM sources.csv can now be reused directly.
Shabe Razvi <shaber@symbian.org>
parents: 203
diff changeset
    28
                <arg value="-U"/>
c75afb49c4d3 Add branch and changeset support for getting source. BOM sources.csv can now be reused directly.
Shabe Razvi <shaber@symbian.org>
parents: 203
diff changeset
    29
                <arg value="${pkg_detail.source}"/>
c75afb49c4d3 Add branch and changeset support for getting source. BOM sources.csv can now be reused directly.
Shabe Razvi <shaber@symbian.org>
parents: 203
diff changeset
    30
                <arg value="${ant['build.drive']}${pkg_detail.dst}"/>
c75afb49c4d3 Add branch and changeset support for getting source. BOM sources.csv can now be reused directly.
Shabe Razvi <shaber@symbian.org>
parents: 203
diff changeset
    31
            </exec>
c75afb49c4d3 Add branch and changeset support for getting source. BOM sources.csv can now be reused directly.
Shabe Razvi <shaber@symbian.org>
parents: 203
diff changeset
    32
7
389e1e1f1583 Rename and move of generated source sync xml and also tidy up
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents:
diff changeset
    33
            <hlm:scm verbose="true" scmUrl="scm:hg:${pkg_detail.source}">
251
c75afb49c4d3 Add branch and changeset support for getting source. BOM sources.csv can now be reused directly.
Shabe Razvi <shaber@symbian.org>
parents: 203
diff changeset
    34
                <!--hlm:checkout basedir="${ant['build.drive']}${pkg_detail.dst}"/-->
c75afb49c4d3 Add branch and changeset support for getting source. BOM sources.csv can now be reused directly.
Shabe Razvi <shaber@symbian.org>
parents: 203
diff changeset
    35
                <#if "${pkg_detail.type}"=="tag" >
7
389e1e1f1583 Rename and move of generated source sync xml and also tidy up
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents:
diff changeset
    36
                <hlm:tags basedir="${ant['build.drive']}${pkg_detail.dst}" reference="hg.tags.id${dollar}{refid}"/>
389e1e1f1583 Rename and move of generated source sync xml and also tidy up
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents:
diff changeset
    37
                <hlm:update basedir="${ant['build.drive']}${pkg_detail.dst}">
251
c75afb49c4d3 Add branch and changeset support for getting source. BOM sources.csv can now be reused directly.
Shabe Razvi <shaber@symbian.org>
parents: 203
diff changeset
    38
                <hlm:latestTag pattern="${pkg_detail.pattern}">
7
389e1e1f1583 Rename and move of generated source sync xml and also tidy up
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents:
diff changeset
    39
                        <hlm:tagSet refid="hg.tags.id${dollar}{refid}" />
251
c75afb49c4d3 Add branch and changeset support for getting source. BOM sources.csv can now be reused directly.
Shabe Razvi <shaber@symbian.org>
parents: 203
diff changeset
    40
                </hlm:latestTag>
7
389e1e1f1583 Rename and move of generated source sync xml and also tidy up
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents:
diff changeset
    41
                </hlm:update>
251
c75afb49c4d3 Add branch and changeset support for getting source. BOM sources.csv can now be reused directly.
Shabe Razvi <shaber@symbian.org>
parents: 203
diff changeset
    42
                </#if>
c75afb49c4d3 Add branch and changeset support for getting source. BOM sources.csv can now be reused directly.
Shabe Razvi <shaber@symbian.org>
parents: 203
diff changeset
    43
                <#if "${pkg_detail.type}"== "changeset" || "${pkg_detail.type}"=="branch">
c75afb49c4d3 Add branch and changeset support for getting source. BOM sources.csv can now be reused directly.
Shabe Razvi <shaber@symbian.org>
parents: 203
diff changeset
    44
                <hlm:update basedir="${ant['build.drive']}${pkg_detail.dst}">
c75afb49c4d3 Add branch and changeset support for getting source. BOM sources.csv can now be reused directly.
Shabe Razvi <shaber@symbian.org>
parents: 203
diff changeset
    45
                     <hlm:tag name="${pkg_detail.pattern}"/>
c75afb49c4d3 Add branch and changeset support for getting source. BOM sources.csv can now be reused directly.
Shabe Razvi <shaber@symbian.org>
parents: 203
diff changeset
    46
                </hlm:update>
c75afb49c4d3 Add branch and changeset support for getting source. BOM sources.csv can now be reused directly.
Shabe Razvi <shaber@symbian.org>
parents: 203
diff changeset
    47
                </#if>
7
389e1e1f1583 Rename and move of generated source sync xml and also tidy up
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents:
diff changeset
    48
            </hlm:scm>
91
c86f60d45216 Make BOM identify thread safe
BuildAdmin@LON-ENGBUILD87
parents: 62
diff changeset
    49
        </sequential>
c86f60d45216 Make BOM identify thread safe
BuildAdmin@LON-ENGBUILD87
parents: 62
diff changeset
    50
    </target>
c86f60d45216 Make BOM identify thread safe
BuildAdmin@LON-ENGBUILD87
parents: 62
diff changeset
    51
c86f60d45216 Make BOM identify thread safe
BuildAdmin@LON-ENGBUILD87
parents: 62
diff changeset
    52
    <target name="sf-bom-info-${count}">
c86f60d45216 Make BOM identify thread safe
BuildAdmin@LON-ENGBUILD87
parents: 62
diff changeset
    53
c86f60d45216 Make BOM identify thread safe
BuildAdmin@LON-ENGBUILD87
parents: 62
diff changeset
    54
        <sequential>
37
d835e951a925 New implementation of generation of BOM sources.csv
DarioS@UK-DarioS.symbian.int
parents: 36
diff changeset
    55
            
46
68c06bb4fbe2 Added recording of baseline info in a BOM file
DarioS@UK-DarioS.symbian.int
parents: 43
diff changeset
    56
            <!-- record info on source code repo/rev in BOM file  -->
48
f5faa19dd3ed Added the revision number, moved BOM folder under /logs/
DarioS@UK-DarioS.symbian.int
parents: 46
diff changeset
    57
            <exec executable="hg" dir="${ant['build.drive']}${pkg_detail.dst}" outputproperty="sf.sourcesync.${count}.checksum">
f5faa19dd3ed Added the revision number, moved BOM folder under /logs/
DarioS@UK-DarioS.symbian.int
parents: 46
diff changeset
    58
                <arg value="identify"/>
37
d835e951a925 New implementation of generation of BOM sources.csv
DarioS@UK-DarioS.symbian.int
parents: 36
diff changeset
    59
                <arg value="-i"/>
d835e951a925 New implementation of generation of BOM sources.csv
DarioS@UK-DarioS.symbian.int
parents: 36
diff changeset
    60
            </exec>
251
c75afb49c4d3 Add branch and changeset support for getting source. BOM sources.csv can now be reused directly.
Shabe Razvi <shaber@symbian.org>
parents: 203
diff changeset
    61
            <echo message="dir ${ant['build.drive']}${pkg_detail.dst} : ${dollar}{sf.sourcesync.${count}.checksum}"/>
48
f5faa19dd3ed Added the revision number, moved BOM folder under /logs/
DarioS@UK-DarioS.symbian.int
parents: 46
diff changeset
    62
            <exec executable="cmd" output="${ant['build.drive']}/output/logs/BOM/sources.csv" append="true">
37
d835e951a925 New implementation of generation of BOM sources.csv
DarioS@UK-DarioS.symbian.int
parents: 36
diff changeset
    63
                <arg value="/c"/>
d835e951a925 New implementation of generation of BOM sources.csv
DarioS@UK-DarioS.symbian.int
parents: 36
diff changeset
    64
                <arg value="echo"/>
251
c75afb49c4d3 Add branch and changeset support for getting source. BOM sources.csv can now be reused directly.
Shabe Razvi <shaber@symbian.org>
parents: 203
diff changeset
    65
                <arg value="${pkg_detail.source},${pkg_detail.dst},changeset,${dollar}{sf.sourcesync.${count}.checksum}"/>
37
d835e951a925 New implementation of generation of BOM sources.csv
DarioS@UK-DarioS.symbian.int
parents: 36
diff changeset
    66
            </exec>
7
389e1e1f1583 Rename and move of generated source sync xml and also tidy up
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents:
diff changeset
    67
        </sequential>
389e1e1f1583 Rename and move of generated source sync xml and also tidy up
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents:
diff changeset
    68
    </target>
91
c86f60d45216 Make BOM identify thread safe
BuildAdmin@LON-ENGBUILD87
parents: 62
diff changeset
    69
c86f60d45216 Make BOM identify thread safe
BuildAdmin@LON-ENGBUILD87
parents: 62
diff changeset
    70
251
c75afb49c4d3 Add branch and changeset support for getting source. BOM sources.csv can now be reused directly.
Shabe Razvi <shaber@symbian.org>
parents: 203
diff changeset
    71
    <#assign fileset = "${fileset}" + "<fileset dir=\"${ant['build.drive']}${pkg_detail.dst}\" includes=\"${pkg_detail.sysdef}\"/>" />       
91
c86f60d45216 Make BOM identify thread safe
BuildAdmin@LON-ENGBUILD87
parents: 62
diff changeset
    72
    <#assign sync_list = "${sync_list}" + "<runtarget target=\"sf-prebuild-${count}\"/>\n"/>       
c86f60d45216 Make BOM identify thread safe
BuildAdmin@LON-ENGBUILD87
parents: 62
diff changeset
    73
    <#assign bom_list = "${bom_list}" + "<runtarget target=\"sf-bom-info-${count}\"/>\n"/>    
17
c677077df18c Fix FMPP template to allow multiple repositories
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents: 7
diff changeset
    74
    <#assign count = count + 1 />
c677077df18c Fix FMPP template to allow multiple repositories
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents: 7
diff changeset
    75
7
389e1e1f1583 Rename and move of generated source sync xml and also tidy up
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents:
diff changeset
    76
</#list>
389e1e1f1583 Rename and move of generated source sync xml and also tidy up
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents:
diff changeset
    77
389e1e1f1583 Rename and move of generated source sync xml and also tidy up
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents:
diff changeset
    78
    <path id="system.definition.files">
389e1e1f1583 Rename and move of generated source sync xml and also tidy up
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents:
diff changeset
    79
        <fileset dir="${dollar}{sf.common.config.dir}/sysdefs" includes="*.sysdef.xml"/>
389e1e1f1583 Rename and move of generated source sync xml and also tidy up
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents:
diff changeset
    80
        ${fileset}
389e1e1f1583 Rename and move of generated source sync xml and also tidy up
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents:
diff changeset
    81
    </path>
389e1e1f1583 Rename and move of generated source sync xml and also tidy up
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents:
diff changeset
    82
62
2771e394c9bd Catchup from main repo
DarioS@UK-DarioS.symbian.int
parents: 48 55
diff changeset
    83
<target name="all" depends="reset-bom-sources-csv">
7
389e1e1f1583 Rename and move of generated source sync xml and also tidy up
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents:
diff changeset
    84
203
fc4460f54beb Limit source parallelisation to NUMBER_OF_PROCESSORS
Shabe Razvi <shaber@symbian.org>
parents: 91
diff changeset
    85
  <parallel threadCount="${ant['env.NUMBER_OF_PROCESSORS']}">
55
c10840c6fcbb Update Platform Config to build tools2 before tools - which must be run in single thread. Also update sync template to sync in parallel.
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents: 17
diff changeset
    86
    ${sync_list}
c10840c6fcbb Update Platform Config to build tools2 before tools - which must be run in single thread. Also update sync template to sync in parallel.
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents: 17
diff changeset
    87
  </parallel>
c10840c6fcbb Update Platform Config to build tools2 before tools - which must be run in single thread. Also update sync template to sync in parallel.
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents: 17
diff changeset
    88
251
c75afb49c4d3 Add branch and changeset support for getting source. BOM sources.csv can now be reused directly.
Shabe Razvi <shaber@symbian.org>
parents: 203
diff changeset
    89
  <echo message="Adding BOM header"/>
c75afb49c4d3 Add branch and changeset support for getting source. BOM sources.csv can now be reused directly.
Shabe Razvi <shaber@symbian.org>
parents: 203
diff changeset
    90
      <exec executable="cmd" output="${ant['build.drive']}/output/logs/BOM/sources.csv" append="true">
c75afb49c4d3 Add branch and changeset support for getting source. BOM sources.csv can now be reused directly.
Shabe Razvi <shaber@symbian.org>
parents: 203
diff changeset
    91
      <arg value="/c"/>
c75afb49c4d3 Add branch and changeset support for getting source. BOM sources.csv can now be reused directly.
Shabe Razvi <shaber@symbian.org>
parents: 203
diff changeset
    92
      <arg value="echo"/>
252
52c893932513 Remove extra column
Shabe Razvi <shaber@symbian.org>
parents: 251
diff changeset
    93
      <arg value="source,dst,type,pattern,sysdef"/>
251
c75afb49c4d3 Add branch and changeset support for getting source. BOM sources.csv can now be reused directly.
Shabe Razvi <shaber@symbian.org>
parents: 203
diff changeset
    94
  </exec>
c75afb49c4d3 Add branch and changeset support for getting source. BOM sources.csv can now be reused directly.
Shabe Razvi <shaber@symbian.org>
parents: 203
diff changeset
    95
  
91
c86f60d45216 Make BOM identify thread safe
BuildAdmin@LON-ENGBUILD87
parents: 62
diff changeset
    96
  ${bom_list}
c86f60d45216 Make BOM identify thread safe
BuildAdmin@LON-ENGBUILD87
parents: 62
diff changeset
    97
55
c10840c6fcbb Update Platform Config to build tools2 before tools - which must be run in single thread. Also update sync template to sync in parallel.
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents: 17
diff changeset
    98
</target>
7
389e1e1f1583 Rename and move of generated source sync xml and also tidy up
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents:
diff changeset
    99
</project>