Boost logo

Boost-Build :

Subject: Re: [Boost-build] BUMPITTY BUMP: [git] genrating forward headers
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2013-08-21 23:39:46


On 08/21/2013 07:12 PM, Dave Abrahams wrote:
> Perhaps, but these posts assume a great deal of background that I don't
> have. I need details filled in, please.
> For instance, in that post Steven says:
>> I've applied the Boost.Build changes.
> Applied them where? What do these changes do?

In Boost.Build. (mostly tools/build/v2/tools/link.jam).
These changes specify /how/ to create the header links.
The remaining changes are to create the link targets
and modify the rest of Boost to get the dependencies right.

>> I don't want to apply the changes to Boost proper in svn, since it'll
>> break without the git layout.
>> Here are the changes that need to happen in git:
> What does he mean by "need to happen in git?" We are not making any
> git-specific commits.
>> - Use the original boost-root patch (i.e. no <dependency>)
> Sorry, which patch is that?

It's somewhere in the archives. I think Jürgen
and Bjørn both posted it earlier in this thread.

>> - Change all uses of boost//headers to
>> <implicit-dependency>/boost//headers. <use> <source> and <library> do not
>> work correctly for handling generated headers.
>> This is the cause of the build problems with
>> the original patch.
> Is this a simple search-and-replace, or does it require some specialized
> knowledge?

A search and replace won't quite work. e.g.

lib A : a.cpp boost//headers ;
lib A : a.cpp : <implicit-dependency>/boost//headers ;

lib B : b.cpp : <library>/boost//headers ;
lib B : b.cpp : <implicit-dependency>/boost//headers ;

<implicit-dependency> needs to be in the target requirements.

>> - Add <implicit-dependency>/boost//headers to all library and test
>> targets.
> I /think/ I understand what that means.

It can be added at the project level:

project : requirements <implicit-dependency>/boost//headers ;

>> - Change the header install glob to search the correct include
>> directories
> I have no idea what that means. Please explain.

The install target has to copy all the boost headers.
Currently it looks something like:
headers = [ path.glob-recursive boost : *.hpp *.ipp : .svn ]
It will need to be changed to search the library specific
include directories instead, under the git layout only.

>> The fact that we need to disable everything that is specific for the
>> modularized layout when building in the monolithic layout complicates
>> the process of proceeding.
> Huh; from what I'm reading here it seems like maybe it could be done
> with a few project-wide bjam variables. Something like:
> {
> BOOST_HEADER_DEPENDENCY = boost//headers ;
> }
> else
> {
> BOOST_HEADER_DEPENDENCY = <implicit-dependency>boost//headers ;
> }
> then replace uses of "boost//headers" with "$(BOOST_HEADER_DEPENDENCY)".
> Is the problem more complicated than I'm guessing?

This doesn't need to be conditionalized.
<implicit-dependency> will work correctly in svn.

>> I imagine that some test may be used as a config step that allow new
>> or changed rules to be conditioned or targets to be disabled.
> Sorry, I don't know what that means.

I think he means exactly what you just described

BOOST_SVNLAYOUT = [ path.glob . :
  path/to/file/that/only/exists/in/git ] ;

In Christ,
Steven Watanabe

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