|
Boost-Build : |
From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-07-14 10:22:12
David Abrahams wrote:
> > 1. Target-id is either file or target in Jamfile
> > 2. If it's target in Jamfile, it can be in the current Jamfile, or
> > elsewhere 3. If it's elsewhere, we can use either filesystem path to
> > refer to location of other Jamfile, or its symbolic project id
>
> That's only half the summary. You haven't described how the syntax
> is interpreted to yield those semantics (except in a bunch of
> incomplete fragments from prior messages). Gather it all in one
> place so we can look at it.
Okay.
0. Target-reference refers either to file or a target in some project. The
decision is made syntantically. If targer reference has "//" in it, it refers
to a file, otherwise it refers to target.
1 Target reference which refers to file is interpreted as file name relative
to the source directory of the project where target reference is used.
2. Target reference which refers to target constists of two parts. The part
after "//" names a target in Jamfile. The part before "//" identifies a
project.
2.1 The name of a target should be exactly the name specified in Jamfile.
2.2. The part before "//" can identify a project in two ways: by specifying
directory of Jamfile, or by specifying project id previously passed to the
invocation of the 'project' rule. There's no syntantic differences between
those two ways: we first look if project with such id exists. If not, we
interpret the part before "//" as path to Jamfile.
I hope I've specified everything. If not, let me know and I'll fill the holes.
> > What you propose that
> > 4. It's possible to refer to other Jamfile using first symbolic project
> > id and then filesystem path relative from that.
>
> What I propose is that:
>
> project IDs are bracketed (or something).
> filesystem paths are un-bracketed
Ok, I understand. I wonder though, why nobody complained about it yet....
> >> rule subproject-path ( subproject-name )
> >> {
> >> return libs/$(subproject-name)/build
> >> }
> >>
> >> So that once [boost] is identified, [boost/python] automatically
> >> identifies the python subproject.
> >
> > It would be nice, but I think manual specification is acceptable.
>
> I don't. How do I refer to the boost/python project from a project
> unrelated to Boost?
You start by saying
use-project /boost : path-to-boost ;
after that, top-level Boost Jamfile is loaded and in turns loads Boost.Python
Jamfile, which registers the "/boost/python" id.
- 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