ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: OS detection: am I missing the obvious?
Date Thu, 09 Nov 2000 08:34:00 GMT
Simeon Fitch <> wrote:

> The fact that there are "if" and "unless" attributes leads me to
> believe that there is at least tacit support for conditional target
> execution. The foot has already passed through the door; why not
> enter the room?

And I said "maybe allowing for if/unless has been too much already"
sometime 8-). 

Honestly I don't think we should drop the current support for
conditional target execution. My point is that we need some means to
stop adding complexity unless we want to let Ant slip down the road to
something closer to a scripting language.

> That being said, adding an equality operator is: 
> 1) powerful, 
> 2) simple to implement 
> 3) clearly understandable 
> 4) maintainable.

All true. And using unless instead of if would give us test for
inequality for free.

My personal stop gap is *now*, Diane and you would extend it to allow
check for equality, John Hall might not need this but wants a test for
OS (which is a specialization of Diane's request), others want a way
to specify a list of properties with , being an implicit && ...

If we'd allow for "test for equality" it wouldn't take very long for
at least two new operations, "set membership" and substring
searching. Use cases:

(1) I need a way to say any Unix: if="${} IN ('Linux', 'Solaris' ...)".

(2) I need a way to say any Windows: if="${}.contains('Windows')".

take my word for this.


View raw message