Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@jakarta.apache.org Received: (qmail 88852 invoked by uid 500); 20 Aug 2001 21:12:03 -0000 Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: ant-user@jakarta.apache.org Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 88839 invoked from network); 20 Aug 2001 21:12:03 -0000 Message-ID: From: Shankar Unni To: "'ant-user@jakarta.apache.org'" Cc: 'T Master' Subject: RE: Setting a property based on the OS Date: Mon, 20 Aug 2001 14:08:33 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C129BB.31F56AF8" X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C129BB.31F56AF8 Content-Type: text/plain; charset="iso-8859-1" Here's a fragment from one of my files: ... ... ... ... > -----Original Message----- > From: T Master [mailto:tmaster@iknowledgeinc.com] > Sent: Monday, August 20, 2001 2:12 PM > To: ant-user@jakarta.apache.org > Subject: Re: Setting a property based on the OS > > > How would this then be used in a target? > > ----- Original Message ----- > From: "Stefan Bodewig" > To: > Sent: Monday, August 20, 2001 1:04 PM > Subject: Re: Setting a property based on the OS > > > > On Mon, 20 Aug 2001, Kurien Mathew wrote: > > > > > Is it possible to set a property based on the OS? > > > > > redist > > > |- win32 > > > |- mac > > > |- linux > > > > > > > Using 1.4beta > > > > > > > > > > > > > > > > > > > > > > > > Stefan > > > ------_=_NextPart_001_01C129BB.31F56AF8 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable RE: Setting a property based on the OS

Here's a fragment from one of my files:

  <!-- set a property whose name is based on = what OS we are -->
  <property = name=3D"${os.name}.install" = value=3D"dummy"/>

  ...

  <!-- a set of install targets, that does = host-dependent things -->
  <target name=3D"install"
          = depends=3D"installprep,installwin,installlinux,installsol"/>= ;

  <target = name=3D"installprep">
     <uptodate = property=3D"action.notrequired" ...>
        = ...
     </uptodate>
     ...
  </target>
  <target name=3D"installwin" =
          = if=3D"Windows 2000.install"
          = unless=3D"action.notrequired">
     <!-- action steps = -->
  </target>
  <target name=3D"installlinux" =
          = if=3D"Linux.install"
          = unless=3D"action.notrequired">
     <!-- action steps = -->
  </target>
  <target name=3D"installsol" =
          = if=3D"SunOS.install"
          = unless=3D"action.notrequired">
     <!-- action steps = -->
  </target>

  ...

> -----Original Message-----
> From: T Master [mailto:tmaster@iknowledgeinc.c= om]
> Sent: Monday, August 20, 2001 2:12 PM
> To: ant-user@jakarta.apache.org
> Subject: Re: Setting a property based on the = OS
>
>
> How would this then be used in a target?
>
> ----- Original Message -----
> From: "Stefan Bodewig" = <bodewig@apache.org>
> To: <ant-user@jakarta.apache.org>
> Sent: Monday, August 20, 2001 1:04 PM
> Subject: Re: Setting a property based on the = OS
>
>
> > On Mon, 20 Aug 2001, Kurien Mathew = <kurien@envivio.com> wrote:
> >
> > > Is it possible to set a property = based on the OS?
> >
> > > redist
> > >  |- win32
> > >  |- mac
> > >  |- linux
> > >
> >
> > Using 1.4beta
> >
> > <condition = property=3D"redistdir" = value=3D"redist/win32">
> >   <os = family=3D"windows" />
> > </condition>
> > <condition = property=3D"redistdir" = value=3D"redist/mac">
> >   <os = family=3D"mac" />
> > </condition>
> > <condition = property=3D"redistdir" = value=3D"redist/linux">
> >   <equals = arg1=3D"${os.name}" arg2=3D"Linux" />
> > </condition>
> >
> > Stefan
> >
>

------_=_NextPart_001_01C129BB.31F56AF8--