ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@apache.org>
Subject Re: Two consequtive ifs
Date Fri, 29 Dec 2000 11:52:56 GMT
At 02:46  28/12/00 +0100, Stefan Schmitt wrote:
>From: "Ceki Gulcu" <cgu@urbanet.ch>
>Subject: Two consequtive ifs
>
>Hi
>I do not have a smart solution. It's only a quick hack.
>You can call your compile target from another target like the following
>sample
>
><target name="first" if="firstprop">
>    <antcall target="second"/>
></target>
>
><target name="second" if="secondprop">
>    .....
></target>
>
>
>The target named second is accessed if firstprop and secondprop are set.

Alternatively theres another hack ...

<target name="first" if="firstprop">
    <property name="secondprop" value="true"/>
</target>

<target name="second" if="secondprop" depends="first">
    .....
</target>

Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*


Mime
View raw message