Boost logo

Boost-Build :

From: Johan Nilsson (r.johan.nilsson_at_[hidden])
Date: 2006-06-19 04:30:55


Daniel Schlyder wrote:
> Johan Nilsson wrote:
>> Maybe you could try something like this:
>>
>> ---
>> #
>> # project-root.jam
>> #
>> import modules ;
>>
>> path-constant my-bbv2-ext-path : path/to/my/ext ;
>> local boost-build-path = [ modules.peek : BOOST_BUILD_PATH ] ;
>> boost-build-path += $(my-bbv2-ext-path) ;
>> modules.poke : BOOST_BUILD_PATH : $(boost-build-path) ;
>> ---
>> #
>> # Jamfile.v2
>> #
>> import tag ;
>>
>> <tag>@tag.my-tag ;
>
> Thanks! That's very interesting, but I can't do this, cause I have a
> utility.jam that would clash with the built-in module of the same
> name.
> I could, of course, rename that module, but then I might just have to
> do
> it again in the future. Does BB have something akin to Python's
> packages?

Sorry, don't know Python.

Anyway, adding a common prefix to your modules might make sense as a crude
way of getting away without support for nested modules (which I think is
unavailable).

>
> Anyway, it doesn't solve the real issue, which is that I previously
> didn't have to qualify rule name passed to <tag>, but I now have to,
> if
> the rule is defined in another module

Can you try to import the rule into the global module?

IMPORT $(__name__) : my-tag : : my-global-tag-alias ;

project ... <tag>@my-global-tag-alias ... ;

// Johan


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