Boost logo

Boost-Build :

From: Johan Nilsson (r.johan.nilsson_at_[hidden])
Date: 2008-04-09 02:16:51


Vladimir Prus wrote:
> On Sunday 06 April 2008 16:59:09 Roland Schwarz wrote:
>> Boost.Build is a great system to write platform independent
>> build rules.
>>
>> Once you have read through the manuals and "bjam --help" one
>> starts to write her own modules. Having read the advice
>> from the user guide: "If the extensions will be used on many
>> projects, users will thank you for a finishing touch."
>> I added a init rule, but got stuck about where to put this
>> now. The manual suggest to put it into the project dir.
>> This works fine, but fails if you want to use it for use
>> as a site-wide repository.
>>
>> However it is possible to put the following into
>> site-config.jam:
>>
>> boost-extension-dirs = /path/to/my/extensions ;
>>
>> modules.poke
>>> BOOST_BUILD_PATH
>>> [ modules.peek : BOOST_BUILD_PATH ] $(boost-extension-dirs) ;
>>
>> While this surely will work, it is non-obvious (at least for
>> me it was not) and looks a little hackish. So I propose
>>
>> 1) Addition of a add-extension-paths rule to build-system-jam:
>> --------------------------------------------------------------
>>
>> rule add-extension-path ( dirs * )
>> {
>> modules.poke
>> : BOOST_BUILD_PATH
>> : [ modules.peek : BOOST_BUILD_PATH ]
>> $(dirs)
>> ;
>> }
>
> I think this would be nice.

The idea is sound (I proposed something like this some year ago :-), but
perhaps the rule would belong in the "modules" module?

/ Johan


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