blob: 78b5c3f37b0f954f7e2fbf887d97335060c763d2 [file] [log] [blame]
david_williams22bd49b2006-11-28 09:17:14 +00001<project name="build" default="build" basedir=".">
david_williams67d27702006-11-20 16:36:52 +00002
david_williams22bd49b2006-11-28 09:17:14 +00003 <!-- = = = standard properties pattern = = = -->
4 <!--
5 Note to be cross-platform, "environment variables" are only appropriate for
david_williams1cff0e92006-11-23 00:40:29 +00006 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_williams22bd49b2006-11-28 09:17:14 +000010
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_williams67d27702006-11-20 16:36:52 +000021
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_williams4fa630e2007-02-17 21:46:07 +000040 <property
41 name="eclipse.builder.fetch"
42 value="${eclipse.builder.fetch}" />
david_williams67d27702006-11-20 16:36:52 +000043 </ant>
44 </target>
45
46
47 <target
48 name="site"
49 depends="init"
50 if="site_distro_target_exists">
51 <ant antfile="${distributionCoreName}.site/build.xml">
52 <property
53 name="wtp.builder.home"
54 value="${wtp.builder.home}" />
55 <property
56 name="buildBranch"
57 value="${buildBranch}" />
58 <property
59 name="build.pack-all-in-one"
60 value="${build.pack-all-in-one}" />
david_williams6252b612007-02-25 07:23:43 +000061 <property
62 name="eclipse.launcher"
63 value="${eclipse.launcher}"/>
david_williams67d27702006-11-20 16:36:52 +000064 </ant>
65 </target>
66
67
68 <target
69 name="test"
70 depends="init"
71 if="tests_distro_target_exists">
72 <ant antfile="${distributionCoreName}.tests/build.xml">
73 <property
74 name="wtp.builder.home"
75 value="${wtp.builder.home}" />
76 <property
77 name="buildBranch"
78 value="${buildBranch}" />
79 <property
80 name="build.pack-all-in-one"
81 value="${build.pack-all-in-one}" />
82 <property
83 name="testRoot"
david_williams1cff0e92006-11-23 00:40:29 +000084 value="${env.BUILD_HOME}/${build.tests}-${build.distribution}-${buildBranch}-${buildType}" />
david_williams67d27702006-11-20 16:36:52 +000085 <property
86 name="dependencyTargets"
87 value="${wtp.builder.home}/scripts/dependency/build.xml" />
88 <property
89 name="local.cache.dir"
david_williams42f9b242006-11-27 18:45:14 +000090 value="${env.LOCAL_PREREQS_CACHE}" />
david_williamsc84ab8c2006-12-11 18:50:34 +000091 <property
92 name="buildDirectory"
93 value="${buildDirectory}" />
94 <property
95 name="buildLabel"
david_williams6252b612007-02-25 07:23:43 +000096 value="${buildLabel}" />
97 <property
98 name="eclipse.launcher"
99 value="${eclipse.launcher}"/>
100
david_williams67d27702006-11-20 16:36:52 +0000101 </ant>
102 </target>
103
104 <target
105 name="upload"
106 depends="init"
107 if="upload_distro_target_exists">
108 <ant antfile="${distributionCoreName}.upload/build.xml">
109 <property
110 name="wtp.builder.home"
111 value="${wtp.builder.home}" />
112 <property
113 name="buildBranch"
114 value="${buildBranch}" />
115 <property
116 name="build.pack-all-in-one"
117 value="${build.pack-all-in-one}" />
david_williams6252b612007-02-25 07:23:43 +0000118 <property
119 name="eclipse.launcher"
120 value="${eclipse.launcher}"/>
121
david_williams67d27702006-11-20 16:36:52 +0000122 </ant>
123 </target>
124
125 <target
126 name="whatisfixed"
127 depends="init"
128 if="whatisfixed_distro_target_exists">
129 <ant antfile="${distributionCoreName}.whatisfixed/build.xml">
130 <property
131 name="wtp.builder.home"
132 value="${wtp.builder.home}" />
133 <property
134 name="buildBranch"
135 value="${buildBranch}" />
136 <property
137 name="build.pack-all-in-one"
138 value="${build.pack-all-in-one}" />
david_williams6252b612007-02-25 07:23:43 +0000139 <property
140 name="eclipse.launcher"
141 value="${eclipse.launcher}"/>
142
david_williams67d27702006-11-20 16:36:52 +0000143 </ant>
144 </target>
ndaib8cedc82005-09-13 18:00:32 +0000145
ndaib8cedc82005-09-13 18:00:32 +0000146
ndaib8cedc82005-09-13 18:00:32 +0000147
ndaib8cedc82005-09-13 18:00:32 +0000148
149
david_williams67d27702006-11-20 16:36:52 +0000150 <target name="init">
151 <dirname
152 file="${ant.file}"
153 property="wtp.builder.home" />
154 <condition
155 property="buildBranch"
156 value="R2.0">
157 <equals
158 arg1="${mapVersionTag}"
159 arg2="HEAD" />
160 </condition>
161 <condition
162 property="buildBranch"
163 value="R0.7">
164 <equals
165 arg1="${mapVersionTag}"
166 arg2="R0_7_maintenance" />
167 </condition>
168 <condition
169 property="buildBranch"
170 value="R1.0">
171 <equals
172 arg1="${mapVersionTag}"
173 arg2="R1_0_maintenance" />
174 </condition>
175 <condition
176 property="buildBranch"
177 value="R1.5">
178 <equals
179 arg1="${mapVersionTag}"
180 arg2="R1_5_maintenance" />
181 </condition>
ndai18663852005-09-15 16:06:41 +0000182
david_williams67d27702006-11-20 16:36:52 +0000183 <touch file="${user.home}/.cvspass" />
ndai0aef0962005-09-14 17:36:08 +0000184
david_williams67d27702006-11-20 16:36:52 +0000185 <property file="${wtp.builder.home}/build.properties" />
186 <touch file="${user.home}/.cvspass" />
187 <ant antfile="${wtp.builder.home}/scripts/build/label.xml" />
188 <property file="${buildDirectory}/label.properties" />
ndaib8cedc82005-09-13 18:00:32 +0000189
david_williams29ad1a32006-11-20 17:07:12 +0000190 <property
191 name="distributionCoreName"
192 value="${wtp.builder.home}/distribution/${build.distribution}" />
193
david_williams67d27702006-11-20 16:36:52 +0000194 <available
195 file="${distributionCoreName}.build/build.xml"
196 type="file"
197 property="build_distro_target_exists" />
198 <available
199 file="${distributionCoreName}.site/build.xml"
200 type="file"
201 property="site_distro_target_exists" />
202 <available
203 file="${distributionCoreName}.tests/build.xml"
204 type="file"
205 property="tests_distro_target_exists" />
206 <available
207 file="${distributionCoreName}.upload/build.xml"
208 type="file"
209 property="upload_distro_target_exists" />
210 <available
211 file="${distributionCoreName}.whatisfixed/build.xml"
212 type="file"
213 property="whatisfixed_distro_target_exists" />
ndai18663852005-09-15 16:06:41 +0000214
ndai0aef0962005-09-14 17:36:08 +0000215
david_williams67d27702006-11-20 16:36:52 +0000216 <!--fetch the HEAD stream of all projects if build type specified as N-->
217 <condition
218 property="fetchTag"
219 value="HEAD">
220 <equals
221 arg1="${buildType}"
222 arg2="N" />
223 </condition>
ndai0aef0962005-09-14 17:36:08 +0000224
david_williams67d27702006-11-20 16:36:52 +0000225 <condition property="tagMaps">
226 <equals
227 arg1="${build.trial}"
228 arg2="false" />
229 </condition>
230 </target>
ndai0aef0962005-09-14 17:36:08 +0000231
ndaib8cedc82005-09-13 18:00:32 +0000232
233</project>