From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-12-27 05:19:35
On Monday 27 December 2004 12:38, David Abrahams wrote:
> The tutorial, in section bbv2.tutorial.libs, suggests first adding a
> project id "foo" to top/util/foo/Jamfile:
> project foo
> : usage-requirements <include>.
> And then adding to top/Jamfile:
> use-project /foo : util/foo ;
> These declarations seem to me to be entirely redundant -- they both
> associate the project id /foo with the top/util/foo/Jamfile. Why should
> both be needed?
Theoretically, there's no such need, and we've agreed to change that.
> What currently happens if only one of them is supplied?
It's not allowed.
I think the only function of project id in the "project" rule is to allow
subprojects of a given project root to use project ids without "use-project".
build-project libs/a ;
build-project libs/b ;
project boost/a ;
lib a ;
lib b : b.cpp /boost/a//a ;
Without project ids, Jamroot would have to be:
use-project /boost/a : libs/a ;
use-project /boost/b : libs/b ;
which is a bit inconvenient -- after all, the project in libs/a can define a
project id itself.
In fact, it's not clear if we should drop id in project or in
use-requirements. Most of the time I want to use "boost at /home/ghost/boost"
and don't want to rename any ids. So, maybe the right syntax is:
Jamroot for boost:
project boost ;
use-project-at /home/ghost/boost ;
# Makes "boost" project id available in this Jamfile
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