Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2005-01-17 11:08:14


I'm trying the clean up doc areas when Dave marked as problematic, and is
stuck because I can't reasonably explain the current behaviour of project-ids
and use-project. I think it's a sign that we really need to fix them up.

How, I'm unsure how to fix theml without breaking every existing project, so
I'd appreciate some help.:

Use case 1 ("external project"). I want to use C++ Boost. I'd expect to write

use-project /home/ghost/boost/cvs ;

and then have convenient ids for all boost libraries.

Use case 2 ("internal project"). I want to use project id to refer to some
directory inside my project, to protect against directory reorganisation.

Use case 3 ("aliases"). I want to use two different project id for the same
project. Or, I want two use two different project ids for two different
project, even if they define the same project id.

Problem 1. The 'use-project' rule requires to always specify project-id, even
if the referenced project already defines a project-id. This is syntax
inconvenience and can be easily fixed.

Problem 2. The 'use-project' rule requires the the specified project-id is
equal to that project-id specified by the referenced project. So, it's not
possible to give alias to a project id. This is easy to fix, too.

Problem 3. The project ids are all "global" -- they share the same namespace.
It means that something like

use-project boost-cvs : /home/ghost/boost/cvs ;
use-project boost : /home/ghost/boost/release ;

is not possible, since Jamfiles in both location will define the same global
project id "boost".

If we want to solve the third problem, it means that we need "local" project
ids. So, "/boost//" can mean different things in different Jamfiles.

But then we have:
Question 1. Should there be any meaning of "relative" project ids. Now, all
ids start with "/". If ids can be local, it's reasonable to drop "/" from
them. But that would require updating of all Jamfiles, which is not
desirable.

Problem 4. Subprojects. After

use-project /home/ghost/boost/cvs ;

I want to use all Boost libraries. I also want to be able to use them after

use-project boost-cvs : /home/ghost/boost/cvs ;

There are two ways to make it work: automatically translate ids of subprojects
or add a number of "alias" targets to Jamroot. In the first case, one will be
able to use "/boost-cvs/filesystem//boost_filesystem", and in the second
case: "/boost-cvs//filesystem".

The first case requires that Jamroot somehow provide the list of all the
subprojects (we don't have a documented way to do that), and the second case
requires manual changes for each new library. But maybe, it can be automated.

Question 2. Which variant is better?

There are some further questions, but so far I can't formulate them without
going into implementation details.

Feedback is very welcome!

- Volodya

 


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk