I like #3 (but then, I would -- since that's how I thought it already worked :)
Diane --- Nico Seessle <[EMAIL PROTECTED]> wrote: > ----- Original Message ----- > From: "Diane Holt" <[EMAIL PROTECTED]> > To: <[email protected]> > Sent: Sunday, September 17, 2000 11:35 PM > Subject: Re: Using "if" in a target? > > > > So "if" just checks to see if a property exists, not whether it's > actually > > set to anything? And the fact that I pass a define for the p4client > > property, even though there's no value for it, makes that property > "exist" > > for ant? So, is there no way to test whether a property actually has a > > value? > > > > Should this be "fixed" in some way? > > The following could be done > 1. If -Dname= is passed to ant assume that the user don't want to set > this > property (may break build-files) > 2. Require the property specified for if=""/unless="" to contain one of > the > "boolean-values" "yes", "on" or "true" (this will break build-files, at > least mine :-) ) > 3. Require the property specified for if=""/unless="" to contain > anything > other than nothing (the empty string) (for if) and dont't just check > for > non-existence Or check for containing nothing or being non-existent (for > unless). (should not break so much; not mine and not ant's build-file). > If > you use the available-task which seems the most common way to me the > property is set to "true" if you don't specify somethng else so this > should > not be a problem. > > Nico > > > ===== ([EMAIL PROTECTED]) __________________________________________________ Do You Yahoo!? Yahoo! Mail - Free email you can access from anywhere! http://mail.yahoo.com/
