blob: d65cc9bd82bf8e4db2dc6a8915c33e0ced131ea3 [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 <property file="${ant.project.name}.properties" />
david_williams4b3c8042007-03-19 01:06:50 +000023
david_williams9e5f0a92007-08-29 00:09:02 +000024 <!-- = = = end standard properties pattern = = = -->
david_williams67d27702006-11-20 16:36:52 +000025
david_williams343518f2007-12-09 03:52:50 +000026
27 <!-- if not already set externally, provide some appropriate default for these parameters -->
28 <property name="build.pack-all-in-one" value="false" />
29
david_williams9e5f0a92007-08-29 00:09:02 +000030 <target
31 name="build"
32 depends="init"
33 if="build_distro_target_exists">
34 <property
35 name="buildfile"
36 value="${distributionCoreName}.build/build.xml" />
37 <echo
38 level="debug"
39 message="buildfile: ${buildfile}" />
david_williams9e5f0a92007-08-29 00:09:02 +000040 <ant antfile="${buildfile}">
41 <property
42 name="wtp.builder.home"
43 value="${wtp.builder.home}" />
44 <property
45 name="buildBranch"
46 value="${buildBranch}" />
47 <property
48 name="build.pack-all-in-one"
49 value="${build.pack-all-in-one}" />
david_williams9e5f0a92007-08-29 00:09:02 +000050 </ant>
david_williams9e5f0a92007-08-29 00:09:02 +000051 </target>
david_williams67d27702006-11-20 16:36:52 +000052
david_williams036c95d2007-03-29 19:06:14 +000053
david_williams9e5f0a92007-08-29 00:09:02 +000054 <target
55 name="site"
56 depends="init"
57 if="site_distro_target_exists">
58 <ant antfile="${distributionCoreName}.site/build.xml">
59 <property
60 name="wtp.builder.home"
61 value="${wtp.builder.home}" />
62 <property
63 name="buildBranch"
64 value="${buildBranch}" />
65 <property
66 name="build.pack-all-in-one"
67 value="${build.pack-all-in-one}" />
68 <property
69 name="eclipse.launcher"
70 value="${eclipse.launcher}" />
71 </ant>
72 </target>
david_williams6252b612007-02-25 07:23:43 +000073
david_williams67d27702006-11-20 16:36:52 +000074
david_williams9e5f0a92007-08-29 00:09:02 +000075 <target
76 name="test"
77 depends="init"
78 if="tests_distro_target_exists">
79 <ant antfile="${distributionCoreName}.tests/build.xml">
80 <property
81 name="wtp.builder.home"
82 value="${wtp.builder.home}" />
83 <property
84 name="buildBranch"
85 value="${buildBranch}" />
86 <property
87 name="build.pack-all-in-one"
88 value="${build.pack-all-in-one}" />
89 <property
90 name="testRoot"
91 value="${env.BUILD_HOME}/${build.tests}/${build.distribution}-${buildBranch}-${buildType}" />
92 <property
93 name="dependencyTargets"
94 value="${wtp.builder.home}/scripts/dependency/build.xml" />
95 <property
96 name="local.cache.dir"
97 value="${env.LOCAL_PREREQS_CACHE}" />
98 <property
99 name="buildDirectory"
100 value="${buildDirectory}" />
101 <property
102 name="buildLabel"
103 value="${buildLabel}" />
104 <property
105 name="eclipse.launcher"
106 value="${eclipse.launcher}" />
david_williams6252b612007-02-25 07:23:43 +0000107
david_williams9e5f0a92007-08-29 00:09:02 +0000108 </ant>
109 </target>
david_williams67d27702006-11-20 16:36:52 +0000110
david_williams9e5f0a92007-08-29 00:09:02 +0000111 <target
112 name="upload"
113 depends="init"
114 if="upload_distro_target_exists">
115 <ant antfile="${distributionCoreName}.upload/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 <property
126 name="eclipse.launcher"
127 value="${eclipse.launcher}" />
david_williams6252b612007-02-25 07:23:43 +0000128
david_williams9e5f0a92007-08-29 00:09:02 +0000129 </ant>
130 </target>
david_williams4b3c8042007-03-19 01:06:50 +0000131
david_williams9e5f0a92007-08-29 00:09:02 +0000132 <target
133 name="whatisfixed"
134 depends="init"
135 if="whatisfixed_distro_target_exists">
136 <ant antfile="${distributionCoreName}.whatisfixed/build.xml">
137 <property
138 name="wtp.builder.home"
139 value="${wtp.builder.home}" />
140 <property
141 name="buildBranch"
142 value="${buildBranch}" />
143 <property
144 name="build.pack-all-in-one"
145 value="${build.pack-all-in-one}" />
146 <property
147 name="eclipse.launcher"
148 value="${eclipse.launcher}" />
david_williams4b3c8042007-03-19 01:06:50 +0000149
david_williams9e5f0a92007-08-29 00:09:02 +0000150 </ant>
151 </target>
ndaib8cedc82005-09-13 18:00:32 +0000152
david_williams9e5f0a92007-08-29 00:09:02 +0000153 <target
154 name="copyArtifacts"
155 depends="init">
156 <mkdir dir="${localStampedArtifactsDirectory}" />
157 <mkdir dir="${localStampedArtifactsDirectory}/${buildLabel}" />
158 <copy
159 todir="${localStampedArtifactsDirectory}/${buildLabel}"
160 overwrite="true">
161 <fileset dir="${buildDirectory}/${buildLabel}" />
162 </copy>
163 </target>
ndaib8cedc82005-09-13 18:00:32 +0000164
ndaib8cedc82005-09-13 18:00:32 +0000165
166
david_williams79799372007-09-20 15:24:00 +0000167
david_williams9e5f0a92007-08-29 00:09:02 +0000168 <target name="init">
169 <dirname
170 file="${ant.file}"
171 property="wtp.builder.home" />
172 <condition
173 property="buildBranch"
174 value="R3.0">
175 <equals
176 arg1="${mapVersionTag}"
177 arg2="HEAD" />
178 </condition>
179 <condition
180 property="buildBranch"
181 value="R0.7">
182 <equals
183 arg1="${mapVersionTag}"
184 arg2="R0_7_maintenance" />
185 </condition>
186 <condition
187 property="buildBranch"
188 value="R1.0">
189 <equals
190 arg1="${mapVersionTag}"
191 arg2="R1_0_maintenance" />
192 </condition>
193 <condition
194 property="buildBranch"
195 value="R1.5">
196 <equals
197 arg1="${mapVersionTag}"
198 arg2="R1_5_maintenance" />
199 </condition>
david_williams403beae2007-12-09 02:10:40 +0000200 <condition
201 property="buildBranch"
202 value="R1.5">
203 <equals
204 arg1="${mapVersionTag}"
205 arg2="R1_5_5_patches" />
david_williams79799372007-09-20 15:24:00 +0000206 </condition>
david_williams9e5f0a92007-08-29 00:09:02 +0000207 <condition
208 property="buildBranch"
209 value="R2.0">
210 <equals
211 arg1="${mapVersionTag}"
212 arg2="R2_0_maintenance" />
213 </condition>
214 <!-- if not set above, assume R3.0 -->
215 <!-- this happens, for example, when using a "tempTest" branch -->
216 <property
217 name="buildBranch"
218 value="R3.0" />
david_williams9e5f0a92007-08-29 00:09:02 +0000219 <touch file="${user.home}/.cvspass" />
ndai0aef0962005-09-14 17:36:08 +0000220
david_williams9e5f0a92007-08-29 00:09:02 +0000221 <!-- strip trailing blanks. Seems either Eclipse, or CVS make it hard to not have trailing spaces -->
222 <replaceregexp
223 flags="gm"
224 file="${wtp.builder.home}/build.properties"
225 match=" *$"
226 replace="" />
227 <property file="${wtp.builder.home}/build.properties" />
david_williamsc2796252007-06-30 04:41:27 +0000228
david_williams403beae2007-12-09 02:10:40 +0000229 <ant antfile="${wtp.builder.home}/scripts/build/label.xml" />
david_williams9e5f0a92007-08-29 00:09:02 +0000230 <property file="${buildDirectory}/label.properties" />
ndaib8cedc82005-09-13 18:00:32 +0000231
david_williams9e5f0a92007-08-29 00:09:02 +0000232 <property
233 name="distributionCoreName"
david_williams403beae2007-12-09 02:10:40 +0000234 value="${wtp.builder.home}/distribution/${build.distribution}" />
david_williams4b3c8042007-03-19 01:06:50 +0000235
david_williams9e5f0a92007-08-29 00:09:02 +0000236 <available
237 file="${distributionCoreName}.build/build.xml"
david_williams403beae2007-12-09 02:10:40 +0000238 type="file"
239 property="build_distro_target_exists" />
david_williams9e5f0a92007-08-29 00:09:02 +0000240 <available
241 file="${distributionCoreName}.site/build.xml"
david_williams403beae2007-12-09 02:10:40 +0000242 type="file"
243 property="site_distro_target_exists" />
david_williams9e5f0a92007-08-29 00:09:02 +0000244 <available
245 file="${distributionCoreName}.tests/build.xml"
david_williams403beae2007-12-09 02:10:40 +0000246 type="file"
247 property="tests_distro_target_exists" />
david_williams9e5f0a92007-08-29 00:09:02 +0000248 <available
249 file="${distributionCoreName}.upload/build.xml"
david_williams403beae2007-12-09 02:10:40 +0000250 type="file"
251 property="upload_distro_target_exists" />
david_williams9e5f0a92007-08-29 00:09:02 +0000252 <available
253 file="${distributionCoreName}.whatisfixed/build.xml"
david_williams403beae2007-12-09 02:10:40 +0000254 type="file"
255 property="whatisfixed_distro_target_exists" />
ndai18663852005-09-15 16:06:41 +0000256
ndai0aef0962005-09-14 17:36:08 +0000257
david_williams9e5f0a92007-08-29 00:09:02 +0000258 <!--fetch the HEAD stream of all projects if build type specified as N-->
259 <condition
260 property="fetchTag"
261 value="HEAD">
262 <equals
263 arg1="${buildType}"
264 arg2="N" />
265 </condition>
ndai0aef0962005-09-14 17:36:08 +0000266
david_williams9e5f0a92007-08-29 00:09:02 +0000267 <condition property="tagMaps">
268 <equals
269 arg1="${build.trial}"
270 arg2="false" />
271 </condition>
272 </target>
ndai0aef0962005-09-14 17:36:08 +0000273
ndaib8cedc82005-09-13 18:00:32 +0000274
ndaib8cedc82005-09-13 18:00:32 +0000275</project>