Boost logo

Boost-Build :

Subject: Re: [Boost-build] Boost.Build newbie
From: Vladimir Prus (ghost_at_[hidden])
Date: 2008-12-03 10:53:34


On Wednesday 03 December 2008 17:56:12 frederic.bron_at_[hidden] wrote:
>
> > frederic.bron_at_[hidden] wrote:
> >
> > > I have read the documentation of boost.build on boost.org and I
> > have a few questions:
> >
> > > 1.) I do not understand what's more in boost.build compared to
> > bjam; I see no reference to
> > > something else than bjam in boost.build doc.
> >
> > What "reference" do you mean? Pretty much everything documented in
> > Boost.Build documentation
> > is a Boost.Build feature.
>
> By reference I mean is there anything else than bjam in
> boost.build? Reading the doc, it seems to me that bjam is the
> only thing I need for what's called "boost.build". But there is a specific
> documentation for boost.build and boost.jam. I am confused with that.

Hi Frederic,

I think this is explained in:

        http://www.boost.org/boost-build2/doc/html/bbv2/advanced.html

as follows:

        Boost.Build actually consists of two parts - Boost.Jam, a build engine with its own
        interpreted language, and Boost.Build itself, implemented in Boost.Jam's language.

In C++ Boost tree, tools/jam is the Boost.Jam and tools/build/v2 is Boost.Build. On startup,
Boost.Jam locates Boost.Build files as documented at:

        http://www.boost.org/boost-build2/doc/html/bbv2/reference.html#bbv2.reference.general

> > > 2.) Is it true that the dependencies must be
> > > specified manually in a Jamfile; dependenceis are not
> > automatically found with header files. I
> > > understood this from this page of the doc :
> > > http://www.boost.org/doc/tools/build/doc/html/bbv2/tutorial/libs.html
> > However, the example is with
> > > a library dependency and not with source file dependecies.
> >
> > Dependencies on header files are automatically detected. Sources, of
> > course, need to be specified.
> > What on that page made you think dependencies on headers are not detected?
>
> OK for headers, that's great. However, If main.cc #includes a.hh, then
> if a.cc exists, I need to link main.o with a.o to make the program "main".
> It seems to me that I have to say to bjam that the
> "main" executable target needs a.o. Is that true?

Yes, that's true. I believe that most build systems require that you explicitly
specify sources. Note that you can use something like:

        exe a : [ glob *.cpp ] ;

to save on typing.

- Volodya

-- 
Vladimir Prus
http://vladimir_prus.blogspot.com
Boost.Build V2: http://boost.org/boost-build2

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