PDA

View Full Version : how do I set macro parameter default values?


epu
08-31-2005, 12:15 PM
Hey guys,

Trying to set a macro value with a parameter and give the parameter a useful default value.

So far, my parameter looks like

<macro>
<name>LATEST_LABEL</name>
<description>the Tools_*_LATEST label for this build</description>
<parameters>PROJECT</parameters>
<value>Tools_PROJECT_LATEST</value>
</macro>

and now I want parameter PROJECT to default to some useful value, like the PROJROOT macro. How can I do this?

Best regards,
-e

kinook
08-31-2005, 04:09 PM
There isn't any provision for defining a default value for a macro parameter. One alternative would be to define two project macros, i.e.,

LATEST_LABEL = Tools_%PROJECT%_LATEST
PROJECT = %PROJROOT%

the value of PROJROOT will be the default, then override PROJECT with a temporary macro to use something other than the default.

epu
08-31-2005, 05:00 PM
thanks for the quick reply. that's a good work-around.
-e