En lugar de depender, puede verificar una propiedad utilizando el atributo if. Vea el manual para más detalles.
Por ejemplo:
<target name="helloworld" if="test"/>
Nota esto sólo comprueba si la propiedad se establece (se puede utilizar unless
para comprobar si está definido).
Una alternativa, más compleja pero de gran alcance, el enfoque es utilizar una condición anidada en un objetivo Dependía:
<target name="helloworld" depends="myTarget.check" if="myTarget.run">
...
</target>
<target name="myTarget.check">
<condition property="test">
<and>
<available file="foo.txt"/>
<available file="bar.txt"/>
</and>
</condition>