That is very good news. So you are saying: 1) All "depends" are executed 2) "Unless" is evaluated 3) If "Unless" is false, the actual target is executed.
Correct? Thanks, Gili On Thu, 2 Dec 2004 10:45:12 -0800 (PST), Matt Benson wrote: >--- Gili <[EMAIL PROTECTED]> wrote: >> >> Correct, except that if you read the Ant >> documentation it says >> that "depends" is not executed before "unless". It >> says that "depends" >> simply declares the order of execution if the >> dependencies if the >> target is being executed (i.e. past the "unless" >> stage). At least, >> that's my interpretation. Am I wrong? > >Alas, you are indeed wrong. ;) The manual goes on to >say: ><quote> >Important: the if and unless attributes only enable or >disable the target to which they are attached. They do >not control whether or not targets that a conditional >target depends upon get executed. In fact, they do not >even get evaluated until the target is about to be >executed, and all its predecessors have already run. ></quote> > >Conditional execution in pure Ant has historically and >still does rely largely on "execute on one or more >targets (depends), THEN check whether some property is >set (if/unless)." > >HTH, >-Matt > >> >> Gili >> >> On Thu, 02 Dec 2004 17:24:22 +0100, Stefan Bodewig >> wrote: >> >> >On Thu, 02 Dec 2004, Gili <[EMAIL PROTECTED]> >> wrote: >> > >> >> Ok, that I understand but there is the further >> problem that >> >> I need the <uptodate> to execute before target B >> but after >> >> target A. Adding it to the "depends" listing of >> B will not >> >> help because as the docs specify "depends" is >> only invoked >> >> if unless is false and in my case I want the >> <uptodate> to >> >> be invoked *before* evaluating ódependsó. >> > >> >Unless I'm misunderstanding your requirements, you >> want >> > >> ><target name="check-A"> >> > <uptodate property="A.uptodate" .../> >> ></target> >> ><target name="A" depends="check-A" >> unless="A.uptodate"> >> > ... >> ></target> >> ><target name="check-B" depends="A"> >> > <uptodate property="B.uptodate" .../> >> ></target> >> ><target name="B" depends="check-B" >> unless="B.uptodate"> >> > ... >> ></target> >> > >> >Stefan >> > >> >>--------------------------------------------------------------------- >> >To unsubscribe, e-mail: >> [EMAIL PROTECTED] >> >For additional commands, e-mail: >> [EMAIL PROTECTED] >> > >> > >> >> > > > > >__________________________________ >Do you Yahoo!? >Read only the mail you want - Yahoo! Mail SpamGuard. >http://promotions.yahoo.com/new_mail > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > >