You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Jose Alberto Fernandez <ja...@cellectivity.com> on 2004/05/26 17:37:15 UTC

RE: completing the macrodef language

I think we are almost right there but, as anyone that
has used a macro languange, I think we are missing
the well known "ifdef" directive of most macro languajes.

This by the way is what others have already asked for.

Noticed that you cannot do this with a regular task, instead it needs
to be process by "macrodef" itself, so it has access to its metadata.

<macrodef name="a">
  <element name="foo"/>
  <sequential>
    <javac ...../>
    <ifdef element="foo">
      <javac ...>
        <foo/>
      </javac>
    <ifdef>
    <ifndef element="foo">
      <echo message="What? no foo :-("/>
    </ifndef>
  </sequential>
</macrodef>

That would give a more round functionality.

Jose Alberto

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: completing the macrodef language

Posted by Peter Reilly <pe...@corvil.com>.
Sounds like a neat idea.
I will put this on my in-tray list.

Cheers, Peter
Jose Alberto Fernandez wrote:

>I think we are almost right there but, as anyone that
>has used a macro languange, I think we are missing
>the well known "ifdef" directive of most macro languajes.
>
>This by the way is what others have already asked for.
>
>Noticed that you cannot do this with a regular task, instead it needs
>to be process by "macrodef" itself, so it has access to its metadata.
>
><macrodef name="a">
>  <element name="foo"/>
>  <sequential>
>    <javac ...../>
>    <ifdef element="foo">
>      <javac ...>
>        <foo/>
>      </javac>
>    <ifdef>
>    <ifndef element="foo">
>      <echo message="What? no foo :-("/>
>    </ifndef>
>  </sequential>
></macrodef>
>
>That would give a more round functionality.
>
>Jose Alberto
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
>For additional commands, e-mail: dev-help@ant.apache.org
>
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org