ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Don Schaefer" <don_schae...@xelus.com>
Subject "if" and "depends"
Date Fri, 25 May 2001 19:51:29 GMT
Folks,

It appears to me that the "depends" targets are evaluated/executed
regardless of the"if" test.  Is this correct or is this a case of pilot
error?  If this is the expected behavior, thats okay, I just wanted to
make sure.

thanks,
don.

Below is a sample.

<project name="test" default="build" basedir=".">
    <target name="init"><echo message="ran init"/></target>
    <target name="prepare" depends="init"><echo message="ran
prepare"/></target>
    <target name="build" if="dont.flag" depends="prepare" />
</project>

Here is the output:

G:\src>ant -buildfile test.xml build
Buildfile: test.xml

init:
     [echo] ran init

prepare:
     [echo] ran prepare

build:

BUILD SUCCESSFUL

Total time: 1 second


Mime
View raw message