ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ylan Segal" <>
Subject RE: how do to an if statement?
Date Thu, 18 Oct 2001 01:34:04 GMT
you can use the if / unless attribute of a target.. 
For example:
<target name="help" if="">
	<echo message="Having fun yet?"/>
In this case, is set in a previous target. 

Sound good?

Ylan Segal

-- Failure is not an option, it comes bundled with your Microsoft product

> -----Original Message-----
> From: Warren Hedley [mailto:whedley@SDSC.EDU]
> Sent: Wednesday, October 17, 2001 7:21 PM
> To:
> Subject: how do to an if statement?
> Hi folks,
> I've been poring through the Ant documentation and have not noticed that
> some useful tasks set the the value of a property to true if a certain
> condition is met -- the one I'm interested in is <updtodate>. However,
> I can't figure out how to do anything with that value, once I have it.
> Clearly I'm missing some fundamental -- how do you do code an "if"
> statement based on the value of a property.
> To complete the example: I would like to execute some commands if a
> particular file is not up-to-date, where the process of bringing it
> up to date is not covered by the standard commands. I can check
> whether the file is up-to-date, but can't figure out how to only
> execute the desired commands if it isn't.
> Thanks in advance.
> -- 
> Warren Hedley

View raw message