Boost logo

Boost-Build :

From: Renaud Lepere (renaud.lepere_at_[hidden])
Date: 2007-05-22 11:00:16


> -----Message d'origine-----
> De : boost-build-bounces_at_[hidden]
> [mailto:boost-build-bounces_at_[hidden]]De la part de
> Johan Nilsson
> Envoyé : mardi 22 mai 2007 12:35
> À : boost-build_at_[hidden]
> Objet : Re: [Boost-build] moving rules from jamroot to somewhere else
>
>
> Renaud Lepere wrote:
> > I would like to put some specific rules written in my jamroot file
> > somewhere else. I have put them in a file utils.jam under utils
> > directory.
> >
> > and in jamroot i write
> > import utils/utils ;
> >
> > but than i need to write "utils/utils.rulename ; " to call the rule
> > in the jamroot file ; i would prefer something like
> "utils.rulename ;"
> > or
> > "rulename ;" . And more important i can not call the rule into my
> > other
> > jamfiles while defining the rules in jamroot was ok.
> >
> > What is the good way to factorize a set of rules ?
>
> This might help:
>
> http://thread.gmane.org/gmane.comp.lib.boost.build/13105/focus=13113
>
> / Johan
 
Thanks a lot, it help me a lot ...

I added in the jamroot

import modules ;
path-constant bbv2-ext-path : utils ;
local boost-build-path = [ modules.peek : BOOST_BUILD_PATH ] ;
boost-build-path += $(bbv2-ext-path) ;
modules.poke : BOOST_BUILD_PATH : $(boost-build-path) ;

import my-ext ;

and in my-ext.jam ;

rule toto ...
IMPORT $(__name__) : toto : : toto ;

I just have a problem for explicit, in my-lib (in my-ext.jam) rule explicit is
not found while it was ok in jamroot.

rule my-lib ( project : sources * )
{
        lib $(project) : $(sources) ;
        explict $(project) ;
}

Do you have any idea ?

Thanks,

Renaud


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