ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Hardy <>
Subject Re: RE : more than one unless/if in a target
Date Thu, 07 Aug 2003 10:31:21 GMT
I think that the conceptual similarity between depends and (if or 
unless) is misleading.

depends is a natural switch for a build process, i.e. one task depends 
on another task being executed first.

if and unless are nice-to-haves and I use them myself. But making a task 
dependent on something else by using if and unless means that the user 
can specify task dependencies in a non-purist and ultimately messy way 
that could easily lead to splurge and creep and ant becoming a monster.

Just my 2cents. :)

Emmanuel FELLER wrote:
>>-----Message d'origine-----
>>De : Stefan Bodewig [] 
>>Envoyé : jeudi 7 août 2003 11:36
>>À :
>>Objet : Re: more than one unless/if in a target
>>On Wed, 06 Aug 2003, Mike Castle <> wrote:
>>>Yeah, one of the many inconsistencies in ant.
>>><target name="foo" depends="can,have,commas" unless="cannot">
>>would unless="a,b" mean "a or b" or "a and b" would it be the same
>>boolean operator for if="a,b"?
>>just one of the reasons that the inconsistency exists.
> I think it should be an "and" operator as it is for the depends list.
> <target name="foo" depends="can,have,commas" unless="a,b">
> In this way the target is executed after "can AND have AND comma"
> targets so it should be executed only if "(a AND b) are not set".
> But unless and if should be used at a same time to compose logic
> expression :
> Unless="a,b" if="c,d" : (a and b are not set) and (c and d are set).
> Emmanuel
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message