Boost logo

Boost-Build :

From: Phillip Seaver (phil_at_[hidden])
Date: 2006-11-01 09:32:26


Jonathan P. Stucklen wrote:
[snip]
> While setting up the vendor library configuration for the system, I ran into a
> snag. I was trying to setup the jamfiles for each library outside of the
> library directory (so as not to pollute the libraries that I'm not supposed to
> modify). To do this, I stored the jamfiles for the vendor libraries in their
> own directories off of the source root (top/external/<LIBNAME>/Jamfile.v2). I
> then used project.act-as-jamfile within the library jamfile. Here's an example:
>
> ---SNIP---
> import project ;
> project.act-as-jamfile $(__name__) : $(VIGRA_LOCATION) ;
>
> cpp_sources = [ glob *.cpp ] ;
>
> lib vigra
> : $(cpp_sources)
> : <include>.
> :
> : <include>.
> ;
> ---SNIP---
>
> VIGRA_LOCATION I have defined in the Jamroot as a path-constant and points to
> the location where the actual library source code is located (in my test case,
> it's just in top/<LIBNAME>).
>
> I found that this worked, however the library jamfile did not inherit any
> attributes from the top level project (in Jamroot). Specifically, it drove me
> nuts because it ignored build-dir. :)
>

Out of curiosity, couldn't you just do:

lib vigra
    : [ glob $(VIGRA_LOCATION)/*.cpp ]
    : <include>$(VIGRA_LOCATION)
    :
    : <include>$(VIGRA_LOCATION)
;

...without having to call "project.act-as-jamfile"? Seems cleaner to me...

Phillip


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