Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-05-30 08:05:29

Ali Azarbayejani wrote:
> Vladimir Prus wrote:
> > Just to clarify: did you have to use "foo/bar" because file "bar" in
> > directory "foo" was not found? Your posts did not contain an example of
> > *this* problem. I believe there's no other need to use main target names
> > with slashes?
> >
> > > question: how do you refer to target "foo/bar" in project "my/lib"?
> >
> > There's no way, but also, IMO, no need to name target "foo/bar".
> here is the use case:
> The rule (called automatically based upon the files in subdirectory
> "patches") looks like this
> patch foo/b.orig : foo/b patches/foo/b ;
> patch foo/d.orig : foo/d patches/foo/d ;
> It's natural to name the targets "foo/b.orig", "foo/b" and
> "patches/foo/b". You can't really name them all "b", can you?

You can't. The question is what functionality end user wants. If he wants to
apply patches to some archive, then he does not care about "foo/b.orig" and
"foo/d.orig". In other words, he has no intention of building those things
individually -- which means they should not be main targets.

I might misunderstood your use case, in which case I'd like some

> >
> >
> > even contains something like a grammar.
> Sorry, I had completely missed this and I was browsing that file.
> It does contain something like a grammar, but I'm pretty sure it is not
> fully consistent either with the intent or with the implementation.
> Target identifier is used to denote a target. It is described by the
> following grammar:
> target-id -> project-reference local-target-name
> project-reference -> [jamfile-location] [ "@" [project-id] ]
> jamfile-location -> pathname
> project-id -> pathname
> local-target-name -> identifier
> For example, according to this, there is no slash between the
> project-reference and local-target-name,

That's a typo.

> and it allows simply "@" as a
> project-reference (is this really allowed? what does it mean?).

I think this should not be allowed.

> I'm
> not sure why project-reference requires a path AND a project-id, but I
> guess this is the one you are proposing to eliminate?


> Also, how to you refer to a project alone? Is "@/boost/thread
> " a project withh identifier "/boost/thread" or is it target "thread" in
> project "/boost"?

Very good question. Similiar to targets/files: first it's checked if such
project exists, if not, it's interpreted as target id. This is a argument for
separating target name from project name -- at least I can admit that
confusion is possible.

> So, again, I agree that this needs tightening up. We should start by
> being complete and clear about the requirements of things to be
> referenced.
> I maintain that it is confusing and not visually clear what is a project
> and what is a target when they are separated by slashes and at least the
> project can itself contain slashes.

Personally, I don't find it so. But overall, I'm +-0. I think that
1. We might ask the users
2. If we go with visually separate target, I'd very much prefer the "%"
character, since it resembles "/". (Some other project used this symbol for
the same purpose --- either Cook or Odin -- can't remember now)
3. It would be nice to allow both % and / for separating target ids in M4, to
make upgdaring smoother. (Of course, unless you and Dave not introduce some
greater incompatibilities)

> Even if it is logical, it is not
> visually clear. And I'm waiting on your judgement of the above examples
> if targets deserve to have slashes. If so, then it cannot even be
> logical.

I'm still to be persuaded that targets should have slashed..

- Volodya


Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at