ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Vogel <pvo...@arsin.com>
Subject RE: resursive ant build: recommendation?
Date Sat, 09 Jun 2001 05:55:59 GMT
> -----Original Message-----
> From: Suu Quan [mailto:squan@wwc.com]
> Sent: Friday, June 08, 2001 9:28 AM
> To: ANT user group
> Subject: resursive ant build: recommendation?
> 
> 
> I am solliciting recommendation from this group on whether recursive
> build.xml files is a recommended pattern.
> 
> In make, it is a common practice to build a makefile for each
> package/subpackage/component. Then at the upper level, you invoke the
> sub-level makefiles.

It's a common practice, but not a good idea.  Check this out:

www.pcug.org.au/~millerp/rmch/recu-make-cons-harm.html 

In fact, many of the make performance issues discussed on this list
can be directly attributed to recursive make structures.  It takes a
little while to wrap one's head around the ideas discussed by Peter,
but its well worth it.

> 
> For a not-so-clean design, compilation dependencies force the 
> build system
> to first create a dependency list, usually creating makefiles 
> dynamically,
> then executing them in a known order. This occupies a good 
> 20-40% of the
> build time.
> 
> With Ant and Javac, it seems that I can get away with one 
> toplevel build
> file and skip that intermediate step of finding dependencies.
> Is this the recommendation for Java type of builds?

Yes.  However, there are cases were a certain amount of recursion
makes sense.  For example, I'm working a project right now where
there are basically 4 almost completely independent components (basically
a lot of glue) that tie several other systems together.  For the 
convenience of the developers in each project, there is an ant file
that builds that component independently of the others.  My system 
integration project build essentially iterates across those individual
component builds.

> 
> The above is possible, I think, due to capability of javac to resolve
> dependencies. (correct me  please if I'm wrong, even slightly)
> What about other languages: C, C++ ...

Check out cons: http://www.dsmit.com/cons

-Peter
---
Peter A. Vogel
Manager, Configuration Management
Arsin Corporation, Professional Services 
http://www.arsin.com  
 

Mime
View raw message