Boost logo

Boost-Build :

From: Kirill Lapshin (kir_at_[hidden])
Date: 2006-03-01 17:57:28


Hello,

I've used BBv2 couple of years ago, but did not have opportunity to use
it since then, even though my previous experience was very pleasant.

I see you guys are moving rapidly towards switching Boost to BBv2. This
is exciting! I wish you smooth and rapid transition.

As I said I haven't used BBv2 for quite awhile, and literally forgot
everything. My apologies in advance for stupid questions. I tried to
find answers in docs, searched this list, and bugged to death a good
friend of mine who have used boost build recently... but have not got
much luck.

Anyways, here is my problem.

On surface the problem is very simple. Suppose you pretty much want to
use verbatim example out of a box. Suppose the project is a bit more
complicated then everything-in-one-directory. Now if you have

actions inline-file
{
     "./inline_file.py" $(<) $(>)
}

it will fail miserably when you execute bjam from any folder other then
the one where inline_file.py is located.

I thought ok, fine I'll use path-constant!

Problem -- I defined path-constant in Jamroot, but it is not visible in
verbatim.jam.

Fine, I'll hack my way for now and I moved all the code from
verbatim.jam to Jamroot. That one sort of fixed the problem, except that
build log looks a bit awkward (due to the fact that Jamroot's name
consists of full path to the file), but that's a hack anyways, no big deal.

First question: what is the proper fix for this problem?

Secondly, my use case is a bit different from verbatim example, in a
sense that I generate an .hpp file from multiple sources. So my
invocation is explicit:

hpp generated.hpp : source1 source2 ;
lib util : util.cpp ;

Obviously util.cpp has #include "generated.hpp"

Second question: will lib rule pick up dependency on generated.hpp and
realize that it has to regenerate it (if needed) before compiling util.cpp?

Third question: the whole setup currently does not work, because
generated.hpp gets created in build directory, but that said directory
is not added to includes when compiling util.cpp. What is the right way
to fix that?

I am using quite recent CVS version of BBv2, compiling with msvc 8 in
native windows (not cygwin) shell.

Apologies for lengthy e-mail, and thanks a bunch in advance for your help.

Regards,
Kirill Lapshin

PS: BTW, does anyone have toolset for ANTLR?


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