----- Original Message -----
From: "Stefan Bodewig" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
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:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>