Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-05-21 09:11:10


Ali Azarbayejani wrote:

> lib b : a.cxx : <dependency>foo ;
> # Error because foo not a main target.
> # OK...foo is NOT a main target, but error is not caught and reported
> # as such.

Yep, that's a bug.

> And shouldn't be an error anyway... should treat foo as a
> # file (just like sources).

Do you have a use case for treating "foo" as source? Why would I want that?

> lib d : a.cxx : <dependency>subdir/bar ;
> lib subdir/bar : : <name>bar ;
> # Error because can't find subdir/bar as a main target, even though it
> # is! This is because project.find-target treats "subdir/bar" as
> # project "subdir" with target "bar" instead of target "subdir/bar" in
> # project ".".

I never meants that main target names can include "/". Why do you need it?

> <1> The error condition in targets.generate-dependencies is not
> checked properly. Instead of checking the return of
> targets.generate for string "@main target not found" it checks for
> empty return.

Agree. It's a problem.

> <2> Even if error condition were checked properly, the logic is
> different from basic-target.generate-sources. The former treats a
> negative return from targets.generate as an error, the latter
> handles a negative return by treating the target as a file instead
> of a main target.

The idea is that <dependency> properties refers to other main targets only.
Actually, that's almost definition of "dependency" property (see the docs).

> Aside from the oversight in checking the error condition properly,
> why don't these have the same logic? Why isn't generation of
> dependencies the same as generation of sources?
>
> <3> Target id with slashes not allowed, so can't have a main target
> with an id that names the file (if in a subdir).

Could you clarify the motivation? I still don't get it.

- 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