ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jay Walters <>
Subject RE: Feature question- expression in target if+unless
Date Wed, 13 Dec 2000 15:05:30 GMT
Thanks, just wanted to make sure I wasn't missing something obvious.

We'll just start bundling cpp or m4 with our product:-)  Just joking, really
I like XSLT!-)

Jay Walters

-----Original Message-----
From: Stefan Bodewig []
Sent: Wednesday, December 13, 2000 9:54 AM
Subject: Re: Feature question- expression in target if+unless

Jay Walters <> wrote:

> It appears to me that ANT supports only properties which are set or
> unset.

This is correct.

> What is the recommended way to handle something like a property with
> 3 values where the build process needs to run different sets of
> tasks, or targets, depending on the value of the property?

If property X can have values A, B, C

<property name="test.${X}" value="foo" />

will make

<target if="test.A">

the same as if="X holds value A".

The cleanest solution would be some type of preprocessor though.


View raw message