ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Ayers" <>
Subject RE: Conditional target execution based on prerequisite execution
Date Tue, 18 Feb 2003 17:02:12 GMT

> From: Timothy Wall []
> Sent: Tuesday, February 18, 2003 8:36 AM

> This raises the question (for me): What *does* affect whether the 
> target that specifies the dependency(s) gets executed if the 
> dependent 
> target(s) did not (need to) run?  Of course, that paragraph may not 
> mean anything at all...

	This is beyond my current skill level.  I suspect that it means something, just something
obscure.  Like all software of any complexity, Ant will have interesting twists and turns
that will be discovered as time goes on.

> If B is only run when one or more of its dependencies is run, 
> then the 
> problem seems to be those bootstrap targets which have no "depends"; 
> they need to be conditionally run to prevent the entire remainder of 
> the chain from always being run.

	Errr - I don't know if you realize it, but you are stating a basic build principle hre. 
Am I missing something?

> What is the canonical "Only create this directory if it 
> doesn't exist" 
> rule?

	There may not be a canonical form, but this will work:

<condition property="dir.makeme" >
	<available ${} >
<mkdir dir=${} />

	I have a suspicion, however, that just "<mkdir dir=${} />" will also work.


View raw message