On Sat, 25 May 2002 01:12, Dominique Devienne wrote:
> Let me understand... I could do:
>
> <target name="a"
> depends="b?, c"
> if="b-property">
> <javac ... />
> <depends target="d" />
> <copy ... />
> <depends target="e" />
> </target>
>
> ... and the order of execution would be:
>
> 1) target b?
> 2) target c
>
> and either:
>
> 3) nothing else (if b-property *not* set)
>
> or
>
> 3) target a (if b-property *is* set)
> 3.a) task <javac>
> 3.b) target d
> 3.c) task <copy>
> 3.d) target e
correct.
> So that would be like an <antcall> without the drawbacks of <antcall>
> (slow, reparsing, stuff not propagating back up, etc...). A method call
> basically!?!?!
Not really. The one difference is that it is a dependency and thus will not be
evaluated multiple times. The above could be written as
<target name="t1" if="b">
<javac ... />
</target>
<target name="d1" depends="t1,d" if="b">
</target>
<target name="t2" depends="d1" if="b">
<copy ... />
</target>
<target name="d2" depends="t2,e" if="b">
</target>
<target name="a"
depends="b?, c,d2">
</target>
It is just a lot harder to understand/comprehend ;)
--
Cheers,
Peter Donald
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>