blob: cce1b17a870091ba928d109aef6a0cad9d85d3bd [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_williams67d27702006-11-20 16:36:52 +000040 </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_williams1cff0e92006-11-23 00:40:29 +000078 value="${env.BUILD_HOME}/${build.tests}-${build.distribution}-${buildBranch}-${buildType}" />
david_williams67d27702006-11-20 16:36:52 +000079 <property
80 name="dependencyTargets"
81 value="${wtp.builder.home}/scripts/dependency/build.xml" />
82 <property
83 name="local.cache.dir"
david_williams42f9b242006-11-27 18:45:14 +000084 value="${env.LOCAL_PREREQS_CACHE}" />
david_williamsc84ab8c2006-12-11 18:50:34 +000085 <property
86 name="buildDirectory"
87 value="${buildDirectory}" />
88 <property
89 name="buildLabel"
90 value="${buildLabel}" />
david_williams67d27702006-11-20 16:36:52 +000091 </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>
ndaib8cedc82005-09-13 18:00:32 +0000127
ndaib8cedc82005-09-13 18:00:32 +0000128
ndaib8cedc82005-09-13 18:00:32 +0000129
ndaib8cedc82005-09-13 18:00:32 +0000130
131
david_williams67d27702006-11-20 16:36:52 +0000132 <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>
ndai18663852005-09-15 16:06:41 +0000164
david_williams67d27702006-11-20 16:36:52 +0000165 <touch file="${user.home}/.cvspass" />
ndai0aef0962005-09-14 17:36:08 +0000166
david_williams67d27702006-11-20 16:36:52 +0000167 <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" />
ndaib8cedc82005-09-13 18:00:32 +0000171
david_williams29ad1a32006-11-20 17:07:12 +0000172 <property
173 name="distributionCoreName"
174 value="${wtp.builder.home}/distribution/${build.distribution}" />
175
david_williams67d27702006-11-20 16:36:52 +0000176 <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" />
ndai18663852005-09-15 16:06:41 +0000196
ndai0aef0962005-09-14 17:36:08 +0000197
david_williams67d27702006-11-20 16:36:52 +0000198 <!--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>
ndai0aef0962005-09-14 17:36:08 +0000206
david_williams67d27702006-11-20 16:36:52 +0000207 <condition property="tagMaps">
208 <equals
209 arg1="${build.trial}"
210 arg2="false" />
211 </condition>
212 </target>
ndai0aef0962005-09-14 17:36:08 +0000213
ndaib8cedc82005-09-13 18:00:32 +0000214
215</project>