ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran" <stev...@iseran.com>
Subject Re: RPM builds
Date Wed, 21 Nov 2001 07:22:35 GMT
----- Original Message -----
From: "Stefan Bodewig" <bodewig@apache.org>
To: <ant-dev@jakarta.apache.org>
Sent: Tuesday, November 20, 2001 8:13 AM
Subject: Re: RPM builds



> Wouldn't it be better to do something like
>
> <property environment="env" />
> <condition property="rpm.present">
>   <or>
>     <available file="rpm" filepath="${env.PATH}" />
>     <available file="rpm.exe" filepath="${env.PATH}" />
>   </or>
> </condition>
>
> which should check for rpm in PATH on most platforms.

Not on those platforms where PATH is really Path, which is Win2K and
successors. Try something like this, which probes for jikes being around and
sets build.compiler if it is in the
path and build.compiler has not been predefined. Tested on WinNt5.1 and
redhat 7.2:

  <target name="probe_for_jikes" unless="build.compiler">
    <property environment="env" />
    <condition property="build.compiler" value="jikes">
      <or>
        <available file="jikes"     filepath="${env.PATH}" />
        <available file="jikes.exe" filepath="${env.PATH}" />
        <available file="jikes.exe" filepath="${env.Path}" />
      </or>
    </condition>
  </target>



--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message