Ok, I think I figured this out myself. I can replace all antcall's
with macrodef's like the following (assumes antcontrib installed):
----------------------------------------
..
<antcall target="doTask" />
..
<target name="doTask" if="WINDOWS">
..
</target>
..
----- would translate to --------
..
<doTask platform="WINDOWS" />
..
<macrodef name="doTask">
<attribute name="platform" />
<sequential>
<if>
<isset property="@{platform}" />
<then>
..
</then>
</if>
</sequential>
</macrodef>
--------------------------------------
similarly, UNLESS would be accomplished the following way:
--------------------------------------
..
<target name="doTask" if="WINDOWS" unless="fileExistsAlready">
..
--changes to--
..
<doTask platform="WINDOWS" fileExistsAlready="fileExistsBoolean" />
..
<macrodef name="doTask">
<attribute name="platform" />
<attribute name="fileExistsAlready" />
<sequential>
<if>
<and>
<isset property="@{platform}" />
<not>
<isset property="@{fileExistsAlready}" />
</not>
</and>
<then>
..
</then>
</if>
</sequential>
</macrodef>
Chad
On 7/12/05, Chad Armstrong <[EMAIL PROTECTED]> wrote:
> Hello,
> I've gotten some help from this list in setting up antcontrib's
> RemoteAnt task, and have it mostly working (for which I am greatly
> indebted.) Now, however, I'm up against another issue.
>
> I have a build script on an XP box that kicks off (using RemoteAnt)
> a build file on a Linux box. But the Linux build file script (the
> 'subprocess' of the Windows build script) fails whenever it hits an
> [antcall] tag.
>
> Is there some limitation there that I don't know about? I was
> thinking of replacing the [antcall] tags with [macrodef], but the
> current [antcall] targets are conditional on other variables defined
> in my script, and [macrodefs] don't take the [if] attribute.
>
> thanks for any help
> Chad
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]