Boost logo

Boost :

Subject: Re: [boost] Bjam outside Boost tree
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-10-06 13:00:37


Jean-Louis Leroy wrote:
> After more hours on this I still cannot make it work.
> I have tried again from scratch. I have unpacked the 1.40 distro in
> \temp and built boost.filesystem from within the boost tree (it's the
> project I used as a template for rdb). It builds ok. Then I copied
> libs\filesystem to \temp and created an empty Jamroot and a
> boost-build.jam in its root dir, containing:
> boost-build C:/TEMP/boost_1_40_0/tools/build/v2 ;
> This is coherent with the post I found on the internet, with Steve's
> recommandations, and
> However when I try bjam from \temp\filesystem\build I get the message:
> rule boost-install unknown in module Jamfile</C:/TEMP/filesystem/build>
> I put my boost-build.jam at the top of the boost tree and tried again
> building from inside the tree with `bjam -d+5`. It built ok and I
> could see in the log that my boost-build.jam was picked:
> jambase.c:72:>> local boost-build-files =
> C:\TEMP\boost_1_40_0\boost-build.jam
> jambase.c:75:>> set .boost-build-file =
> C:\TEMP\boost_1_40_0\boost-build.jam
> it looks like the content is correct. Then I sought where the
> boost-install rule pops into existence. This seems to happen here:
> C:/TEMP/boost_1_40_0/tools/build/v2/kernel\modules.jam:170:>>>>|>>>>|>>>>|>>>>|>>>>
> local rules = using import project constant path-constant use-project
> build-project explicit glob glob-tree conditional option
> handle-static-runtime libraries-to-install tag make-unversioned-links
> boost-install
> Examining `modules.jam` suggests that a bunch of build rules are
> dynamically extracted from all the libs in the tree and boost-install
> is one of them.

boost-install is defined in the boost Jamroot. I had forgotten that
libraries with
separate source use boost-install. It isn't really used for anything.
I'm not sure
that it will work correctly outside the boost tree, so you can safely
define it
in your Jamroot to do nothing.

> So at this point my understanding is that there are two things going
> on: getting bjam to work - it seems to be dynamic in part, it locates
> and loads "a" build system ; Steve told me how to make that part work.
> The second thing is to use it to build a /boost lib/ with its
> dependencies (in my case the test harness) from elsewhere. In fact my
> initial post should have been entitled "Boost lib outside Boost tree",
> and not merely "Bjam outside...".
> Is this picture correct? Does any of the lib authors ever build from
> outside a boost tree?

In Christ,
Steven Watanabe

Boost list run by bdawes at, gregod at, cpdaniel at, john at