ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rebhan, Gilbert" <Gilbert.Reb...@huk-coburg.de>
Subject RE: <target>s unless/if: strangeness in default behaviour (imho) (ant 1.6.5)
Date Mon, 31 Aug 2009 11:19:53 GMT
 


-----Original Message-----
From: Gilles Scokart [mailto:gscokart@gmail.com] 
Sent: Monday, August 31, 2009 1:00 PM
To: Ant Users List
Subject: Re: <target>s unless/if: strangeness in default behaviour (imho) (ant 1.6.5)

/*
2009/8/31 Francis GALIEGUE <fge@one2team.com>

> Which means that the dependencies of a target are executed before even
> any if="" or unless="" attributes are taken into account... This is
> rather counterintuitive to my eyes. Is this really the expected
> behaviour or is this a bug?


This is indeed as designed, and it is pretty usefull because you can set the
property p in t1 or t2.  This pattern is quiet often used.

Gilles Scokart
*/

f.e. =

<target name="check_state">
  <condition property="${mname}.done">
    <available file="${ant.working.dir}/${mname}_script.params"/>
  </condition>
</target>

<target name="build" depends="check_state" unless="${mname}.done">
...


Regards, Gilbert

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message