ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <hol...@yahoo.com>
Subject Re: Setting a Unix vs Windows switch
Date Tue, 22 May 2001 00:20:16 GMT
When referencing a property in the if/unless attribute, use just the
property name (ie., no ${...}).

Diane

--- Christopher Berry <christopher.berry@etrade.com> 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  --- christopher.berry@etrade.com  -- 512-323-9479
> 


=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

Mime
View raw message