blob: d272f2fd7cd4df74cbe1fbc7872023739c712630 [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_williams79799372007-09-20 15:24:00 +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_williams79799372007-09-20 15:24:00 +000013
david_williams9e5f0a92007-08-29 00:09:02 +000014 <!--
david_williams79799372007-09-20 15:24:00 +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
30
david_williams4b3c8042007-03-19 01:06:50 +000031
david_williams9e5f0a92007-08-29 00:09:02 +000032 <target
33 name="build"
34 depends="init"
35 if="build_distro_target_exists">
36 <property
37 name="buildfile"
38 value="${distributionCoreName}.build/build.xml" />
39 <echo
40 level="debug"
41 message="buildfile: ${buildfile}" />
42 <echo
43 level="debug"
44 message="logExtension: ${logExtension}" />
45 <ant antfile="${buildfile}">
46 <property
47 name="wtp.builder.home"
48 value="${wtp.builder.home}" />
49 <property
50 name="buildBranch"
51 value="${buildBranch}" />
52 <property
53 name="build.pack-all-in-one"
54 value="${build.pack-all-in-one}" />
55 <property
56 name="eclipse.builder.fetch"
57 value="${eclipse.builder.fetch}" />
58 <property
59 name="logExtension"
60 value="${logExtension}" />
61 </ant>
david_williams9e5f0a92007-08-29 00:09:02 +000062 </target>
david_williams67d27702006-11-20 16:36:52 +000063
david_williams036c95d2007-03-29 19:06:14 +000064
david_williams9e5f0a92007-08-29 00:09:02 +000065 <target
66 name="site"
67 depends="init"
68 if="site_distro_target_exists">
69 <ant antfile="${distributionCoreName}.site/build.xml">
70 <property
71 name="wtp.builder.home"
72 value="${wtp.builder.home}" />
73 <property
74 name="buildBranch"
75 value="${buildBranch}" />
76 <property
77 name="build.pack-all-in-one"
78 value="${build.pack-all-in-one}" />
79 <property
80 name="eclipse.launcher"
81 value="${eclipse.launcher}" />
82 </ant>
83 </target>
david_williams6252b612007-02-25 07:23:43 +000084
david_williams67d27702006-11-20 16:36:52 +000085
david_williams9e5f0a92007-08-29 00:09:02 +000086 <target
87 name="test"
88 depends="init"
89 if="tests_distro_target_exists">
90 <ant antfile="${distributionCoreName}.tests/build.xml">
91 <property
92 name="wtp.builder.home"
93 value="${wtp.builder.home}" />
94 <property
95 name="buildBranch"
96 value="${buildBranch}" />
97 <property
98 name="build.pack-all-in-one"
99 value="${build.pack-all-in-one}" />
100 <property
101 name="testRoot"
102 value="${env.BUILD_HOME}/${build.tests}/${build.distribution}-${buildBranch}-${buildType}" />
103 <property
104 name="dependencyTargets"
105 value="${wtp.builder.home}/scripts/dependency/build.xml" />
106 <property
107 name="local.cache.dir"
108 value="${env.LOCAL_PREREQS_CACHE}" />
109 <property
110 name="buildDirectory"
111 value="${buildDirectory}" />
112 <property
113 name="buildLabel"
114 value="${buildLabel}" />
115 <property
116 name="eclipse.launcher"
117 value="${eclipse.launcher}" />
david_williams6252b612007-02-25 07:23:43 +0000118
david_williams9e5f0a92007-08-29 00:09:02 +0000119 </ant>
120 </target>
david_williams67d27702006-11-20 16:36:52 +0000121
david_williams9e5f0a92007-08-29 00:09:02 +0000122 <target
123 name="upload"
124 depends="init"
125 if="upload_distro_target_exists">
126 <ant antfile="${distributionCoreName}.upload/build.xml">
127 <property
128 name="wtp.builder.home"
129 value="${wtp.builder.home}" />
130 <property
131 name="buildBranch"
132 value="${buildBranch}" />
133 <property
134 name="build.pack-all-in-one"
135 value="${build.pack-all-in-one}" />
136 <property
137 name="eclipse.launcher"
138 value="${eclipse.launcher}" />
david_williams6252b612007-02-25 07:23:43 +0000139
david_williams9e5f0a92007-08-29 00:09:02 +0000140 </ant>
141 </target>
david_williams4b3c8042007-03-19 01:06:50 +0000142
david_williams9e5f0a92007-08-29 00:09:02 +0000143 <target
144 name="whatisfixed"
145 depends="init"
146 if="whatisfixed_distro_target_exists">
147 <ant antfile="${distributionCoreName}.whatisfixed/build.xml">
148 <property
149 name="wtp.builder.home"
150 value="${wtp.builder.home}" />
151 <property
152 name="buildBranch"
153 value="${buildBranch}" />
154 <property
155 name="build.pack-all-in-one"
156 value="${build.pack-all-in-one}" />
157 <property
158 name="eclipse.launcher"
159 value="${eclipse.launcher}" />
david_williams4b3c8042007-03-19 01:06:50 +0000160
david_williams9e5f0a92007-08-29 00:09:02 +0000161 </ant>
162 </target>
ndaib8cedc82005-09-13 18:00:32 +0000163
david_williams9e5f0a92007-08-29 00:09:02 +0000164 <target
165 name="copyArtifacts"
166 depends="init">
167 <mkdir dir="${localStampedArtifactsDirectory}" />
168 <mkdir dir="${localStampedArtifactsDirectory}/${buildLabel}" />
169 <copy
170 todir="${localStampedArtifactsDirectory}/${buildLabel}"
171 overwrite="true">
172 <fileset dir="${buildDirectory}/${buildLabel}" />
173 </copy>
174 </target>
ndaib8cedc82005-09-13 18:00:32 +0000175
ndaib8cedc82005-09-13 18:00:32 +0000176
177
david_williams79799372007-09-20 15:24:00 +0000178
david_williams9e5f0a92007-08-29 00:09:02 +0000179 <target name="init">
180 <dirname
181 file="${ant.file}"
182 property="wtp.builder.home" />
183 <condition
184 property="buildBranch"
185 value="R3.0">
186 <equals
187 arg1="${mapVersionTag}"
188 arg2="HEAD" />
189 </condition>
190 <condition
191 property="buildBranch"
192 value="R0.7">
193 <equals
194 arg1="${mapVersionTag}"
195 arg2="R0_7_maintenance" />
196 </condition>
197 <condition
198 property="buildBranch"
199 value="R1.0">
200 <equals
201 arg1="${mapVersionTag}"
202 arg2="R1_0_maintenance" />
203 </condition>
204 <condition
205 property="buildBranch"
206 value="R1.5">
207 <equals
208 arg1="${mapVersionTag}"
209 arg2="R1_5_maintenance" />
210 </condition>
david_williams79799372007-09-20 15:24:00 +0000211 <condition property="buildBranch" value="R1.5">
212 <equals arg1="${mapVersionTag}"
213 arg2="R1_5_5_patches" />
214 </condition>
david_williams9e5f0a92007-08-29 00:09:02 +0000215 <condition
216 property="buildBranch"
217 value="R2.0">
218 <equals
219 arg1="${mapVersionTag}"
220 arg2="R2_0_maintenance" />
221 </condition>
222 <!-- if not set above, assume R3.0 -->
223 <!-- this happens, for example, when using a "tempTest" branch -->
224 <property
225 name="buildBranch"
226 value="R3.0" />
david_williams9e5f0a92007-08-29 00:09:02 +0000227 <touch file="${user.home}/.cvspass" />
ndai0aef0962005-09-14 17:36:08 +0000228
david_williams9e5f0a92007-08-29 00:09:02 +0000229 <!-- strip trailing blanks. Seems either Eclipse, or CVS make it hard to not have trailing spaces -->
230 <replaceregexp
231 flags="gm"
232 file="${wtp.builder.home}/build.properties"
233 match=" *$"
234 replace="" />
235 <property file="${wtp.builder.home}/build.properties" />
david_williamsc2796252007-06-30 04:41:27 +0000236
david_williams79799372007-09-20 15:24:00 +0000237 <ant antfile="${wtp.builder.home}/scripts/build/label.xml" />
david_williams9e5f0a92007-08-29 00:09:02 +0000238 <property file="${buildDirectory}/label.properties" />
ndaib8cedc82005-09-13 18:00:32 +0000239
david_williams9e5f0a92007-08-29 00:09:02 +0000240 <property
241 name="distributionCoreName"
david_williams79799372007-09-20 15:24:00 +0000242 value="${wtp.builder.home}/distribution/${build.distribution}" />
david_williams4b3c8042007-03-19 01:06:50 +0000243
david_williams9e5f0a92007-08-29 00:09:02 +0000244 <available
245 file="${distributionCoreName}.build/build.xml"
david_williams79799372007-09-20 15:24:00 +0000246 type="file"
247 property="build_distro_target_exists" />
david_williams9e5f0a92007-08-29 00:09:02 +0000248 <available
249 file="${distributionCoreName}.site/build.xml"
david_williams79799372007-09-20 15:24:00 +0000250 type="file"
251 property="site_distro_target_exists" />
david_williams9e5f0a92007-08-29 00:09:02 +0000252 <available
253 file="${distributionCoreName}.tests/build.xml"
david_williams79799372007-09-20 15:24:00 +0000254 type="file"
255 property="tests_distro_target_exists" />
david_williams9e5f0a92007-08-29 00:09:02 +0000256 <available
257 file="${distributionCoreName}.upload/build.xml"
david_williams79799372007-09-20 15:24:00 +0000258 type="file"
259 property="upload_distro_target_exists" />
david_williams9e5f0a92007-08-29 00:09:02 +0000260 <available
261 file="${distributionCoreName}.whatisfixed/build.xml"
david_williams79799372007-09-20 15:24:00 +0000262 type="file"
263 property="whatisfixed_distro_target_exists" />
ndai18663852005-09-15 16:06:41 +0000264
ndai0aef0962005-09-14 17:36:08 +0000265
david_williams9e5f0a92007-08-29 00:09:02 +0000266 <!--fetch the HEAD stream of all projects if build type specified as N-->
267 <condition
268 property="fetchTag"
269 value="HEAD">
270 <equals
271 arg1="${buildType}"
272 arg2="N" />
273 </condition>
ndai0aef0962005-09-14 17:36:08 +0000274
david_williams9e5f0a92007-08-29 00:09:02 +0000275 <condition property="tagMaps">
276 <equals
277 arg1="${build.trial}"
278 arg2="false" />
279 </condition>
280 </target>
ndai0aef0962005-09-14 17:36:08 +0000281
ndaib8cedc82005-09-13 18:00:32 +0000282
ndaib8cedc82005-09-13 18:00:32 +0000283</project>