Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2007-11-18 21:09:41


David Abrahams wrote:
> on Fri Nov 16 2007, Beman Dawes <bdawes-AT-acm.org> wrote:
>
>> For the headers that appear in boost-root/boost, rather than a library
>> specific subdirectory, it is very helpful if they self-identify what
>> library they belong to. This allows scripts to associate the header with
>> a library.
>>
>> The usual way to do this is to include a comment. A typical example:
>>
>> // See http://www.boost.org/libs/config for documentation
>>
>> The exact format doesn't matter. What does matter is that the library
>> name be found somewhere in the file, immediately following a string
>> which contains "/libs/".
>>
>> Below is the result of doing:
>>
>> grep -L "/libs/" *.h*
>>
>> I'd appreciate maintainers adding a library identifying comment to these
>> files. Otherwise I'll do it, which carries a slight risk that I'll get
>> it wrong.
>
> Without giving precise directions for identifying the library (not
> just a typical example), I don't see how the result can be useful to
> scripts.

The usual approach is to look for "www.boost.org/libs/" and assume the
next substring up to a "/" or space is the library name. This is used,
for example, by the inspect tool. I use something similar in a bash
script when I want to do a bunch of svn or other commands on a per
library basis, using grep to find the library name for each header in
boost-root/boost, and then a sed regular expression to turn the
resulting header name and library name into the command I'm after. Saves
a great deal of typing.

--Beman


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk