Boost logo

Boost-Build :

From: David Abrahams (dave_at_[hidden])
Date: 2007-04-05 17:30:55

Whenever a target is built that needs to use one of the targets
created in python.jam, I'd like to check to see if a "using python..."
has been executed, and if not, simply invoke

    using python ;

That would keep people from having to set up a user-config.jam just to
build all of Boost, or use Boost.Python, in most cases.

I don't know if we can even get close to that right now. The most
obvious problem is that I don't think we have a way of saying "call
this function if target X gets used", say, a "usage-action".

The other obvious one is that all those targets created in python.jam
are created in response to "using python...", so there's a circularity
issue. Given the way target alternative matching works today, it
would *almost* be enough to declare the general form of those targets
(with no specific requirements and the "using python" usage-action) at
global scope in python.jam, so that there's something that users'
targets can refer to. Unfortunately, if the user later comes along
and invokes "using python" just once, that will break the
currently-standard behavior of unconditionally using the declared
target without complaint when there are not multiple alternatives,
even when the build request doesn't match. There would now be
multiple alternatives (the one from global scope in python.jam and the
one the user declared) and if the build request didn't match the
declared target exactly, we'd use the one from global scope (which is
presumably a dummy target and not workable).

Any thoughts about how we could solve this problem?

Dave Abrahams
Boost Consulting
Don't Miss BoostCon 2007! ==>

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