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 on and I
> > have a few questions:
> >
> > > 1.) I do not understand what's more in compared to
> > bjam; I see no reference to
> > > something else than bjam in 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
> Reading the doc, it seems to me that bjam is the
> only thing I need for what's called "". But there is a specific
> documentation for and boost.jam. I am confused with that.

Hi Frederic,

I think this is explained in:

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:

> > > 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 :
> > >
> > 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 #includes a.hh, then
> if 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
Boost.Build V2:

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at