Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2005-06-16 02:04:01


On Sunday 12 June 2005 14:54, David Abrahams wrote:

> Okay, here's another. This rule is a common rule meant to be called
> from a Jamfile. Note the extensive use of backtrace and peeking into
> other modules in order to do simple things like access path variables
> and declare targets!
>
>
> rule build-local-docs ( )
> {
> import boostbook ;
> import docutils ;
> import path ;
> import modules ;
>
> # Where is the calling Jamfile located?
> local bt = [ BACKTRACE 2 ] ;
> local caller-dir = [ path.make $(bt[5]:D) ] ;
>
> # Find the sources and locate relative to caller-dir so that I can call
> # target rules on them.
> local misplaced-sources = [ path.glob $(caller-dir) : *.rst ] ;

Hmm... did you try something like:

local c = [ project.current ]
local project-module = [ $(c).project-module ]
module $(project-module)
{
# Declare everything you want.
}

That would be equivalent to putting the code in "{}" right in invoking
Jamfile.

- Volodya

-- 
Vladimir Prus
http://vladimir_prus.blogspot.com
Boost.Build V2: http://boost.org/boost-build2
 

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