Thanks very much Diane. You are a saint.
Cheers,
-- Chris
> -----Original Message-----
> From: Diane Holt [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 21, 2001 7:20 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Setting a Unix vs Windows switch
>
>
> When referencing a property in the if/unless attribute, use just the
> property name (ie., no ${...}).
>
> Diane
>
> --- Christopher Berry <[EMAIL PROTECTED]> wrote:
> > Greetings,
> >
> > The following build.xml -- running on a Windows 2000 box --
> prints out::
> >
> > Installing on a Windows 2000 machine
> > (is.Windows= ${is.Windows}) (is.Unix= true)
> > (isWindows 2000= true)
> >
> > Can anyone point to my error???
> > Thanks,
> > -- Chris
> >
> > =====================================
> > <property name="is${os.name}" value="true"/>
> >
> > <target name="set_windows1" depends="init" if="${isWindows 2000}" >
> > <property name="is.Windows" value="true" />
> > </target>
> > <target name="set_windows2" depends="set_windows1" if="${isWindows
> > NT}" >
> > <property name="is.Windows" value="true" />
> > </target>
> > <target name="set_windows3" depends="set_windows2" if="${isWindows
> > 98}" >
> > <property name="is.Windows" value="true" />
> > </target>
> > <target name="set_unix" depends="set_windows3"
> unless="${is.Windows}"
> > >
> > <property name="is.Unix" value="true" />
> > </target>
> >
> > <target name="print_os" depends="set_unix">
> > <echo>
> > Installing on a ${os.name} machine
> > (is.Windows= ${is.Windows}) (is.Unix= ${is.Unix})
> > (isWindows 2000= ${isWindows 2000})
> > </echo>
> > </target>
> >
> > Chris Berry --- [EMAIL PROTECTED] -- 512-323-9479
> >
>
>
> =====
> ([EMAIL PROTECTED])
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great prices
> http://auctions.yahoo.com/
>