bootstrap.xml
author Dario Sestito <darios@symbian.org>
Tue, 09 Mar 2010 12:57:02 +0000
changeset 71 f7ba24a607f8
parent 67 16acd1d8d322
child 78 b9933b133306
permissions -rw-r--r--
Remove the correct job directory after the build, otherwise concurrent builds of the same package if run at the same time will have their jobdir removed and hence fail
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
     1
<?xml version="1.0" encoding="UTF-8"?>
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
     2
<project name="SF-BOOTSTRAP" default="bootstrap" xmlns:hlm="http://www.nokia.com/helium">
7
e042f0022639 Fixed to enable the temp directory to be created in the right place, and avoid cluttering up the CWD.
Simon Howkins <simonh@symbian.org>
parents: 4
diff changeset
     3
    
9
faf8e4898015 Cleaned the bootstrap code
BuildAdmin@LON-ENGBUILD89
parents: 7
diff changeset
     4
  <property environment="env"/>
0
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
     5
    
9
faf8e4898015 Cleaned the bootstrap code
BuildAdmin@LON-ENGBUILD89
parents: 7
diff changeset
     6
  <dirname property="sf.bootstrap.dir" file="${ant.file.SF-CONFIG}"/>
faf8e4898015 Cleaned the bootstrap code
BuildAdmin@LON-ENGBUILD89
parents: 7
diff changeset
     7
  
10
c1cbd33e46c0 reintroduced import of helium.ant.xml as it was generating diamonds warnings
BuildAdmin@LON-ENGBUILD89
parents: 9
diff changeset
     8
  <import file="${helium.dir}/helium.ant.xml" /> 
c1cbd33e46c0 reintroduced import of helium.ant.xml as it was generating diamonds warnings
BuildAdmin@LON-ENGBUILD89
parents: 9
diff changeset
     9
  
9
faf8e4898015 Cleaned the bootstrap code
BuildAdmin@LON-ENGBUILD89
parents: 7
diff changeset
    10
  <!-- target dir -->
faf8e4898015 Cleaned the bootstrap code
BuildAdmin@LON-ENGBUILD89
parents: 7
diff changeset
    11
  <property name="bootstrap.base.dir" value="D:\fbf_project"/> <!-- old name -->
faf8e4898015 Cleaned the bootstrap code
BuildAdmin@LON-ENGBUILD89
parents: 7
diff changeset
    12
  <property name="sf.target.dir" value="${bootstrap.base.dir}"/>
faf8e4898015 Cleaned the bootstrap code
BuildAdmin@LON-ENGBUILD89
parents: 7
diff changeset
    13
  
faf8e4898015 Cleaned the bootstrap code
BuildAdmin@LON-ENGBUILD89
parents: 7
diff changeset
    14
  <!-- config -->
64
b1cab4be73cc Added basic checking of some properties supplied to build.
Simon Howkins <simonh@symbian.org>
parents: 63
diff changeset
    15
  <property name="sf.config.repo" value=""/>
66
eb493282dec7 Config and Project repos should be sync'ed at revision 'default' by default (not 'tip')
Dario Sestito <darios@symbian.org>
parents: 64
diff changeset
    16
  <property name="sf.config.rev" value="default"/>
63
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
    17
  <property name="sf.config.dir" value=""/>
64
b1cab4be73cc Added basic checking of some properties supplied to build.
Simon Howkins <simonh@symbian.org>
parents: 63
diff changeset
    18
9
faf8e4898015 Cleaned the bootstrap code
BuildAdmin@LON-ENGBUILD89
parents: 7
diff changeset
    19
  <!-- project -->
64
b1cab4be73cc Added basic checking of some properties supplied to build.
Simon Howkins <simonh@symbian.org>
parents: 63
diff changeset
    20
  <property name="sf.project.repo" value=""/>
66
eb493282dec7 Config and Project repos should be sync'ed at revision 'default' by default (not 'tip')
Dario Sestito <darios@symbian.org>
parents: 64
diff changeset
    21
  <property name="sf.project.rev" value="default"/>
