Boost logo

Boost-Build :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-04-14 23:35:17


----- Original Message -----
From: "Rene Rivera" <grafik666_at_[hidden]>

> In trying to finish the V2 loading integration I've run into a snag
which
> seems to be a bug with the LOCALIZE option of IMPORT, but I'm not
sure.
>
> Is it a bug, or am I misunderstanding the behaviour?

The latter. If you just try to remember that I try to make all of my
builtin rules implement *minimal* functionality on which more
sophisticated behaviors can be built, all will make sense to you. When
you write "scope-2.test-2" you're actually looking up the symbol
"scope-2.test-2" in the global scope, not looking up "test-2" in
scope-2. The import (lowercase) rule uses IMPORT to bring the names into
the local target scope and also brings in the qualified names to the
global scope.

LOCALIZE has nothing to do with any of this: it controls whose module
variables the rule gets to access. Without LOCALIZE, the imported rule
accesses/defines variables in the module in which it was defined. With
LOCALIZE, it accesses/defines variables in the module into which it's
being imported.

Make sense?

-D

 


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