ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject RE: RE : more than one unless/if in a target
Date Thu, 07 Aug 2003 10:33:28 GMT
> >
> >> Yeah, one of the many inconsistencies in ant.
> >> 
> >> <target name="foo" depends="can,have,commas" unless="cannot">
> >> </target>
> >
> >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.
> >
> >Stefan
> >
> 
> 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
> 


Maybe a complete new attribute <target condition=""/> where the condition
contains a query. A query contains of property names and reserved words
(AND OR NOT XOR).
Same could be on task level, but maybe there are already attributes with
that 
name ...


Jan

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message