Boost logo

Boost :

Subject: Re: [boost] [build] referring to a tool from an external project
From: Eric Niebler (eniebler_at_[hidden])
Date: 2014-01-15 01:03:09

On 1/13/2014 8:01 PM, Steven Watanabe wrote:
> On 01/13/2014 04:18 PM, Eric Niebler wrote:
>> I'm trying to write a jamfile in an external project that uses boost.
>> The jamfile should invoke the wave tool to preprocess some code as a
>> build action. I have this:
>> actions do_wave
>> {
>> $(>[2]) -o- --config-file wave.cfg $(>[1])
>> }
>> W = /boost/libs/wave/tool/build//wave ;
> Either you need to give the path to
> the wave project:
> W = $(BOOST_ROOT)/path/to/wave//wave ;

Right, thanks. And BOOST_ROOT needs to be defined somewhere. Which leads
to my next question. One level up in my directory tree is where I have a
boost-build.jam that does all the hard work of processing command-line
arguments (e.g. --boost=...) and looking at environment variables to
determine where boost is. It sets a BOOST variable like so:

BOOST ?= $(boost-src) ;

I was under the naive assumption that since this variable wasn't
"local", it would be visible to all the Jamfiles in all the
sub-directories. But that seems not to be the case, since in my Jamfile,
$(BOOST) is empty. Where have I gone wrong?

> or you need to declare this project-id somewhere:
> use-project /boost/libs/wave/tool/build : $(BOOST_ROOT)/path/to/wave ;

Would it be a good idea to add it to the super-repository's Jamroot? It
does something similar for the inspect tool:

use-project /boost/tools/inspect : tools/inspect/build ;

Many of the libraries have Jamfiles that use the wave tool to preprocess
their sources. Those are all currently broken by modularization.

> Alternately, the wave Jamfile can be modified to give itself an id:
> project /boost/libs/wave/tool/build ;

Not a bad suggestion. Hartmut?

Eric Niebler

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