Boost logo

Boost-Build :

Subject: Re: [Boost-build] Boost.build
From: Darren Garvey (lists.drrngrvy_at_[hidden])
Date: 2011-07-16 19:04:55


Hi Paul,

On 16 July 2011 14:36, Paul A. Bristow <pbristow_at_[hidden]> wrote:

> Getting started says
>
> "
> 5.3.1 Install Boost.Build
>
> Boost.Build is a text-based system for developing, testing, and installing
> software. First, you'll
> need to build and install it. To do this:
>
> Go to the directory tools\build\v2\.
> Run bootstrap.bat
> Run b2 install --prefix=PREFIX where PREFIX is the directory where you
> want Boost.Build to be
> installed
> Add PREFIX\bin to your PATH environment variable.
> "
>
> I've done steps one and two (though I don't know what step two does),
>

Step 2 (ie. run bootstrap.bat) builds bjam, and the apparently identical
"b2.exe".

but I don't understand the instructions for "Run b2 install ..."

> I've got a shiny new b2.exe (and a bjam.exe that looks the same) in my
> I:\boost-trunk\tools\build\v2
>
> Where should I chose for PREFIX, and why?
>

PREFIX is essentially the same as the --prefix used in configure scripts.
Nothing new there. I might be missing what the confusion is here, except for
the fact that "b2" seems to have unexpectedly usurped "bjam" (although both
are created). Of course, a mention that --prefix is optional would be
useful.

> Do I really need to do anything other than add
> I:\boost-trunk\tools\build\v2 to my path?
>
> Are these sensible? (And/Or useful?)
>
> C:\Users\Paul>set boost
> BOOST=i:/boost-trunk
> BOOST_BUILD=I:\boost-trunk\tools\build\v2\build
> BOOST_BUILD_PATH=i:/boost-trunk/tools/build/v2
> BOOST_ROOT=I:\boost-trunk
> BOOST_SANDBOX=i:\boost-sandbox
> BOOST_TRUNK=i:\boost-trunk
>

If you have BOOST_ROOT set then that should be enough to build the whole of
boost. The only other of those env variables I recognise is
BOOST_BUILD_PATH, which usually defaults to "$BOOST_ROOT/tools/build/v2", so
in this case is superfluous. I'd recommend not adding $BOOST_BUILD_PATH
(whatever it is) to your build path, because it might just get in the way of
per-project Boost.Build versioning should you have the need (honestly, it's
not unheard of). I have found adding a boost-build.jam in the root of your
project directory that points to the build directory more predictable.

> PS I don't feel I've been told about b2 versus bjam?
>

I just noticed this today too. I'm not sure what the rationale is myself,
nor can I find anything on the boost website (or Boost.Build release notes -
assuming the 2 is a reference to BBv2) about this. It's a pity that bjam is
now competing with the stealth bomber and basic vitamins in web searches. :)

Cheers,
Darren



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