ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Berry <christopher.be...@etrade.com>
Subject Setting a Unix vs Windows switch
Date Mon, 21 May 2001 23:45:31 GMT
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


Mime
View raw message