Boost logo

Boost-Build :

From: David Abrahams (dave_at_[hidden])
Date: 2006-07-26 10:20:16


Klaus Nowikow <e8827661_at_[hidden]> writes:

> Klaus Nowikow wrote:
>> Vladimir Prus wrote:
>>> On Friday 07 July 2006 17:21, Klaus Nowikow wrote:
>>>> I am trying to create a customized install rule - package.install
>>>> does not fit my needs. So I copied package.install and changed it
>>>> to what I need. The problem is that my rule does not work with
>>>> 'explicit' - it is called every time I perform a build.
>>> ...
> > [...]
>
> I think found the problem:
> My original install rule was like this:
>
> rule install ( name : root : requirements * )
> {
> stage.install $(name)-root : $(root) : $(requirements) ;
> alias $(name) : $(name)-root ;
> local c = [ project.current ] ;
> local project-module = [ $(c).project-module ] ;
> module $(project-module)
> {
> explicit $(name)-root ; # error
> # ^^^^ here is the problem
> }
> }
>
> When I change the line marked with # error to
>
> explicit $(1)-root ;
>
> the everything works as expected. Seems to be that the $(name)
> variable is out of scope there.

yes. You generally shouldn't be using the "module" language construct
unless you're writing very low-level jam code. It completely changes
name lookup.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

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