|
Boost-Build : |
From: David Abrahams (dave_at_[hidden])
Date: 2004-07-10 07:39:40
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
??
> David Abrahams wrote:
>
> IOW, the problem you have with the current syntax is that "/" is too heavily
> overloaded?
And that you need to look into the details of the path to see that
it's a target reference rather than it being apparent at a glance (I'm
feeling less confident of that part right now). And that, presumably,
you can't write
foo//bar/define=BAR
because you need the "/<" to identify the beginning of the property
string.
> I'm accustomed to this syntax, so it's naturally fine with me.
> What others think?
>
> About "@" -- why do we need it? Is it really desired to indicate if we refer
> to target or a file? BTW, IIRC the original proposal by Ali was that
>
> /some/other/project//foobar.cpp
>
> could refer *either* to target foorbar.cpp or file foobar.cpp in that other
> project.
"Explicit is better than implicit"
If I'm reading the Jamfile, I'd like it to be clear where I should
look for the things it names. I don't want to have to go look in the
Jamfile and then, if I can't find the file, fall back to looking in
the directory.
But actually, I was concerned about something else: I wanted to
distinguish project paths from directory paths, rather than files
from targets.
> I'm not really sure "@" is good -- you need to know what
> 'foobar.cpp' is really is.
I don't know what you mean.
>> Somehow I have no trouble with the colon separating these sections of
>> the target reference.
>
> There might be troubles when you refer to a target in requirements:
>
> <variant>release:<source>/other/lib:target1
>
> There's a lot of colons here.
Yep. You see, I didn't even have that possibility on my radar screen.
I think the syntax is so minimalist -- we're trying to do so much with
concatenation, '/', and ':' -- that it's highly confusable. Maybe we
should be doing something with parentheses for grouping...
...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.
-- 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