david_williams | 22bd49b | 2006-11-28 09:17:14 +0000 | [diff] [blame] | 1 | <project name="build" default="build" basedir="."> |
david_williams | 67d2770 | 2006-11-20 16:36:52 +0000 | [diff] [blame] | 2 | |
david_williams | 22bd49b | 2006-11-28 09:17:14 +0000 | [diff] [blame] | 3 | <!-- = = = standard properties pattern = = = --> |
| 4 | <!-- |
| 5 | Note to be cross-platform, "environment variables" are only appropriate for |
david_williams | 1cff0e9 | 2006-11-23 00:40:29 +0000 | [diff] [blame] | 6 | some variables, e.g. ones we set, since properties are case sensitive, even if |
| 7 | the environment variables on your operating system are not, e.g. it will |
| 8 | be ${env.Path} not ${env.PATH} on Windows --> |
| 9 | <property environment="env" /> |
david_williams | 22bd49b | 2006-11-28 09:17:14 +0000 | [diff] [blame] | 10 | |
| 11 | <!-- |
| 12 | Let users override standard properties, if desired. |
| 13 | If directory, file, or some properties do not exist, |
| 14 | then standard properties will be used. |
| 15 | --> |
| 16 | <property file="${env.LOCAL_BUILD_PROPERTIES_DIR}/${ant.project.name}.properties" /> |
| 17 | |
| 18 | <!-- load standard properties for production environment --> |
| 19 | <property file="${env.STANDARD_PROPERTIES_DIR}/${ant.project.name}.properties" /> |
| 20 | <!-- = = = end standard properties pattern = = = --> |
david_williams | 67d2770 | 2006-11-20 16:36:52 +0000 | [diff] [blame] | 21 | |
| 22 | <target |
| 23 | name="build" |
| 24 | depends="init" |
| 25 | if="build_distro_target_exists"> |
| 26 | <property |
| 27 | name="buildfile" |
| 28 | value="${distributionCoreName}.build/build.xml" /> |
| 29 | <echo message="buildfile: ${buildfile}" /> |
| 30 | <ant antfile="${buildfile}"> |
| 31 | <property |
| 32 | name="wtp.builder.home" |
| 33 | value="${wtp.builder.home}" /> |
| 34 | <property |
| 35 | name="buildBranch" |
| 36 | value="${buildBranch}" /> |
| 37 | <property |
| 38 | name="build.pack-all-in-one" |
| 39 | value="${build.pack-all-in-one}" /> |
david_williams | 67d2770 | 2006-11-20 16:36:52 +0000 | [diff] [blame] | 40 | </ant> |
| 41 | </target> |
| 42 | |
| 43 | |
| 44 | <target |
| 45 | name="site" |
| 46 | depends="init" |
| 47 | if="site_distro_target_exists"> |
| 48 | <ant antfile="${distributionCoreName}.site/build.xml"> |
| 49 | <property |
| 50 | name="wtp.builder.home" |
| 51 | value="${wtp.builder.home}" /> |
| 52 | <property |
| 53 | name="buildBranch" |
| 54 | value="${buildBranch}" /> |
| 55 | <property |
| 56 | name="build.pack-all-in-one" |
| 57 | value="${build.pack-all-in-one}" /> |
| 58 | </ant> |
| 59 | </target> |
| 60 | |
| 61 | |
| 62 | <target |
| 63 | name="test" |
| 64 | depends="init" |
| 65 | if="tests_distro_target_exists"> |
| 66 | <ant antfile="${distributionCoreName}.tests/build.xml"> |
| 67 | <property |
| 68 | name="wtp.builder.home" |
| 69 | value="${wtp.builder.home}" /> |
| 70 | <property |
| 71 | name="buildBranch" |
| 72 | value="${buildBranch}" /> |
| 73 | <property |
| 74 | name="build.pack-all-in-one" |
| 75 | value="${build.pack-all-in-one}" /> |
| 76 | <property |
| 77 | name="testRoot" |
david_williams | 1cff0e9 | 2006-11-23 00:40:29 +0000 | [diff] [blame] | 78 | value="${env.BUILD_HOME}/${build.tests}-${build.distribution}-${buildBranch}-${buildType}" /> |
david_williams | 67d2770 | 2006-11-20 16:36:52 +0000 | [diff] [blame] | 79 | <property |
| 80 | name="dependencyTargets" |
| 81 | value="${wtp.builder.home}/scripts/dependency/build.xml" /> |
| 82 | <property |
| 83 | name="local.cache.dir" |
david_williams | 42f9b24 | 2006-11-27 18:45:14 +0000 | [diff] [blame] | 84 | value="${env.LOCAL_PREREQS_CACHE}" /> |
david_williams | c84ab8c | 2006-12-11 18:50:34 +0000 | [diff] [blame] | 85 | <property |
| 86 | name="buildDirectory" |
| 87 | value="${buildDirectory}" /> |
| 88 | <property |
| 89 | name="buildLabel" |
| 90 | value="${buildLabel}" /> |
david_williams | 67d2770 | 2006-11-20 16:36:52 +0000 | [diff] [blame] | 91 | </ant> |
| 92 | </target> |
| 93 | |
| 94 | <target |
| 95 | name="upload" |
| 96 | depends="init" |
| 97 | if="upload_distro_target_exists"> |
| 98 | <ant antfile="${distributionCoreName}.upload/build.xml"> |
| 99 | <property |
| 100 | name="wtp.builder.home" |
| 101 | value="${wtp.builder.home}" /> |
| 102 | <property |
| 103 | name="buildBranch" |
| 104 | value="${buildBranch}" /> |
| 105 | <property |
| 106 | name="build.pack-all-in-one" |
| 107 | value="${build.pack-all-in-one}" /> |
| 108 | </ant> |
| 109 | </target> |
| 110 | |
| 111 | <target |
| 112 | name="whatisfixed" |
| 113 | depends="init" |
| 114 | if="whatisfixed_distro_target_exists"> |
| 115 | <ant antfile="${distributionCoreName}.whatisfixed/build.xml"> |
| 116 | <property |
| 117 | name="wtp.builder.home" |
| 118 | value="${wtp.builder.home}" /> |
| 119 | <property |
| 120 | name="buildBranch" |
| 121 | value="${buildBranch}" /> |
| 122 | <property |
| 123 | name="build.pack-all-in-one" |
| 124 | value="${build.pack-all-in-one}" /> |
| 125 | </ant> |
| 126 | </target> |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 127 | |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 128 | |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 129 | |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 130 | |
| 131 | |
david_williams | 67d2770 | 2006-11-20 16:36:52 +0000 | [diff] [blame] | 132 | <target name="init"> |
| 133 | <dirname |
| 134 | file="${ant.file}" |
| 135 | property="wtp.builder.home" /> |
| 136 | <condition |
| 137 | property="buildBranch" |
| 138 | value="R2.0"> |
| 139 | <equals |
| 140 | arg1="${mapVersionTag}" |
| 141 | arg2="HEAD" /> |
| 142 | </condition> |
| 143 | <condition |
| 144 | property="buildBranch" |
| 145 | value="R0.7"> |
| 146 | <equals |
| 147 | arg1="${mapVersionTag}" |
| 148 | arg2="R0_7_maintenance" /> |
| 149 | </condition> |
| 150 | <condition |
| 151 | property="buildBranch" |
| 152 | value="R1.0"> |
| 153 | <equals |
| 154 | arg1="${mapVersionTag}" |
| 155 | arg2="R1_0_maintenance" /> |
| 156 | </condition> |
| 157 | <condition |
| 158 | property="buildBranch" |
| 159 | value="R1.5"> |
| 160 | <equals |
| 161 | arg1="${mapVersionTag}" |
| 162 | arg2="R1_5_maintenance" /> |
| 163 | </condition> |
ndai | 1866385 | 2005-09-15 16:06:41 +0000 | [diff] [blame] | 164 | |
david_williams | 67d2770 | 2006-11-20 16:36:52 +0000 | [diff] [blame] | 165 | <touch file="${user.home}/.cvspass" /> |
ndai | 0aef096 | 2005-09-14 17:36:08 +0000 | [diff] [blame] | 166 | |
david_williams | 67d2770 | 2006-11-20 16:36:52 +0000 | [diff] [blame] | 167 | <property file="${wtp.builder.home}/build.properties" /> |
| 168 | <touch file="${user.home}/.cvspass" /> |
| 169 | <ant antfile="${wtp.builder.home}/scripts/build/label.xml" /> |
| 170 | <property file="${buildDirectory}/label.properties" /> |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 171 | |
david_williams | 29ad1a3 | 2006-11-20 17:07:12 +0000 | [diff] [blame] | 172 | <property |
| 173 | name="distributionCoreName" |
| 174 | value="${wtp.builder.home}/distribution/${build.distribution}" /> |
| 175 | |
david_williams | 67d2770 | 2006-11-20 16:36:52 +0000 | [diff] [blame] | 176 | <available |
| 177 | file="${distributionCoreName}.build/build.xml" |
| 178 | type="file" |
| 179 | property="build_distro_target_exists" /> |
| 180 | <available |
| 181 | file="${distributionCoreName}.site/build.xml" |
| 182 | type="file" |
| 183 | property="site_distro_target_exists" /> |
| 184 | <available |
| 185 | file="${distributionCoreName}.tests/build.xml" |
| 186 | type="file" |
| 187 | property="tests_distro_target_exists" /> |
| 188 | <available |
| 189 | file="${distributionCoreName}.upload/build.xml" |
| 190 | type="file" |
| 191 | property="upload_distro_target_exists" /> |
| 192 | <available |
| 193 | file="${distributionCoreName}.whatisfixed/build.xml" |
| 194 | type="file" |
| 195 | property="whatisfixed_distro_target_exists" /> |
ndai | 1866385 | 2005-09-15 16:06:41 +0000 | [diff] [blame] | 196 | |
ndai | 0aef096 | 2005-09-14 17:36:08 +0000 | [diff] [blame] | 197 | |
david_williams | 67d2770 | 2006-11-20 16:36:52 +0000 | [diff] [blame] | 198 | <!--fetch the HEAD stream of all projects if build type specified as N--> |
| 199 | <condition |
| 200 | property="fetchTag" |
| 201 | value="HEAD"> |
| 202 | <equals |
| 203 | arg1="${buildType}" |
| 204 | arg2="N" /> |
| 205 | </condition> |
ndai | 0aef096 | 2005-09-14 17:36:08 +0000 | [diff] [blame] | 206 | |
david_williams | 67d2770 | 2006-11-20 16:36:52 +0000 | [diff] [blame] | 207 | <condition property="tagMaps"> |
| 208 | <equals |
| 209 | arg1="${build.trial}" |
| 210 | arg2="false" /> |
| 211 | </condition> |
| 212 | </target> |
ndai | 0aef096 | 2005-09-14 17:36:08 +0000 | [diff] [blame] | 213 | |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 214 | |
| 215 | </project> |