Boost logo

Boost-Build :

From: David Abrahams (dave_at_[hidden])
Date: 2004-07-12 10:48:35


Vladimir Prus <ghost_at_[hidden]> writes:

> David Abrahams wrote:
>> Just to clarify, my most immediate concerns are getting answers to
>> these two items, so I can continue with my project of fixing the
>> documentation:
>
> Ok. I'll try to answer the other email too, but I'm dizzy after a day of
> hacking :-(
>
>> > This is unclear from the docs:
>> >
>> > given:
>> >
>> > foo/
>> > foo/Jamfile [lib fu : fu.cpp]
>> > foo/fu.cpp
>> > foo/bar/
>> > foo/bar/baz/
>> > foo/bar/baz/Jamfile [exe baz : baz.cpp ..//fu]
>> > foo/bar/baz/baz.cpp
>> >
>> > (no Jamfile in bar)
>> >
>> > is the Jamfile in Baz correct, or does it need to say
>> >
>> > exe baz : baz.cpp ../..//fu
>
> When in foo/bar/baz/Jamfile,
>
> ..
>
> means "foo/bar", and if there's no Jamfile there, then "..//fu" is not
> correct, and ../..//fu should be used.

So... the part before the // always refers to a path in the
filesystem?

>> > ...or maybe we just need a very clear and complete description of
>> > these syntaxes in the documentation. It's possible that the reason
>> > I'm confused is that I've never seen the rules written down.
>
> I'll try to write down the rules:
>
> 1. The target-id with "//" in it refers to a target in some project. The part
> before "//" identifies the project, and can be either path to the directory
> where Jamfile for the other project is placed, or a symbolic id, matching
> those in 'project' rule for the referred project.

Ack! That's really strange. If I use .. in the path before // it
_always_ means "up a directory", but other path elements before // may
be referring to project structure _or_ filesystem structure?

I want to be able to name "boost" symbolically and then refer to
subprojects relatively. Can I do that?

> The part after "//" is the
> name of main target in the referred project.

> 2. The target-id without "//" either refers to a project (using the rules
> above), or to a file. We first check if a project by this name exists, and if
> not, try interpreting the target id as name of the file.

So in that case when checking for a matching project you assume that
only the last element in such a path names the target
(i.e. effectively replacing the final '/' with "//")?

> 3. A target id which refers to target in Jamfile, not file, may specify
> additional properties in the end. All properties should include feature name,
> so the beginning of property list is identified by "/<"

So far I am not suprised that I was confused. These rules are almost
impossible to explain coherently.

-- 
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