I'd like to write a macrodef that depends on the property being set in another macrodef, such as this, which doesn't work... (macrodef doesn't support depends and unless attributes) Anyway to do this?
<project name="mac">
<property name="antlr.version" value="3.2"/>
<macrodef name="check">
<attribute name="dest"/>
<attribute name="name"/>
<attribute name="version"/>
<sequential>
<available file="@{dest}/@{name}-@{version}.jar" property="@{name}-exists"/>
</sequential>
</macrodef>
<macrodef name="pull" depends="check" unless="@{name}-exists">
<attribute name="url"/>
<attribute name="dest"/>
<attribute name="name"/>
<attribute name="version"/>
<sequential>
<get src="@{url}" dest="@{dest}/@{name}-@{version}" verbose="true" ignoreerrors="true" unless="@{name}-exists"/>
</sequential>
</macrodef>
<target name="pullall">
<pull url="http://repo1.maven.org/maven2/org/antlr/antlr/${antlr.version}/antlr-${antlr.version}.jar" dest="." name="antlr" version="${antlr.version}"/>
</target>
This seems to work: