Boost logo

Boost-Build :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-05-06 10:31:23

From: "Vladimir Prus" <ghost_at_[hidden]>

> I'm now thinking about targets, subvariants and paths for them and it
> not seem as simple as I expected. Before I start writing long messages, I
> have a quick question -- we were planning that if some target, for
> object file, is used by two main targets, and neither has any explicit
> requirements, than we believe that this object file can be built only

As long as the main targets are in the same (sub)project and so inherit the
same implicit requirements.

> But... if we allow generators to arbitrary change property set, we cannot
> guarantee that this two objects use exactly the same set of free

I assume you're talking about the Build Property Expansion phase described
in the architecture document?

Why not say that generators are only allowed to make property set changes
that are deterministic based on the generator and the set of input
properties? Would that handle it?

> What's more: we can have some intermediate target build with a set of
> properties which is not equal to either free properties of its parent, or
> main target that uses it -- in which directory will be put it.

Why wouldn't we just do what v1 does (generate all such intermediate
targets in a directory associated with the main target)?

> And the final question: why do we care which dir is used for storing
> particular subvariant. I have a vague feeling that this makes for better
> ("in case user wants to get some subvariant and do something with it"),
> this is poor explanation. Anyone got better?

I've asked myself the same question from time to time.

I think the biggest issue to keep in mind is that the set of all possible
targets for any run of the build system can't be known in any given run
(e.g. because the user may change the toolsets he wants to use), so we need
a way to identify a subvariant based on how it's built. In other words, we
can't just try to assign consecutive numbers to each subvariant and use a
directory associated with that number.

Since main targets impose direct requirements on their (intermediate)
children, intermediate targets in v1 are built in a subvariant directory
associated with the main target.



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