ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <hol...@yahoo.com>
Subject Re: File dependencies between targets
Date Thu, 12 Oct 2000 22:21:55 GMT
--- Morgan Fletcher <morgan.fletcher@provato.com> wrote:
> A file in target "A" changes. Target "B" depends on target "A". The
> developer runs 'ant B'. The "A" target gets rebuilt, because of the file
> change, but the "B" target does not. However, the file change in "A" was
> an interface change that affects "B".
> 
> I'm not exactly sure of what the solution should be, but I wonder how I
> could go about setting more aggressive dependency follow-through.
> 
> We're running ant 1.1.

If you wanted to, you could pick up Stefan's <uptodate> task, which allows
you to associate file dependencies, and set a specified property to true
if the target is newer than its source(s). Then you could "if" on that
property.  If you don't feel you can jump to the <uptodate> task, I
suppose you could try something weird with <available> (pretty sure that
was in 1.1), like <touch>'ing a .Bdone file as the last thing "B" does,
and <delete>'ing it as the last thing "A" does, then having "B" be if'd on
the property that <available> sets ("B" calls the target that does the
<available> -- if the .Bdone isn't available, you'll know "A" has done its
thing and "B" has yet to, so "B" now needs to as well.

Just off the top of my head, and completely untested.

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Get Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/

Mime
View raw message