Boost logo

Boost-Build :

From: Ali Azarbayejani (ali_at_[hidden])
Date: 2003-06-03 11:02:51

Vladimir Prus wrote:
> For example:
> exe hello : hello.cpp @/stlport/stlport ;
> exe hello : hello.cpp : <library>@/stlport/stlport ;
> In both cases, everything must work if @/stlport/stlport produces
> 1. A target for a searched-library
> 2. A target which only conveys usage-requirements, but is not intended to be
> consumed.
> 3. No targets at all
> Opinions?

I'm thinking of this both in terms of the existing design and the new
Target design I'm working on. In both cases, this sounds like an
appropriate application of the "run-actions" functionality.

There is a rule "feature.action" which registers rules to run associated
with either a feature or a property. The rule is run in the context of
processed properties and it is in the new design the very last stage of
property processing (in the current design it is near the end of
property processing). Each rule may create new properties to add to the
property set.

So, we should always write

exe hello : hello.cpp <stdlib>stlport ;

and should register

feature.action <stdlib>stlport : process-stlport ;

and define

rule process-stlport registered-property : context-properties
// return appropriate combination of
// <library>@/stlport/stlport
// <include>...
// <define>...
// etc.

The only problem with this approach is that it won't work (I think).
Because in both the existing and new designs, these rules get called
after dependencies are generated (so the library won't be processed
correctly). Of course, this rule could do that generation as well...



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