From: Ali Azarbayejani (ali_at_[hidden])
Date: 2003-05-27 16:01:49
Vladimir Prus wrote:
> Ali Azarbayejani wrote:
> > > So we'll have
> > >
> > > foo/bar
> > >
> > > for regular filesystem paths and
> > >
> > > @/boost/filesystem
> > >
> > > for project ids. And no other cases.
> > this means that if you want to use a project in another directory, that
> > project must have a project id? you can't refer to it simply by
> > location? (this is fine with me, i'm just asking if i understand
> > correctly.) or can you say something like "@../lib/foo" to indicate
> > target "foo" in project at location "../lib"?
> Not exactly. I mean that "foo/bar" syntax still will mean
> - file 'bar' in directory 'foo'
> - target 'bar' declared in 'foo/Jamfile'.
> I think the latter abilility is so handy so we should not drop it.
but, if i understand correctly foo/bar is target bar in foo/Jamfile if
foo/Jamfile exists and otherwise it is file foo/bar. no?
if so, i would still like to be able to have a workaround if i need to
refer to file foo/bar when there is a foo/Jamfile. i suppose one way is
to make foo/bar a main target...in fact, this was my workaround...but
then i ran into the problem that i could not use "foo/bar" as a target
id (because it has a slash, and project.find-target won't find it), so i
couldn't have my main target...it got really ugly and there is currently
no workaround without patching the BBv2 codebase.
question: how do you refer to target "foo/bar" in project "my/lib"?
look, here's the problem...there's basically two ways to refer to a
file: (1) filename or (2) project/target id. since filenames can have
slashes in them, any syntax for target ids that uses slash to separate
projects from targets is going to run into ambiguities. so my
recommendation is to drop the use of slash to delineate target from
project...it doesn't even look very clear when you write foo/bar that
"foo" is one thing (project id) and "bar" is another completely
different thing (target id).
how about the following?
<filename> (file relative to this project...or absolute)
<target> (target in this project)
@<project> (location or id of other project)
@<project>@<target> (target in other project)
@<project>@<filename> (this could be allowed too: file relative to
<filename> = any absolute or relative path
<target> = any id (which may include slashes) of main-targets in
current project; (target ids cannot include '@' unless escaped somehow)
<project> = location (rooted or relative) or id of other project
in fact this simplifies to
am i missing something?
i contend that i might want to have a file (or target) called "foo/bar"
in project "my/lib". i would refer to it as
how would you suggest refering to it in the current syntax?
is there anyplace where there is a concise syntactical description of
these id's? i see a number of examples in new/boost_build_v2.html, but
i can't find a definitive specification.
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