Boost logo

Boost-Build :

From: Roland Schwarz (roland.schwarz_at_[hidden])
Date: 2006-07-17 06:55:10


I have already reported, that the path-global does not work when used
from external projects.

Since bbv1 is almost about to be retired my fix might not be of too much
interest. But since I found a fix I post it here, in case anyone else
might need it.

The fix is as noninvasive as possible and will only be triggered when
referring to external projects. This way the build of the boost library
is not affected in any way.

Basically it will allow to put
path-global MYPATH : ../../foo/bar
variables into Jamrules files of external projects. More important,
however is that the construct
path-global BOOST_ROOT : ../../boost
will correctly work when put in the Jamrules of an external project.

The fix modifies the code path for external projects in the project rule
within allyourbase.jam

rule project ( name : location ? )
{
     if ! $(location)
     {
         gPROJECT($(name)) = $(gPROJECT($(PROJECT))) ;
         PROJECT($(gPROJECT($(name)))) = $(name) ;
         PROJECT = $(name) ;
     }
     else
     {
         gPROJECT($(name)) = [ root-paths $(location) :
             [ root-paths $($(gTOP)) : [ PWD ] ] ] ;
# fix starts here
         local val ;
         for val in $(gPATH_GLOBALS) {
         gPATH_GLOBAL_VALUE($(val)) =
             [ root-paths $(gPATH_GLOBAL_VALUE($(val))) :
                 [ root-paths $($(gTOP)) : [ PWD ] ]
             ] ;
         }
# fix ends here
         local [ protect-subproject ] ;
         enter-subproject @$(name) ;

     }
}

Best regards,
Roland


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