ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ken Wood <kw...@i2.com>
Subject Re: article: combining make and ant
Date Thu, 21 Mar 2002 14:32:17 GMT


stephan beal wrote:
> 
> On Thursday 21 March 2002 15:20 pm, Conor MacNeill wrote:
> > stephan beal wrote:
> > > Another example of this is the fact that ant will (annoyingly) run a
> > > target multiple times if it's in multiple depends="..." lines. Make does
> > > not do this - it recognizes that a given dependency was already run and
> > > doesn't run it again. My 'init' target gets run multiple times (hosing my
> > > output log, since <record action="start"/> gets called multiple times)
> > > unless i do something silly like this:
> > >
> > > <target name="init" unless="init.alreadydone">
> > >     <property name='init.alreadydone' value='true'/>
> > > ...
> > > </target>
> >
> > You are either use (overusing) antcall or passing in many targets on the
> > command line. Ant will "run" a target only once unless this is true.
> 
> i'm using antcall, yes, but i don't think i'm over-using it. i have the
> following setup:
> 
> <target name="main" depends="init">
>         <antcall target="cvsupdate"/>
>         <antcall target="dbclasses"/>
>         <antcall target="slabdbclasses"/>
>         <antcall target="compile"/>
>         <antcall target="maillog"/>
> </target>
> 

Why? I have the same 'kind' of thing, except:

<target name="main" depends="init,cvsupdate,dbclasses, slabdbclasses,compile,maillog" >
</target>

Then, everything that needs to run, runs, and only once. IMHO you are over-using
'antcall' in your example.

I only use 'antcall' for the equivalent of a re-usable subroutine, and I write
them so that they don't 'depend' on something else that will then  fire
multiple targets.

While you are right about a number of the differences between Ant and make (we use
both together to build a mixed C++/java application, so we too use both...), 
I don't think you've written all of your XML the 'Ant' way...

--
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