You'd probably be better have individual properties as flags for each macro.
So something like:
<condition property="flagA">
<equals arg1="${x} arg2="a"/>
</condition>
<condition property="flabB">
<equals arg1="${x} arg2="b"/>
</condition>
<condition property="flagC">
<equals arg1="${x} arg2="c"/>
</condition>
<target name="RunMacroA if="flagA">
<macroA/>
</target>
<target name="RunMacroB if="flagB">
<macroB/>
</target>
<target name="RunMacroC if="flagC">
<macroC/>
</target>
So you set individual properties depending on the value of ${x}. The
individual properties can then be used to determine whether particular
targets containing each macro are run.
On Tue, Mar 24, 2009 at 12:35 PM, Felix Dorner <[email protected]> wrote:
> Hi Ant users,
>
> I have three macros: a, b, c, and a property 'x'. Is there a way to execute
> the macro ${x}, i.e. a if ${x}=a, b if ${x}=b, c if ${x}=c, (fail otherwise)
> with ant core? Something like <macroExec macro="${x}"/>
>
> Thanks,
> Felix
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
--
"To be or not to be. That's not really a question." - Jean-Luc Godard