63
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
    22
  <property name="sf.project.dir" value=""/>
0
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
    23
64
b1cab4be73cc Added basic checking of some properties supplied to build.
Simon Howkins <simonh@symbian.org>
parents: 63
diff changeset
    24
  <!-- Sanity check the supplied properties -->
b1cab4be73cc Added basic checking of some properties supplied to build.
Simon Howkins <simonh@symbian.org>
parents: 63
diff changeset
    25
  <fail message="Must specify property sf.config.repo or sf.config.dir">
b1cab4be73cc Added basic checking of some properties supplied to build.
Simon Howkins <simonh@symbian.org>
parents: 63
diff changeset
    26
    <condition>
b1cab4be73cc Added basic checking of some properties supplied to build.
Simon Howkins <simonh@symbian.org>
parents: 63
diff changeset
    27
      <and>
b1cab4be73cc Added basic checking of some properties supplied to build.
Simon Howkins <simonh@symbian.org>
parents: 63
diff changeset
    28
        <equals arg1="${sf.config.repo}" arg2=""/>
b1cab4be73cc Added basic checking of some properties supplied to build.
Simon Howkins <simonh@symbian.org>
parents: 63
diff changeset
    29
        <equals arg1="${sf.config.dir}" arg2=""/>
b1cab4be73cc Added basic checking of some properties supplied to build.
Simon Howkins <simonh@symbian.org>
parents: 63
diff changeset
    30
      </and>
b1cab4be73cc Added basic checking of some properties supplied to build.
Simon Howkins <simonh@symbian.org>
parents: 63
diff changeset
    31
    </condition>
b1cab4be73cc Added basic checking of some properties supplied to build.
Simon Howkins <simonh@symbian.org>
parents: 63
diff changeset
    32
  </fail>
b1cab4be73cc Added basic checking of some properties supplied to build.
Simon Howkins <simonh@symbian.org>
parents: 63
diff changeset
    33
  <fail message="Must specify property sf.project.repo or sf.project.dir">
b1cab4be73cc Added basic checking of some properties supplied to build.
Simon Howkins <simonh@symbian.org>
parents: 63
diff changeset
    34
    <condition>
b1cab4be73cc Added basic checking of some properties supplied to build.
Simon Howkins <simonh@symbian.org>
parents: 63
diff changeset
    35
      <and>
b1cab4be73cc Added basic checking of some properties supplied to build.
Simon Howkins <simonh@symbian.org>
parents: 63
diff changeset
    36
        <equals arg1="${sf.project.repo}" arg2=""/>
b1cab4be73cc Added basic checking of some properties supplied to build.
Simon Howkins <simonh@symbian.org>
parents: 63
diff changeset
    37
        <equals arg1="${sf.project.dir}" arg2=""/>
b1cab4be73cc Added basic checking of some properties supplied to build.
Simon Howkins <simonh@symbian.org>
parents: 63
diff changeset
    38
      </and>
b1cab4be73cc Added basic checking of some properties supplied to build.
Simon Howkins <simonh@symbian.org>
parents: 63
diff changeset
    39
    </condition>
b1cab4be73cc Added basic checking of some properties supplied to build.
Simon Howkins <simonh@symbian.org>
parents: 63
diff changeset
    40
  </fail>
b1cab4be73cc Added basic checking of some properties supplied to build.
Simon Howkins <simonh@symbian.org>
parents: 63
diff changeset
    41
  
63
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
    42
  <target name="bootstrap" depends="init,get-sf-config,get-sf-project" description="Target for executing the bootstrap">
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
    43
    <stopwatch name="bootstrap" action="elapsed"/>
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
    44
  </target>
0
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
    45
9
faf8e4898015 Cleaned the bootstrap code
BuildAdmin@LON-ENGBUILD89
parents: 7
diff changeset
    46
  <target name="init">
63
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
    47
    <stopwatch name="bootstrap"/>
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
    48
