Return-Path: Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 5765 invoked from network); 9 Nov 2000 08:34:03 -0000 Received: from public.ndh.net (HELO public.ndh.com) (195.94.90.21) by locus.apache.org with SMTP; 9 Nov 2000 08:34:03 -0000 Received: from bodewig.bost.de ([195.227.98.11]) by public.ndh.com (8.9.3/8.8.0) with ESMTP id JAA00284 for ; Thu, 9 Nov 2000 09:34:00 +0100 (MET) Received: (from bodewig@localhost) by bodewig.bost.de (8.9.3/8.9.3) id JAA05946; Thu, 9 Nov 2000 09:34:01 +0100 X-Authentication-Warning: bodewig.bost.de: bodewig set sender to bodewig@bost.de using -f To: ant-dev@jakarta.apache.org Subject: Re: OS detection: am I missing the obvious? References: <20001109011235.8617.qmail@web2301.mail.yahoo.com> From: Stefan Bodewig Date: 09 Nov 2000 09:34:00 +0100 In-Reply-To: Simeon Fitch's message of "Wed, 8 Nov 2000 17:12:35 -0800 (PST)" Message-ID: Lines: 40 User-Agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N 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="${os.name} IN ('Linux', 'Solaris' ...)". (2) I need a way to say any Windows: if="${os.name}.contains('Windows')". take my word for this. Stefan