scope
The scope tag is used to explicitly introduce a scope. This is necessary in some cases to avoid property name clashes, particularly when properties are used to parameterise macros. See the documentation for the property element for more details on scoping.
Attributes
None.
Child Elements
Any.
Examples
A basic macro for a commonly-used command. Note that the mode property is defined differently in each recipe:
<macro name="build-command">
<command name="build">
<executable exe="build-it.sh" args="TARGET=${target}"/>
<artifact name="${target}" file="bin/${target}"/>
</command>
</macro>
<recipe name="two targets">
<scope>
<property name="target" value="t1"/>
<macro-ref macro="${build-command}"/>
</scope>
<scope>
<property name="target" value="t2"/>
<macro-ref macro="${build-command}"/>
</scope>
</recipe>