Dashboard > Pulse v1.2 > ... > pulse Files > scope
  Pulse v1.2 Log In | Sign Up   View a printable version of the current page.  
  scope
Added by Jason Sankey, last edited by Jason Sankey on Sep 14, 2007
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