Dashboard > Pulse v2.0 > ... > pulse Files > scope
  Pulse v2.0 Log In | Sign Up   View a printable version of the current page.  
  scope
Added by Jason Sankey, last edited by Jason Sankey on Nov 18, 2008  (view change)
Labels: 
(None)

Pulse Manual Index

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>

Zutubi wiki is Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.2.10 Build:#528 Nov 29, 2006) - Bug/feature request - Contact Administrators