ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Devienne" <>
Subject Re: "Recursiveness" / property already used in a "generic" build...
Date Thu, 15 Jun 2006 18:18:44 GMT
> Just are you calling these sub project build.xml's from
> the parent?  Are you using <ant> task?  If so, probably want to do <ant
> inheritAll = "false".../>

Yes, it's a good point Scot.

I was using a different approach Greg. Instead of "parametring" the
generic build using a properties file, I was defining 2 generic
builds. One that does the work of building something (library.xml for
example, that would build one native lib using Ant-Contrib's <cc>),
and another called recurse.xml that defined dummy targets that simply
"forward" the targets to sub-builds, using <subant>.

In dirs where to recurse, I would define a build.xml that imports
recurse.xml and simply define the build <path>. Tiny, tiddy build.

In dirs where to build something, I'd do the work, usually just
defining a few things explicitly, like the "compile" target, and
inherit all other targets from the imported library.xml for example.

Recursing builds use <subant>, which defaults to inheritAll="false",
unlike <ant>. If I want to pass in a few explicit props, that's done
once and for all in recurse.xml (usually using a <propertyset>).

This setup emulates well enough the recursing nature of most
Makefile-based builds, and worked well for several large builds of
mine. You factor in the behavior in impored builds, and leave the
"parameterizing" data in the builds themselves.

This is my recommended approach to the recursing build idiom ;-) --DD

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

View raw message