Here's a fragment from one of my files:
<!-- set a property whose name is based on what OS we are -->
<property name="${os.name}.install" value="dummy"/>
...
<!-- a set of install targets, that does host-dependent things -->
<target name="install"
depends="installprep,installwin,installlinux,installsol"/>
<target name="installprep">
<uptodate property="action.notrequired" ...>
...
</uptodate>
...
</target>
<target name="installwin"
if="Windows 2000.install"
unless="action.notrequired">
<!-- action steps -->
</target>
<target name="installlinux"
if="Linux.install"
unless="action.notrequired">
<!-- action steps -->
</target>
<target name="installsol"
if="SunOS.install"
unless="action.notrequired">
<!-- action steps -->
</target>
...
> -----Original Message-----
> From: T Master [mailto:[EMAIL PROTECTED]]
> Sent: Monday, August 20, 2001 2:12 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Setting a property based on the OS
>
>
> How would this then be used in a target?
>
> ----- Original Message -----
> From: "Stefan Bodewig" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, August 20, 2001 1:04 PM
> Subject: Re: Setting a property based on the OS
>
>
> > On Mon, 20 Aug 2001, Kurien Mathew <[EMAIL PROTECTED]> wrote:
> >
> > > Is it possible to set a property based on the OS?
> >
> > > redist
> > > |- win32
> > > |- mac
> > > |- linux
> > >
> >
> > Using 1.4beta
> >
> > <condition property="redistdir" value="redist/win32">
> > <os family="windows" />
> > </condition>
> > <condition property="redistdir" value="redist/mac">
> > <os family="mac" />
> > </condition>
> > <condition property="redistdir" value="redist/linux">
> > <equals arg1="${os.name}" arg2="Linux" />
> > </condition>
> >
> > Stefan
> >
>