ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter reilly <>
Subject Re: Could Ant build scripts be compiled?
Date Wed, 26 Nov 2003 08:46:27 GMT
On Wednesday 26 November 2003 04:57, Jacob Kjome wrote:
> Hi Peter,
> At 06:43 PM 11/25/2003 +0000, you wrote:
> >   - use <macrodef> instead of <antcall>
> I think I've found a case where I can't replace my <antcall>'s with
> <macrodef>.  Currently, the target I am calling via <antcall> has
> dependencies.  If I use <macrodef> to make the call, how do I get the other
> targets to run.  Everything has to happen in the <macrodef>, and unless I
> use <if> <then> tasks within <macrodef>, I won't be able to convert
this to
> <macrodef>.

This is a good point.

In this case you are right that <macrodef> is not a drop-in replacement
for <antcall> using targets that depend on other targets.

> I'm not opposed to using <if> <then> tasks, but this isn't a native Ant
> solution.  The only way I can see this working is to have <macrodef>
> support target dependencies.  Thoughts?  Am I missing something?

The problem with <macrodef> supporting target dependencies is that
the <macrodef> is run in the same project as the user of the <macrodef>
whereas <antcall> sets up a new project and the target dependencies
are freshly made, also the dependant targets would run in the same project
as the user of the macrodef.

It is something to keep in mind however.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message