Boost logo

Boost-Build :

From: David Abrahams (dave_at_[hidden])
Date: 2004-12-27 11:29:42


Vladimir Prus wrote:
> 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.

Good, that's what I thought. That's part of my project ID assignment
scheme IIRC, which I have promised to document.

>> 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".
>
> Say: Jamroot:
>
> build-project libs/a ;
> build-project libs/b ;
>
> libs/a/Jamfile:
>
> project boost/a ;
> lib a ;
>
> libs/b/Jamfile
>
> 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 ;
>
> Some Jamfile:
>
> use-project-at /home/ghost/boost ;
> # Makes "boost" project id available in this Jamfile

I'll give this some thought. It interacts rather strongly with my other
suggestion that we ought to pitch project-root.jam.

-- 
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com
 

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