Boost logo

Boost-Build :

From: David Abrahams (dave_at_[hidden])
Date: 2006-04-02 21:12:49

Rene Rivera <grafik.list_at_[hidden]> writes:

> David Abrahams wrote:
>> Rene Rivera <grafik.list_at_[hidden]> writes:
>>> Jürgen Hunold wrote:
>>>> Hi !
>>>> Am Maandag 27 März 2006, 10:11 schrieb Vladimir Prus:
>>>>> Hi Rene,
>>>>> Like Dave, I'm a bit concerned about using <*> which means something
>>>>> completely different in V1. Maybe, we can just use '*' without '<>'? Or
>>>>> maybe, some keyword, like "usage". Using just '*' can look like black
>>>>> magic.
>>>> What about naming the section (alike the "project") and then add a section
>>>> named "common-requirements" and be done ?
>>>> This would add its entries to both "requirements" (better
>>>> "build-requirements" ?) and "usage-requirements".
>>> After thinking on it for a few days that is certainly one viable route.
>>> Also the suggestion to use "build-requirements" for consistency is good.
>>> Perhaps that should be added as an alias for "requirements". With that
>>> in mind a few other possibilities spring to mind:
>> I think we should keep experimenting. For example:
>> lib foo : foo.cpp
>> :
>> self: # the default
>> <define>COOL=1
>> all: # or maybe "self+users:"
>> <define>ENABLE_LOG=1
>> users:
>> <link>shared:<define>BUILD_DLL=1
>> ;
> So you prefer the first choice I gave of having a single delimited
> section for the requirements. It's just the labels to use as delimiters
> you don't like?

I'm not claiming any dislikes. I'm just trying to say that we should
keep looking at the possibilities.

> Of the above I don't particularly like "self:" it's not
> descriptive.

It's precisely descriptive of which targets the requirements apply to.

> I know what it means, but I doubt a new user is going to understand
> it.

It's a DSL; new users will have to learn what it means no matter what
you do. I don't think any of the other suggestions we've seen are
more obvious to a new user than what I proposed.

> Same goes for "all:". I like the idea of using a composition of the
> various labels, although I might prefer using the current composition
> "," separator...
> lib foo : foo.cpp :
> build:
> <define>COOL=1
> build,users:
> <define>ENABLE_LOG=1
> users:
> <link>shared:<define>USE_DLL=1
> ;

The comma works.

> Personally I like the "build" label.

I don't; it isn't descriptive. :)

> It indicative of when the
> requirements are used, only when building the target.

The part it leaves out is "the target." Of /course/ the requirements
are used when building. The question is, when building /what/?

> For the usage requirements "users" is good, but it's not a currently
> familiar term. A shorter, and corresponding term is "use". That
> matches the "<use>" feature directly.

Huh, that symmetry has some appeal. On the other hand, "<use>" is a
verb, but "use" would be a noun. That seems a little confusing.
Maybe that's not important, but it's worth considering.

> The example:
> lib foo : foo.cpp :
> build:
> <define>COOL=1
> build,use:
> <define>ENABLE_LOG=1
> use:
> <link>shared:<define>USE_DLL=1
> ;
> Can I take by your suggestion of "self:" etc, that you don't like the
> current BBv2 labels of "requirements" and "usage-requirements"?

I like the terms in principle, but once you have to describe a
combined category they don't work anymore.

Some other ideas:



I'm not thrilled with those; I'm just experimenting.

Dave Abrahams
Boost Consulting

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