>> <target name="checkprops">
>> <condition property="propfileexists">
>> <available file="path/to/your/propsfile"/>
>> </condition>
>> ...
>> </target>
>>
>>
>> <target name="foobar" depends="checkprops" unless="propfileexists">
>> <my.rapc/>
>> <target>
>>
>> <target name="foobaz" depends="checkprops" if="propfileexists">
>> <my.rapc>
>> <entry file="entryGUI.properties" />
>> </my.rapc>
>> <target>
>>
>>
>> or check the condition with antcontrib if/else in one target
>>
>> <target ....
>> <if>
>> <available file="path/to/your/propsfile"/>
>> <then>
>> <my.rapc>
>> <entry file="entryGUI.properties" />
>> </my.rapc>
>> </then>
>> <else>
>> <my.rapc/>
>> </else>
>> </if>
>> </target
I would use the ac:if inside the makro.
<macrodef name="my.rapc">
<attribute name="entryfile" default="--not-available-file--"/>
<attribute name="output" default="${cod.name}"/>
<attribute name="srcdir" default="${src.dir}"/>
<attribute name="destdir" default="${build.dir}"/>
<attribute name="jdp" default="project.properties"/>
<element name="inside-rapc" implicit="true"/>
<sequential>
<ac:if>
<available file="@{propfile}"/>
<then>
<rapc output="@{output}" srcdir="@{srcdir}"
destdir="@{destdir}">
<jdp file="@{jdp}">
<entry file="@{entryfile}" />
</jdp>
<inside-rapc/>
</rapc>
</then>
<then>
<rapc output="${cod.name}" srcdir="${src.dir}"
destdir="${build.dir}">
<jdp file="project.properties"/>
<inside-rapc/>
</rapc>
</then>
</ac:if>
</sequential>
</macrodef>
<my.rapc/>
<my.rapc entryfile="entryGUI.properties"/>
<my.rapc outdir="other-outdir"/>
<my.rapc>
<snip/>
<snip/>
<snip/>
</my.rapc>
Jan
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]