9
faf8e4898015 Cleaned the bootstrap code
BuildAdmin@LON-ENGBUILD89
parents: 7
diff changeset
    49
    <mkdir dir="${sf.target.dir}" />
faf8e4898015 Cleaned the bootstrap code
BuildAdmin@LON-ENGBUILD89
parents: 7
diff changeset
    50
    <mkdir dir="${sf.target.dir}/build" />
63
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
    51
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
    52
    <echo message="config: repo=${sf.config.repo} rev=${sf.config.rev}"/>
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
    53
    <echo message="project: repo=${sf.project.repo} rev=${sf.project.rev}"/>
9
faf8e4898015 Cleaned the bootstrap code
BuildAdmin@LON-ENGBUILD89
parents: 7
diff changeset
    54
  </target>
faf8e4898015 Cleaned the bootstrap code
BuildAdmin@LON-ENGBUILD89
parents: 7
diff changeset
    55
    
faf8e4898015 Cleaned the bootstrap code
BuildAdmin@LON-ENGBUILD89
parents: 7
diff changeset
    56
  <target name="clean-env">
faf8e4898015 Cleaned the bootstrap code
BuildAdmin@LON-ENGBUILD89
parents: 7
diff changeset
    57
    <echo message="cleaning up the environment" />
faf8e4898015 Cleaned the bootstrap code
BuildAdmin@LON-ENGBUILD89
parents: 7
diff changeset
    58
    <delete dir="${sf.target.dir}/" />
faf8e4898015 Cleaned the bootstrap code
BuildAdmin@LON-ENGBUILD89
parents: 7
diff changeset
    59
  </target>
0
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
    60
9
faf8e4898015 Cleaned the bootstrap code
BuildAdmin@LON-ENGBUILD89
parents: 7
diff changeset
    61
  <target name="get-sf-config">
63
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
    62
    <antcall target="get-repo">
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
    63
      <param name="stopwatch.name" value="get-sf-config"/>
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
    64
      <param name="subdir.name" value="sf-config"/>
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
    65
      <param name="repo.dir" value="${sf.config.dir}"/>
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
    66
      <param name="repo.url" value="${sf.config.repo}"/>
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
    67
      <param name="repo.rev" value="${sf.config.rev}"/>
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
    68
    </antcall>
9
faf8e4898015 Cleaned the bootstrap code
BuildAdmin@LON-ENGBUILD89
parents: 7
diff changeset
    69
  </target>
0
d1c51edcc657 Initial drop of FBF bootstrap
Dario Sestito <dario.sestito@symbian.com>
parents:
diff changeset
    70
9
faf8e4898015 Cleaned the bootstrap code
BuildAdmin@LON-ENGBUILD89
parents: 7
diff changeset
    71
  <target name="get-sf-project">
63
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
    72
    <antcall target="get-repo">
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
    73
      <param name="stopwatch.name" value="get-sf-project"/>
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
    74
      <param name="subdir.name" value="build/config"/>
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
    75
      <param name="repo.dir" value="${sf.project.dir}"/>
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
    76
      <param name="repo.url" value="${sf.project.repo}"/>
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
    77
      <param name="repo.rev" value="${sf.project.rev}"/>
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
    78
    </antcall>
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
    79
  </target>
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
    80
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
    81
  <target name="get-repo">
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
    82
    <stopwatch name="${stopwatch.name}"/>
16
e1b9f78cef38 Project spec and config to be taken from a dir instead of from a repo
darios@symbian.org
parents: 10
diff changeset
    83
    <if>
63
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
    84
      <not>
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
    85
        <equals arg1="${repo.dir}" arg2=""/>
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
    86
      </not>
16
e1b9f78cef38 Project spec and config to be taken from a dir instead of from a repo
darios@symbian.org
parents: 10
diff changeset
    87
      <then>
63
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
    88
        <echo message="Getting FBF configuration from dir ${repo.dir}"/>
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
    89
        <copy todir="${sf.target.dir}/${subdir.name}">
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
    90
          <fileset dir="${repo.dir}"/>
16
e1b9f78cef38 Project spec and config to be taken from a dir instead of from a repo
darios@symbian.org
parents: 10
diff changeset
    91
        </copy>
e1b9f78cef38 Project spec and config to be taken from a dir instead of from a repo
darios@symbian.org
parents: 10
diff changeset
    92
      </then>
e1b9f78cef38 Project spec and config to be taken from a dir instead of from a repo
darios@symbian.org
parents: 10
diff changeset
    93
      <else>
63
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
    94
        <echo message="Getting ${repo.url}"/>
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
    95
        <if>
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
    96
          <available file="${sf.target.dir}/${subdir.name}/.hg" type="dir"/>
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
    97
          <then>
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
    98
            <echo message="Updating ${sf.target.dir}/${subdir.name}"/>
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
    99
            <exec executable="hg" dir="${sf.target.dir}/${subdir.name}">
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
   100
              <arg value="pull"/>
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
   101
              <arg value="${repo.url}"/>
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
   102
            </exec>
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
   103
            <exec executable="hg" dir="${sf.target.dir}/${subdir.name}">
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
   104
              <arg value="up"/>
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
   105
              <arg value="${repo.rev}"/>
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
   106
              <arg value="-C"/>
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
   107
            </exec>
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
   108
          </then>
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
   109
          <else>
66
eb493282dec7 Config and Project repos should be sync'ed at revision 'default' by default (not 'tip')
Dario Sestito <darios@symbian.org>
parents: 64
diff changeset
   110
            <echo message="Cloning ${repo.url}#${repo.rev} to ${sf.target.dir}/${subdir.name}"/>
eb493282dec7 Config and Project repos should be sync'ed at revision 'default' by default (not 'tip')
Dario Sestito <darios@symbian.org>
parents: 64
diff changeset
   111
            <exec executable="hg" dir="${sf.target.dir}">
eb493282dec7 Config and Project repos should be sync'ed at revision 'default' by default (not 'tip')
Dario Sestito <darios@symbian.org>
parents: 64
diff changeset
   112
              <arg value="clone"/>
eb493282dec7 Config and Project repos should be sync'ed at revision 'default' by default (not 'tip')
Dario Sestito <darios@symbian.org>
parents: 64
diff changeset
   113
              <arg value="-r${repo.rev}"/>
eb493282dec7 Config and Project repos should be sync'ed at revision 'default' by default (not 'tip')
Dario Sestito <darios@symbian.org>
parents: 64
diff changeset
   114
              <arg value="${repo.url}"/>
eb493282dec7 Config and Project repos should be sync'ed at revision 'default' by default (not 'tip')
Dario Sestito <darios@symbian.org>
parents: 64
diff changeset
   115
              <arg value="${subdir.name}"/>
eb493282dec7 Config and Project repos should be sync'ed at revision 'default' by default (not 'tip')
Dario Sestito <darios@symbian.org>
parents: 64
diff changeset
   116
            </exec>
63
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
   117
          </else>
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
   118
        </if>
16
e1b9f78cef38 Project spec and config to be taken from a dir instead of from a repo
darios@symbian.org
parents: 10
diff changeset
   119
      </else>
e1b9f78cef38 Project spec and config to be taken from a dir instead of from a repo
darios@symbian.org
parents: 10
diff changeset
   120
    </if>
63
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
   121
    <stopwatch name="${stopwatch.name}" action="elapsed"/>
9
faf8e4898015 Cleaned the bootstrap code
BuildAdmin@LON-ENGBUILD89
parents: 7
diff changeset
   122
  </target>
1
ebb0926c7024 Update with latest changes
shaberazvi@L063442.prod.ad.symbian.intra
parents: 0
diff changeset
   123
63
be578de158ab Speed up by doing a pull and update when possible.
Simon Howkins <simonh@symbian.org>
parents: 26
diff changeset
   124
</project>