|
Boost-Build : |
From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-12-08 05:45:15
Matt P. wrote:
> Thank you for your response.
>
> I did find, like you suggested, that the rule ProcessXML changes the
> variable because it uses the same variable name:
>
> rule ProcessXML
> {
> NotFile $(1) $(2) $(3)
> for gOUTPUT_XML in $(2)
> {
> ....
>
> Isn't gOUTPUT_XML declared local when it's part of that for loop, or do
> I have to (can I?) declare it local:
>
> for local gOUTPUT_XML in $(2)
Yes, you both can declared variables as local using precisely the syntax
you've used. Moveover, it's really good idea to always declare loop variables
local, and in fact -- all variables created insides rules.
- Volodya
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk