Boost logo

Boost-Build :

From: Ali Azarbayejani (ali_at_[hidden])
Date: 2003-03-27 10:21:23

Usage Requirements and the meaning of "A uses B"...

I have some problems with your Build Process Specification, but a
couple of fundamental questions need to be answered regarding Usage
Requirements to uncloud the waters enough even to discuss it. I know
you said that Usage Requirements was never thought out completely...I
believe it ought to be now because it is clearly an important
mechanism for propagating information to dependents and its behavior
is ill-defined.

<1> We often say things like "A uses B", believing we all understand
what that means. What *EXACTLY* does it mean? This is important
because it is the basis for determining how Usage Requirements
apply, which is the principle confusion I have with the
specification. If A "uses" B, then B's Usage Requirements are
applied to A's Build Properties (boost_build_v2.html), but what
does "uses" mean exactly?

I assume this "uses" relationship is meaningful only between Main
Targets, yes?

What are the ways to cause this relationship? Is the following
true and complete?

<a> A Main Target A "uses" a lib target B if B is in A's sources

<b> A Main Target A "uses" a lib target B if property <library>B
is in A's Requirements

<c> A Main Target A "uses" Main Target B if property
<use/dependency>B property is in A's Requirements

The above describes DIRECT "uses" relationships as I understand

<2> Does "uses" also include INDIRECT relationships? That is, if A
"uses" B and B "uses" C, does A "uses" C? Or not?

Does this vary depending on the feature-type (yuck!)?
E.g. <library/link-to> applies to INDIRECT dependents but
<include> applies only to DIRECT dependents?

<3> If A "uses" B, is it true, as implied in the v2 specification
(boost_build_v2.html), that a property appearing in
Usage-Requirements in B is equivalent to the same property
appearing in the Requirements of A?

That is, if you put property P in B's Usage-Requirements, would
you get EXACTLY the same behavior if you removed P from B's
Usage-Requirements and placed it in the Requirements of all of B's
direct dependents? (Or all direct AND indirect dependents?)

(I know there are problems here...first of all, if you are allowed
to establish "uses" relationships with the <library> property in
Requirements (which I am starting not to like), then Requirements
must be processed before "uses" relationships even can be
determined, so Usage-Requirements from dependencies cannot
possibly be equivalent to Requirements. This is a problem, either
with functionality or terminology...or documentation.)



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