ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Murray, Mike" <...@ptc.com>
Subject RE: Macrodef and If
Date Tue, 08 Nov 2011 16:10:52 GMT
Assuming no use of AntContrib, you can pass the name of a property to the Macrodef, which it
would set.  This property could then be used in an Ant condition.  I'd give in and use AntContrib
though, since it gives you an <if> task.


-----Original Message-----
From: Steve Amerige [mailto:Steve.Amerige@sas.com] 
Sent: Tuesday, November 08, 2011 9:46 AM
To: Ant Users List
Subject: Macrodef and If

I'd like to do something like:

    <if>
    <mymacrodef/>
    <then>
         ...
    </then>
    </if>

    <macrodef name="mymacrodef">
    ...
    </macrodef>


Within the macrodef, there would be places it would return true and other places it returns
false.  I want the solution to be wholly 
in Ant (no Java, Groovy, external file use, etc.).

Is it possible?  If so, can you show an example of how the mymacrodef would be coded?

Thanks!
Steve Amerige
SAS Institute, Deployment Software Development
Mime
View raw message