blob: fa29b44f6e700fdd41a85f30744fb312ccf89bb6 [file] [log] [blame]
david_williams9e5f0a92007-08-29 00:09:02 +00001<project
2 name="build"
3 default="build"
4 basedir=".">
david_williams67d27702006-11-20 16:36:52 +00005
david_williams9e5f0a92007-08-29 00:09:02 +00006 <!-- = = = standard properties pattern = = = -->
7 <!--
david_williams403beae2007-12-09 02:10:40 +00008 Note to be cross-platform, "environment variables" are only appropriate for
david_williams1cff0e92006-11-23 00:40:29 +00009 some variables, e.g. ones we set, since properties are case sensitive, even if
10 the environment variables on your operating system are not, e.g. it will
11 be ${env.Path} not ${env.PATH} on Windows -->
david_williams9e5f0a92007-08-29 00:09:02 +000012 <property environment="env" />
david_williams403beae2007-12-09 02:10:40 +000013
david_williams9e5f0a92007-08-29 00:09:02 +000014 <!--
david_williams403beae2007-12-09 02:10:40 +000015 Let users override standard properties, if desired.
16 If directory, file, or some properties do not exist,
17 then standard properties will be used.
18 -->
david_williams9e5f0a92007-08-29 00:09:02 +000019 <property
20 file="${env.LOCAL_BUILD_PROPERTIES_DIR}/${ant.project.name}.properties" />
david_williams22bd49b2006-11-28 09:17:14 +000021
david_williams9e5f0a92007-08-29 00:09:02 +000022 <!-- load standard properties for production environment -->
23 <property
24 file="${env.STANDARD_PROPERTIES_DIR}/${ant.project.name}.properties" />
david_williams67d27702006-11-20 16:36:52 +000025
david_williams9e5f0a92007-08-29 00:09:02 +000026 <property file="${ant.project.name}.properties" />
david_williams4b3c8042007-03-19 01:06:50 +000027
david_williams9e5f0a92007-08-29 00:09:02 +000028 <!-- = = = end standard properties pattern = = = -->
david_williams67d27702006-11-20 16:36:52 +000029
david_williams343518f2007-12-09 03:52:50 +000030
31 <!-- if not already set externally, provide some appropriate default for these parameters -->
32 <property name="build.pack-all-in-one" value="false" />
33
david_williams9e5f0a92007-08-29 00:09:02 +000034 <target
35 name="build"
36 depends="init"
37 if="build_distro_target_exists">
38 <property
39 name="buildfile"
40 value="${distributionCoreName}.build/build.xml" />
41 <echo
42 level="debug"
43 message="buildfile: ${buildfile}" />
44 <echo
45 level="debug"
46 message="logExtension: ${logExtension}" />
47 <ant antfile="${buildfile}">
48 <property
49 name="wtp.builder.home"
50 value="${wtp.builder.home}" />
51 <property
52 name="buildBranch"
53 value="${buildBranch}" />
54 <property
55 name="build.pack-all-in-one"
56 value="${build.pack-all-in-one}" />
57 <property
david_williams9e5f0a92007-08-29 00:09:02 +000058 name="logExtension"
59 value="${logExtension}" />
60 </ant>
david_williams9e5f0a92007-08-29 00:09:02 +000061 </target>
david_williams67d27702006-11-20 16:36:52 +000062
david_williams036c95d2007-03-29 19:06:14 +000063
david_williams9e5f0a92007-08-29 00:09:02 +000064 <target
65 name="site"
66 depends="init"
67 if="site_distro_target_exists">
68 <ant antfile="${distributionCoreName}.site/build.xml">
69 <property
70 name="wtp.builder.home"
71 value="${wtp.builder.home}" />
72 <property
73 name="buildBranch"
74 value="${buildBranch}" />
75 <property
76 name="build.pack-all-in-one"
77 value="${build.pack-all-in-one}" />
78 <property
79 name="eclipse.launcher"
80 value="${eclipse.launcher}" />
81 </ant>
82 </target>
david_williams6252b612007-02-25 07:23:43 +000083
david_williams67d27702006-11-20 16:36:52 +000084
david_williams9e5f0a92007-08-29 00:09:02 +000085 <target
86 name="test"
87 depends="init"
88 if="tests_distro_target_exists">
89 <ant antfile="${distributionCoreName}.tests/build.xml">
90 <property
91 name="wtp.builder.home"
92 value="${wtp.builder.home}" />
93 <property
94 name="buildBranch"
95 value="${buildBranch}" />
96 <property
97 name="build.pack-all-in-one"
98 value="${build.pack-all-in-one}" />
99 <property
100 name="testRoot"
101 value="${env.BUILD_HOME}/${build.tests}/${build.distribution}-${buildBranch}-${buildType}" />
102 <property
103 name="dependencyTargets"
104 value="${wtp.builder.home}/scripts/dependency/build.xml" />
105 <property
106 name="local.cache.dir"
107 value="${env.LOCAL_PREREQS_CACHE}" />
108 <property
109 name="buildDirectory"
110 value="${buildDirectory}" />
111 <property
112 name="buildLabel"
113 value="${buildLabel}" />
114 <property
115 name="eclipse.launcher"
116 value="${eclipse.launcher}" />
david_williams6252b612007-02-25 07:23:43 +0000117
david_williams9e5f0a92007-08-29 00:09:02 +0000118 </ant>
119 </target>
david_williams67d27702006-11-20 16:36:52 +0000120
david_williams9e5f0a92007-08-29 00:09:02 +0000121 <target
122 name="upload"
123 depends="init"
124 if="upload_distro_target_exists">
125 <ant antfile="${distributionCoreName}.upload/build.xml">
126 <property
127 name="wtp.builder.home"
128 value="${wtp.builder.home}" />
129 <property
130 name="buildBranch"
131 value="${buildBranch}" />
132 <property
133 name="build.pack-all-in-one"
134 value="${build.pack-all-in-one}" />
135 <property
136 name="eclipse.launcher"
137 value="${eclipse.launcher}" />
david_williams6252b612007-02-25 07:23:43 +0000138
david_williams9e5f0a92007-08-29 00:09:02 +0000139 </ant>
140 </target>
david_williams4b3c8042007-03-19 01:06:50 +0000141
david_williams9e5f0a92007-08-29 00:09:02 +0000142 <target
143 name="whatisfixed"
144 depends="init"
145 if="whatisfixed_distro_target_exists">
146 <ant antfile="${distributionCoreName}.whatisfixed/build.xml">
147 <property
148 name="wtp.builder.home"
149 value="${wtp.builder.home}" />
150 <property
151 name="buildBranch"
152 value="${buildBranch}" />
153 <property
154 name="build.pack-all-in-one"
155 value="${build.pack-all-in-one}" />
156 <property
157 name="eclipse.launcher"
158 value="${eclipse.launcher}" />
david_williams4b3c8042007-03-19 01:06:50 +0000159
david_williams9e5f0a92007-08-29 00:09:02 +0000160 </ant>
161 </target>
ndaib8cedc82005-09-13 18:00:32 +0000162
david_williams9e5f0a92007-08-29 00:09:02 +0000163 <target
164 name="copyArtifacts"
165 depends="init">
166 <mkdir dir="${localStampedArtifactsDirectory}" />
167 <mkdir dir="${localStampedArtifactsDirectory}/${buildLabel}" />
168 <copy
169 todir="${localStampedArtifactsDirectory}/${buildLabel}"
170 overwrite="true">
171 <fileset dir="${buildDirectory}/${buildLabel}" />
172 </copy>
173 </target>
ndaib8cedc82005-09-13 18:00:32 +0000174
ndaib8cedc82005-09-13 18:00:32 +0000175
176
david_williams79799372007-09-20 15:24:00 +0000177
david_williams9e5f0a92007-08-29 00:09:02 +0000178 <target name="init">
179 <dirname
180 file="${ant.file}"
181 property="wtp.builder.home" />
182 <condition
183 property="buildBranch"
184 value="R3.0">
185 <equals
186 arg1="${mapVersionTag}"
187 arg2="HEAD" />
188 </condition>
189 <condition
190 property="buildBranch"
191 value="R0.7">
192 <equals
193 arg1="${mapVersionTag}"
194 arg2="R0_7_maintenance" />
195 </condition>
196 <condition
197 property="buildBranch"
198 value="R1.0">
199 <equals
200 arg1="${mapVersionTag}"
201 arg2="R1_0_maintenance" />
202 </condition>
203 <condition
204 property="buildBranch"
205 value="R1.5">
206 <equals
207 arg1="${mapVersionTag}"
208 arg2="R1_5_maintenance" />
209 </condition>
david_williams403beae2007-12-09 02:10:40 +0000210 <condition
211 property="buildBranch"
212 value="R1.5">
213 <equals
214 arg1="${mapVersionTag}"
215 arg2="R1_5_5_patches" />
david_williams79799372007-09-20 15:24:00 +0000216 </condition>
david_williams9e5f0a92007-08-29 00:09:02 +0000217 <condition
218 property="buildBranch"
219 value="R2.0">
220 <equals
221 arg1="${mapVersionTag}"
222 arg2="R2_0_maintenance" />
223 </condition>
224 <!-- if not set above, assume R3.0 -->
225 <!-- this happens, for example, when using a "tempTest" branch -->
226 <property
227 name="buildBranch"
228 value="R3.0" />
david_williams9e5f0a92007-08-29 00:09:02 +0000229 <touch file="${user.home}/.cvspass" />
ndai0aef0962005-09-14 17:36:08 +0000230
david_williams9e5f0a92007-08-29 00:09:02 +0000231 <!-- strip trailing blanks. Seems either Eclipse, or CVS make it hard to not have trailing spaces -->
232 <replaceregexp
233 flags="gm"
234 file="${wtp.builder.home}/build.properties"
235 match=" *$"
236 replace="" />
237 <property file="${wtp.builder.home}/build.properties" />
david_williamsc2796252007-06-30 04:41:27 +0000238
david_williams403beae2007-12-09 02:10:40 +0000239 <ant antfile="${wtp.builder.home}/scripts/build/label.xml" />
david_williams9e5f0a92007-08-29 00:09:02 +0000240 <property file="${buildDirectory}/label.properties" />
ndaib8cedc82005-09-13 18:00:32 +0000241
david_williams9e5f0a92007-08-29 00:09:02 +0000242 <property
243 name="distributionCoreName"
david_williams403beae2007-12-09 02:10:40 +0000244 value="${wtp.builder.home}/distribution/${build.distribution}" />
david_williams4b3c8042007-03-19 01:06:50 +0000245
david_williams9e5f0a92007-08-29 00:09:02 +0000246 <available
247 file="${distributionCoreName}.build/build.xml"
david_williams403beae2007-12-09 02:10:40 +0000248 type="file"
249 property="build_distro_target_exists" />
david_williams9e5f0a92007-08-29 00:09:02 +0000250 <available
251 file="${distributionCoreName}.site/build.xml"
david_williams403beae2007-12-09 02:10:40 +0000252 type="file"
253 property="site_distro_target_exists" />
david_williams9e5f0a92007-08-29 00:09:02 +0000254 <available
255 file="${distributionCoreName}.tests/build.xml"
david_williams403beae2007-12-09 02:10:40 +0000256 type="file"
257 property="tests_distro_target_exists" />
david_williams9e5f0a92007-08-29 00:09:02 +0000258 <available
259 file="${distributionCoreName}.upload/build.xml"
david_williams403beae2007-12-09 02:10:40 +0000260 type="file"
261 property="upload_distro_target_exists" />
david_williams9e5f0a92007-08-29 00:09:02 +0000262 <available
263 file="${distributionCoreName}.whatisfixed/build.xml"
david_williams403beae2007-12-09 02:10:40 +0000264 type="file"
265 property="whatisfixed_distro_target_exists" />
ndai18663852005-09-15 16:06:41 +0000266
ndai0aef0962005-09-14 17:36:08 +0000267
david_williams9e5f0a92007-08-29 00:09:02 +0000268 <!--fetch the HEAD stream of all projects if build type specified as N-->
269 <condition
270 property="fetchTag"
271 value="HEAD">
272 <equals
273 arg1="${buildType}"
274 arg2="N" />
275 </condition>
ndai0aef0962005-09-14 17:36:08 +0000276
david_williams9e5f0a92007-08-29 00:09:02 +0000277 <condition property="tagMaps">
278 <equals
279 arg1="${build.trial}"
280 arg2="false" />
281 </condition>
282 </target>
ndai0aef0962005-09-14 17:36:08 +0000283
ndaib8cedc82005-09-13 18:00:32 +0000284
ndaib8cedc82005-09-13 18:00:32 +0000285</project>