|
1 <?xml version="1.0" encoding="UTF-8"?> |
|
2 <!-- |
|
3 ============================================================================ |
|
4 Name : preparation.ant.xml |
|
5 Part of : Helium |
|
6 |
|
7 Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
8 All rights reserved. |
|
9 This component and the accompanying materials are made available |
|
10 under the terms of the License "Eclipse Public License v1.0" |
|
11 which accompanies this distribution, and is available |
|
12 at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
13 |
|
14 Initial Contributors: |
|
15 Nokia Corporation - initial contribution. |
|
16 |
|
17 Contributors: |
|
18 |
|
19 Description: |
|
20 |
|
21 ============================================================================ |
|
22 --> |
|
23 <!--* @package preparation --> |
|
24 <project name="preparation" xmlns:hlm="http://www.nokia.com/helium"> |
|
25 <description>Preparation of a build area and other build initialization.</description> |
|
26 |
|
27 <!--* @property prep.config.file |
|
28 Defines configuration file used in prep-copy target. The file defines how files are copied and extracted into build area. |
|
29 @type string |
|
30 @editable required |
|
31 @scope public |
|
32 --> |
|
33 |
|
34 <!-- includes all necessary stuff --> |
|
35 <!-- To check which ccmgetinput helium will be use |
|
36 @type string |
|
37 --> |
|
38 <property name="ccmgetinput" value="ccmgetinput" /> |
|
39 |
|
40 <import file="bom/bom.ant.xml" /> |
|
41 <import file="password.ant.xml" /> |
|
42 <import file="ido-prep.ant.xml" /> |
|
43 <import file="synergy/ccmgetinput.ant.xml" /> |
|
44 <import file="synergy/buildmanagement.ant.xml" /> |
|
45 <import file="ivy/dependencies.ant.xml"/> |
|
46 |
|
47 |
|
48 <!-- |
|
49 Gets a release from GRACE. |
|
50 TODO: Improve interface with customer configuration, getenv_options should be replaced by set of properties. |
|
51 --> |
|
52 <target name="preparation-getenv" if="base_release.path" depends="init-build-area"> |
|
53 <!-- Making sure we have nothing to pass --> |
|
54 <property name="base_release.path" value=""/> |
|
55 <property name="base_release.getenv_options" value=""/> |
|
56 <!-- Using the cleaned version of getenv.pl --> |
|
57 <!-- Defines the location of the getenv.pl script. |
|
58 @type string |
|
59 @scope private |
|
60 --> |
|
61 <property name="getenv.tool.location" location="${helium.dir}/tools/preparation/getenv.pl"/> |
|
62 <hlm:tempRecordStartMacro name="${build.id}_getenv.log"/> |
|
63 <trycatch> |
|
64 <try> |
|
65 <if> |
|
66 <not> |
|
67 <equals arg1="${base_release.getenv_options}" arg2="" /> |
|
68 </not> |
|
69 <then> |
|
70 <exec executable="perl" dir="${build.drive}/" failonerror="true"> |
|
71 <arg value="${getenv.tool.location}"/> |
|
72 <arg value="-start"/> |
|
73 <arg value="-nosoap"/> |
|
74 <arg value="-path"/> |
|
75 <arg value="${base_release.path}"/> |
|
76 <arg line="${base_release.getenv_options}"/> |
|
77 </exec> |
|
78 </then> |
|
79 <else> |
|
80 <exec executable="perl" dir="${build.drive}/" failonerror="true"> |
|
81 <arg value="${getenv.tool.location}"/> |
|
82 <arg value="-start"/> |
|
83 <arg value="-nosoap"/> |
|
84 <arg value="-path"/> |
|
85 <arg value="${base_release.path}"/> |
|
86 </exec> |
|
87 </else> |
|
88 </if> |
|
89 </try> |
|
90 <catch> |
|
91 <echo message="Error: getenv failed"/> |
|
92 </catch> |
|
93 </trycatch> |
|
94 <hlm:tempRecordStopMacro name="${build.id}_getenv.log" filterref="filterset.getenv" phase="prep"/> |
|
95 </target> |
|
96 |
|
97 |
|
98 <!-- Removes an older build area from a machine, based on a count of |
|
99 how many build areas to maintain at a time. |
|
100 --> |
|
101 <target name="delete-old-build-area" if="build.area.limit"> |
|
102 <dirset id="build.area.dirs" dir="${prep.root.dir}" includes="${build.name}*"/> |
|
103 <resourcecount property="build.area.count"> |
|
104 <dirset refid="build.area.dirs"/> |
|
105 </resourcecount> |
|
106 <if> |
|
107 <scriptcondition language="jython"> |
|
108 <![CDATA[ |
|
109 if project.getProperty("build.area.count") > project.getProperty("build.area.limit"): |
|
110 self.value = True |
|
111 ]]> |
|
112 </scriptcondition> |
|
113 <then> |
|
114 <math result="num.to.delete" operand1="${build.area.count}" operation="-" operand2="${build.area.limit}" datatype="int"/> |
|
115 <pathconvert property="build.area"> |
|
116 <first count="${num.to.delete}"> |
|
117 <sort xmlns:rcmp="antlib:org.apache.tools.ant.types.resources.comparators"> |
|
118 <rcmp:date/> |
|
119 <dirset refid="build.area.dirs"/> |
|
120 </sort> |
|
121 </first> |
|
122 </pathconvert> |
|
123 <echo>${build.area}</echo> |
|
124 <shellscript shell="cmd.exe" tmpsuffix=".bat" dir="${prep.root.dir}"> |
|
125 <arg value="/c"/> |
|
126 <arg value="call"/> |
|
127 rmdir /s/q ${build.area} |
|
128 </shellscript> |
|
129 </then> |
|
130 </if> |
|
131 </target> |
|
132 |
|
133 |
|
134 <!-- Defines the start of a build from logging point of view. --> |
|
135 <target name="log-build-start"> |
|
136 <tstamp> |
|
137 <format property="log.build.start_time" pattern="yyyy-MM-dd'T'HH:mm:ss" /> |
|
138 </tstamp> |
|
139 <!-- Used in ROM configuration files for version date. --> |
|
140 <tstamp> |
|
141 <format property="today" pattern="dd-MM-yyyy" /> |
|
142 </tstamp> |
|
143 </target> |
|
144 |
|
145 |
|
146 |
|
147 <!-- Prepares the Synergy configuration input for processing. |
|
148 |
|
149 This inserts Ant properties to the config file. --> |
|
150 <target name="ccm-prepare-input" if="prep.delivery.file"> |
|
151 <property name="prep.delivery.conf.parsed" location="${build.cache.dir}/delivery.xml.parsed" /> |
|
152 <copy file="${prep.delivery.file}" tofile="${prep.delivery.conf.parsed}" overwrite="true"> |
|
153 <filterchain> |
|
154 <expandproperties /> |
|
155 </filterchain> |
|
156 </copy> |
|
157 </target> |
|
158 |
|
159 |
|
160 <!-- Checks the build drive is available. --> |
|
161 <target name="check-env-build-drive"> |
|
162 <available file="${build.drive}/" property="build.drive.available" /> |
|
163 <fail unless="build.drive.available" /> |
|
164 </target> |
|
165 |
|
166 <!-- Macro to check enough disk space available or not. Notify build manager |
|
167 in case of insufficient disk space. --> |
|
168 <macrodef name="diskspaceMacro" uri="http://www.nokia.com/helium"> |
|
169 <attribute name="drive"/> |
|
170 <attribute name="space"/> |
|
171 <sequential> |
|
172 <trycatch> |
|
173 <try> |
|
174 <exec executable="python" failonerror="true"> |
|
175 <arg value="-m" /> |
|
176 <arg value="freedisk" /> |
|
177 <arg value="--drive" /> |
|
178 <arg value="@{drive}" /> |
|
179 <arg value="--space" /> |
|
180 <arg value="@{space}" /> |
|
181 </exec> |
|
182 </try> |
|
183 <catch> |
|
184 <hlm:notifyMacro message="${env.COMPUTERNAME} has insufficient disk space on drive @{drive} for ${build.id}. Build will continue..."/> |
|
185 </catch> |
|
186 </trycatch> |
|
187 </sequential> |
|
188 </macrodef> |
|
189 |
|
190 |
|
191 <!-- Checks there is sufficient disk space on the local machine and on the network. --> |
|
192 <target name="check-free-space"> |
|
193 <if> |
|
194 <isset property="local.free.space"/> |
|
195 <then> |
|
196 <echo message="drive: ${build.drive}"/> |
|
197 <echo message="Required Space: ${local.free.space}MB"/> |
|
198 <if> |
|
199 <not> |
|
200 <hasfreespace partition="${build.drive}" needed="${local.free.space}M"/> |
|
201 </not> |
|
202 <then> |
|
203 <hlm:notifyMacro message="${env.COMPUTERNAME} has insufficient disk space on drive ${build.drive} for ${build.id}. Build will continue..."/> |
|
204 </then> |
|
205 </if> |
|
206 </then> |
|
207 </if> |
|
208 <if> |
|
209 <isset property="network.free.space"/> |
|
210 <then> |
|
211 <hlm:diskspaceMacro drive="${network.drive}" space="${network.free.space}"/> |
|
212 </then> |
|
213 </if> |
|
214 </target> |
|
215 |
|
216 |
|
217 <!-- Checks that filedisk is on the machine. |
|
218 |
|
219 TODO: do we still need this if filedisk is in /external? Also should handle |
|
220 tools dependencies in more structured way. |
|
221 --> |
|
222 <target name="check-env-filedisk" depends="check-env-build-drive"> |
|
223 <available file="${env.SystemRoot}/system32/filedisk.exe" property="filedisk.available" /> |
|
224 <fail unless="filedisk.available" /> |
|
225 </target> |
|
226 |
|
227 |
|
228 <!-- Gets the ARM compiler license text. --> |
|
229 <target name="get-arm-license"> |
|
230 <exec executable="armcc" outputproperty="arm.compiler.version.text" failonerror="${failonerror}"> |
|
231 <arg value="--vsn" /> |
|
232 </exec> |
|
233 <echo message="ARM compiler version text: ${arm.compiler.version.text}" /> |
|
234 </target> |
|
235 |
|
236 |
|
237 <!-- Checks if there was any error getting the ARM license information. --> |
|
238 <target name="check-env-arm-license" depends="get-arm-license"> |
|
239 <!-- Fail if the compiler version string contains error text. --> |
|
240 <fail message="Error with ARM compiler configuration."> |
|
241 <condition> |
|
242 <contains string="${arm.compiler.version.text}" substring="Error" /> |
|
243 </condition> |
|
244 </fail> |
|
245 </target> |
|
246 |
|
247 |
|
248 <!-- Sets the ARM compiler version to a property so it can be set in the environment |
|
249 during compilation. --> |
|
250 <target name="set-arm-version" depends="check-env-arm-license" unless="not.using.rvct"> |
|
251 <loadresource property="arm.compiler.version"> |
|
252 <propertyresource name="arm.compiler.version.text"/> |
|
253 <filterchain> |
|
254 <linecontainsregexp> |
|
255 <regexp pattern="ARM.* C/C\+\+ Compiler" /> |
|
256 </linecontainsregexp> |
|
257 </filterchain> |
|
258 </loadresource> |
|
259 <echo message="ARM compiler version: ${arm.compiler.version}" /> |
|
260 </target> |
|
261 |
|
262 |
|
263 <!-- Prepares the preparation configuration by inserting Ant properties. --> |
|
264 <target name="prep-prepare-input" if="prep.config.file"> |
|
265 <property name="prep.config.file.parsed" location="${build.output.dir}/prep.xml.parsed" /> |
|
266 <copy file="${prep.config.file}" tofile="${prep.config.file.parsed}" overwrite="true"> |
|
267 <filterchain> |
|
268 <expandproperties /> |
|
269 </filterchain> |
|
270 </copy> |
|
271 </target> |
|
272 |
|
273 |
|
274 <!-- Obsolete. Left as placeholder. |
|
275 Earlier: Checks that all the build area inputs are available. --> |
|
276 <target name="check-env-prep" depends="prep-prepare-input"> |
|
277 </target> |
|
278 |
|
279 |
|
280 <!-- Generates a starting XML file for the build summary. --> |
|
281 <target name="build-info" depends="start-ant-log,log-build-start"> |
|
282 <dirname file="${build.summary.file}" property="build.summary.file.dir"/> |
|
283 <mkdir dir="${build.summary.file.dir}"/> |
|
284 <mkdir dir="${prep.log.dir}"/> |
|
285 <xmltask dest="${build.log.dir}/${build.id}_info.log.xml"> |
|
286 <insert path="/"> |
|
287 <![CDATA[ |
|
288 <info> |
|
289 <id>${build.id}</id> |
|
290 <number>${build.number}</number> |
|
291 <startTime>${log.build.start_time}</startTime> |
|
292 <machine>${env.COMPUTERNAME}</machine> |
|
293 <publish> |
|
294 <status>${is.published}</status> |
|
295 <location>${publish.dir}</location> |
|
296 </publish> |
|
297 </info> |
|
298 ]]> |
|
299 </insert> |
|
300 </xmltask> |
|
301 </target> |
|
302 |
|
303 <propertyset id="password.list.ref"> |
|
304 <propertyref name="ccm.password.rc" /> |
|
305 <propertyref name="ccm.user.password" /> |
|
306 <propertyref name="release.grace.password" /> |
|
307 <propertyref name="unix.password" /> |
|
308 <propertyref name="release.notes.password" /> |
|
309 <propertyref name="nwiki.password" /> |
|
310 <propertyref name="noe.password" /> |
|
311 <propertyref name="ats3.password" /> |
|
312 <propertyref name="hydra.password" /> |
|
313 </propertyset> |
|
314 |
|
315 <!-- Logs the Ant property build environment. --> |
|
316 <target name="log-build-env"> |
|
317 <echoproperties destfile="${build.log.dir}/${build.id}_ant_env.log"> |
|
318 <!-- Do not log passwords... --> |
|
319 <propertyset negate="true"> |
|
320 <propertyset refid="password.list.ref"/> |
|
321 </propertyset> |
|
322 </echoproperties> |
|
323 </target> |
|
324 |
|
325 |
|
326 <!-- Create a free substed drive for running the build on. |
|
327 |
|
328 Helium can now subst/unsubst build drive automatically. If you don't define the property "build.drive" then helium will search the next available build drive and assign it to in "build.drive" property. |
|
329 To unsubst the build drive after the build use property "unsubst.after.build=yes", the value "no" will let the drive still in subst. |
|
330 |
|
331 This target will: |
|
332 * Rename the prep directory if it exists and we don't have prep.build.dir.keep defined. |
|
333 * Create a new directory for prepping the build area. |
|
334 * Subst that directory to the build drive. |
|
335 --> |
|
336 <target name="prep-drive"> |
|
337 |
|
338 <!-- Just un-subst the drive if build.drive is predefined. --> |
|
339 <propertyregex property="prep.build.dir.drive" input="${prep.build.dir}" regexp="^([^:]*:\\).*" select="\1" /> |
|
340 <fail message="${prep.build.dir.drive} could not be located"> |
|
341 <condition> |
|
342 <and> |
|
343 <os family='windows'/> |
|
344 <not> |
|
345 <available file="${prep.build.dir.drive}"/> |
|
346 </not> |
|
347 </and> |
|
348 </condition> |
|
349 </fail> |
|
350 <if> |
|
351 <and> |
|
352 <not> |
|
353 <isset property="env.HLM_SUBCON"/> |
|
354 </not> |
|
355 <isset property="use.dragonfly"/> |
|
356 </and> |
|
357 <then> |
|
358 <antcall target="dragonfly-prep-drive"/> |
|
359 </then> |
|
360 <else> |
|
361 <if> |
|
362 <not> |
|
363 <isset property="build.drive.notdefined"/> |
|
364 </not> |
|
365 <then> |
|
366 <echo>Unsubsting any existing path substed to ${build.drive}. |
|
367 If this fails, it is because there was no substed drive.</echo> |
|
368 <hlm:unsubst drive="${build.drive}" failonerror="${failonerror}"/> |
|
369 </then> |
|
370 </if> |
|
371 <tstamp> |
|
372 <format property="old.prep.dir.timestamp" pattern="yyyyMMdd'_'HHmmss" /> |
|
373 </tstamp> |
|
374 <if> |
|
375 <not> |
|
376 <isset property="prep.build.dir.keep"/> |
|
377 </not> |
|
378 <then> |
|
379 <script language="jython" setbeans="false"> |
|
380 from java.io import * |
|
381 import time |
|
382 prep_build_dir_str = project.getProperty('prep.build.dir') |
|
383 prep_build_dir = File(prep_build_dir_str) |
|
384 print prep_build_dir |
|
385 if prep_build_dir.exists(): |
|
386 timestamp = time.strftime("%Y%m%d_%H%M%S", time.localtime(time.time())) |
|
387 renamed_prep_build_dir = File('%s.%s' % (prep_build_dir_str, timestamp)) |
|
388 print renamed_prep_build_dir |
|
389 result = prep_build_dir.renameTo(renamed_prep_build_dir) |
|
390 if result: |
|
391 print 'Dir rename successful.' |
|
392 else: |
|
393 print 'Dir rename failed!' |
|
394 |
|
395 raise Exception('Could not rename prep dir') |
|
396 </script> |
|
397 </then> |
|
398 </if> |
|
399 <!-- Create a new directory for the build and subst it to a drive. --> |
|
400 <mkdir dir="${prep.build.dir}" /> |
|
401 <exec osfamily="windows" executable="subst.exe" failonerror="false"> |
|
402 <arg value="${build.drive}" /> |
|
403 <arg value="${prep.build.dir}" /> |
|
404 </exec> |
|
405 <antcall target="backup-subst-drives"/> |
|
406 </else> |
|
407 </if> |
|
408 </target> |
|
409 |
|
410 <!-- To initialization prep-drive--> |
|
411 <target name="init-drive" depends="prep-drive"/> |
|
412 |
|
413 <!-- To initialization substituted drive--> |
|
414 <target name="restore-subst-drives"> |
|
415 <if> |
|
416 <available file="${cache.dir}/hlmsubsteddrives.bat" type="file"/> |
|
417 <then> |
|
418 <exec dir="${cache.dir}" executable="${cache.dir}/hlmsubsteddrives.bat" osfamily="windows" failonerror="false"/> |
|
419 </then> |
|
420 </if> |
|
421 </target> |
|
422 |
|
423 |
|
424 <!-- Creates several initial directories in a new build area. --> |
|
425 <target name="init-build-area" depends="check-env-build-drive"> |
|
426 <mkdir dir="${build.output.dir}" /> |
|
427 <mkdir dir="${build.log.dir}" /> |
|
428 <mkdir dir="${prep.log.dir}" /> |
|
429 <mkdir dir="${temp.build.dir}" /> |
|
430 <mkdir dir="${diamonds.build.output.dir}" /> |
|
431 </target> |
|
432 |
|
433 |
|
434 <!-- Basic initialization for a build, including starting the main ant_build log. |
|
435 It also copies the additional logs from the temp directory into the build area. --> |
|
436 <target name="init" depends="get-ccm-password"> |
|
437 <runtarget target="build-number"/> |
|
438 <runtarget target="init-build-area"/> |
|
439 <runtarget target="build-info"/> |
|
440 |
|
441 <echo>Copying temp logs from ${build.cache.log.dir} into the build area.</echo> |
|
442 <copy todir="${prep.log.dir}" verbose="true" failonerror="false"> |
|
443 <fileset dir="${build.cache.log.dir}"> |
|
444 <include name="*.log"/> |
|
445 <include name="*.xml"/> |
|
446 </fileset> |
|
447 </copy> |
|
448 |
|
449 </target> |
|
450 |
|
451 <!-- This target exists as a trigger for initiating the Diamonds logger. If |
|
452 it is not included in the build sequence, the build will not be logged to |
|
453 Diamonds. Also build.property.cache.file will be there contains all the diamonds related properties |
|
454 --> |
|
455 <target name="diamonds"> |
|
456 <mkdir dir="${diamonds.build.output.dir}" /> |
|
457 <var name="diamonds.build.url" value="http://${diamonds.host}:${diamonds.port}${diamonds.build.id}"/> |
|
458 <echoproperties destfile="${build.property.cache.file}"> |
|
459 <propertyset> |
|
460 <propertyref prefix="diamonds.build.url"/> |
|
461 <propertyref prefix="diamonds.host"/> |
|
462 <propertyref prefix="diamonds.port"/> |
|
463 <propertyref prefix="diamonds.build.id"/> |
|
464 </propertyset> |
|
465 </echoproperties> |
|
466 </target> |
|
467 |
|
468 <!-- Used to prep the build area, now only a placeholder target for the customer --> |
|
469 <target name="prep-copy" /> |
|
470 |
|
471 |
|
472 <condition property="run.ccm"> |
|
473 <and> |
|
474 <not> |
|
475 <equals arg1="${ccm.enabled}" arg2="false" casesensitive="true"/> |
|
476 </not> |
|
477 <isset property="ccm.enabled"/> |
|
478 </and> |
|
479 </condition> |
|
480 |
|
481 <!-- Wrapper target to call prep-work-area during the build. |
|
482 log will get recorded under the log directory. |
|
483 Property ccm.enabled has to be set to 'true' to enable that step! |
|
484 prep-work-area-check-errors is also run so it emits a signal in case of errors. |
|
485 --> |
|
486 <target name="do-prep-work-area" depends="find-files-pre"> |
|
487 <runtarget target="prep-work-area"/> |
|
488 <runtarget target="find-files-post"/> |
|
489 </target> |
|
490 |
|
491 |
|
492 <!-- Wrapper target to call start-remote-builds during the build. |
|
493 log will get recorded under the log directory. |
|
494 Property remote.builds.enabled has to be defined to enable that step! |
|
495 --> |
|
496 <target name="do-start-remote-builds" if="remote.builds.enabled"> |
|
497 <runtarget target="start-remote-builds"/> |
|
498 </target> |
|
499 |
|
500 |
|
501 <!-- check-env-prep has to be called after getting the delivery else it doesn't works for the first build. --> |
|
502 <target name="do-prep" depends="check-tool-dependencies,check-free-space,do-prep-work-area, |
|
503 do-start-remote-builds,check-env-prep,diamonds,create-bom,log-build-env,prep-copy, |
|
504 set-arm-version" /> |
|
505 |
|
506 <!-- Macro to notify user by email/sms --> |
|
507 <macrodef name="notifyMacro" uri="http://www.nokia.com/helium"> |
|
508 <attribute name="message"/> |
|
509 <sequential> |
|
510 <runtarget target="lookup-email" /> |
|
511 <tstamp> |
|
512 <format property="time.failure" pattern="yyyy-MM-dd_HH.mm.ss" /> |
|
513 </tstamp> |
|
514 <preset.mail tolist="${email.from}" subject="${env.COMPUTERNAME} prep stage problem!" message="@{message}" /> |
|
515 <!-- Get the first part of email address to use with SMS gateway --> |
|
516 <propertyregex property="email.from.name" input="${email.from}" regexp="(.*?)@" select="\1" /> |
|
517 <preset.mail tolist="${email.from.name}@${sms.server}" subject="" message="@{message}" /> |
|
518 </sequential> |
|
519 </macrodef> |
|
520 |
|
521 |
|
522 <!-- Fails the build if prep did not succeed. --> |
|
523 <target name="prep-fail"> |
|
524 <if> |
|
525 <available file="${build.log}"/> |
|
526 <then> |
|
527 <record name="${build.log}" action="stop" append="true"/> |
|
528 </then> |
|
529 </if> |
|
530 <hlm:metadatarecord database="${metadata.dbfile}"> |
|
531 <hlm:antmetadatainput> |
|
532 <fileset casesensitive="false" file="${build.log.dir}/${build.id}_main.ant.log" /> |
|
533 <metadatafilterset refid="filterset.ant.output" /> |
|
534 </hlm:antmetadatainput> |
|
535 </hlm:metadatarecord> |
|
536 <hlm:generateBuildStatus file="${build.id}_main.ant.log" /> |
|
537 <!-- Todo: metadata: insert assertions for metadata parsing here --> |
|
538 </target> |
|
539 |
|
540 <!-- Set properties for track full build event. --> |
|
541 <target name="set-fullbuild-properties"> |
|
542 <!-- Enables logging of the start and end of individual targets. |
|
543 @type string |
|
544 --> |
|
545 <property name="log.target" value="yes"/> |
|
546 <!-- Ensures the cleanup-all target is called when the build finishes. |
|
547 @type string |
|
548 --> |
|
549 <property name="call.cleanup" value="no"/> |
|
550 </target> |
|
551 |
|
552 <!-- Top-level target for preparing the build area. --> |
|
553 <target name="prep" depends="set-fullbuild-properties,init-drive,init"> |
|
554 <trycatch property="build.exception"> |
|
555 <try> |
|
556 <runtarget target="do-prep" /> |
|
557 </try> |
|
558 <catch> |
|
559 <echo message="Build has failed during prep: ${build.exception}" /> |
|
560 <runtarget target="prep-fail" /> |
|
561 <fail /> |
|
562 </catch> |
|
563 </trycatch> |
|
564 </target> |
|
565 |
|
566 |
|
567 <!-- Can be used to unsubst the drive . --> |
|
568 <target name="remove-drive"> |
|
569 <if> |
|
570 <os family="windows"/> |
|
571 <then> |
|
572 <hlm:unsubst drive="${build.drive}"/> |
|
573 </then> |
|
574 </if> |
|
575 </target> |
|
576 |
|
577 |
|
578 </project> |