Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-05-14 10:08:37


David Abrahams wrote:

> The search proceeds as follows in my proposal.
>
> Step 1:
>
> ---%.whl ; %.whl<----%_parser.cpp ; %.cpp<--%.exe
> / --%.dlp
> %.wd<--< /
> \ /
> ---%.dlp ; %.dlp<-
>
> We have found one way to create a .cpp from our sources...
>
> Step 2, we must examine the other way to create a .cpp, to decide
> which one is better:
>
> ---%.dlp ; %.dlp <--- %.cpp ; %.cpp<--%.exe
> / --%.whl
> %.wd<--< /
> \ /
> ---%.whl ; %.whl<-
>
> The two transformation paths are equivalent according to my criterion,
> but IIUC you're saying that they are not; the 2nd one will fail to
> satisfy the requirements for building a .exe file.
>
> Your point is taken. True path equivalence requires that the products
> of the transformation sequences are also identical. It's clear that
> you have to defer pruning either one until you get all the way back to
> the invoking generator.

Can you clarify what's 'produces of the transformation sequences'? Do they
include results of converting extra targets? If not, then I don't understand
how will you detect that there's no ambiguity in WD case. One generator will
give you %_parser.cpp and another %_lexer.cpp and they are not equal.

I have another interesting use case:

wd -> whl, dlp
whl -> sg
dlp -> sg
dlp -> cpp
cpp -> o
o -> exe

Here, the dlp files can be converted into o in two ways. Will your new
algorithm report ambiguity?

> >> My second contention is that greedy conversion is not really the
> >> answer it appears to be. I'm going to base this assertion on the
> >> idea that there's no good criterion for applying it... so I don't feel
> >> I need to justify it further ;-)
> >
> > I think the criteria is simple. Generator passes 'multiple' to recursive
> > 'generators.construct' call if it can do something sensible to multiple
> > returned targets. Generator with single input can do something. Generator
> > with two input types cannot.
>
> Suppose some generator further up the chain has no use for the
> multiple returned targets? I guess that's why "multiple" is passed
> to the left during the generator search process?
>
> What if you have a generator that requires exactly two .cpp files and
> one file of some other kind?

Oh... that's a very contrived case which I'm willing to declare unsupported.
Does your algorithm does better?

.... to be continued..

- 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