|
Boost-Build : |
From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-03-28 02:42:22
Hi Ali,
> (from the build specification)
>
> > 3. as a <library> property in usage requirements
> >
> > - no effect on 'a' itself. However, all target
> > which use 'a' will get <library>b in their
> > build properties. Usage requirements from 'b'
> > will be also added, recursively. This is the same
> > for both exe and lib, except that you won't likely
> > to use 'exe' in some other target.
Probably, the 'recursively' word should not be there. All targets which use
'a' will get
- <library>b
- usage requirements of virtual target that 'b' has generated.
If usage requirements of 'b' contained <library>c then usage requirements of
'b' virtual target will include <library>c and usage requirements of 'c'. So,
clients of 'a' will get <library>b, usage requirements specified for 'b'
(including <library>c) and usage requirements of 'c'.
> Try the following quiz.
>
> Example 1:
>
> lib a : $(ASrc) : : : <include>./include/a ;
> lib b : $(BSrc) a : : : <include>./include/b ;
> lib c : $(CSrc) b : : : <include>./include/c ;
> exe D : $(DSrc) c ;
>
> Does D get compiled with "-I./include/c"?
Yes.
> Does D get compiled with "-I./include/b"?
No. There's no mechanism how 'b' usage requirements will get into
usage requirements of 'c's virtual targets.
> Does D get compiled with "-I./include/a"?
Ditto.
> Example 2:
>
> lib a : $(ASrc) ;
> lib b : $(BSrc) a : : : <library>a ;
> lib c : $(CSrc) b : : : <library>b ;
> exe D : $(DSrc) c ;
>
> Does D link to c?
Yes.
> Does D link to b?
Yes, because "D" uses c and 'c' has <library>b in usage requirements.
> Does D link to a?
Yes. Because
- D uses 'c'
- usage requirements assigned to virtual targets generated
from 'c' include <library>a -- those usage requirements are
<library>b <library>a
Hope this clarifies things. BTW, I think I see a possible cause for confusion.
D uses 'c', and has <library>b added to build properties. It would seem that
now D also uses 'b' and we need to add 'b''s usage requirements to build
properties. And repeat the process.
The way it works now it that D uses 'c' and gets both <library>b and
library<a> immediately. IOW, if usage requirements propagated from a source
have <library>b, they will also have <library>a.
I'm waiting for your further comments.
- 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