|
Boost-Build : |
From: Rene Rivera (grafik666_at_[hidden])
Date: 2002-11-27 11:05:50
[2002-11-27] Vladimir Prus wrote:
>Rene Rivera wrote:
>>David Abrahams wrote:
> > ...I think the idea of reducing the number of ways to specify a library
is
> > good. But I think the "system-lib" UI is not enough of a reduction. A
rather
> > more flexible and cohesive solution would be to incorporate the various
> > instances of a library into the "lib" target. Here are the various ones
I
> > can think of, and how they might be declared:
>
>I agree that using a single "lib" is attractive. After all, we
>already use it for both static and dynamic libraries. But note that
>we have separate target types: STATIC_LIB and SHARED_LIB. And since
>system libraries are special in some sense (you'd need to add "-l") flags,
>to library names to command line, it makes perfect sense to introduce
>SYSTEM_LIB target type first (and system-lib rule), and make it working.
>
>When "lib" interface is finialized, we'll make the "lib" rule use
>"system-lib" rule and deprecate using that rule.
OK, that makes sense :-)
> > 1. Locally built library:
> >
> > lib test : test.cpp ;
> >
> > 2. System available library, OS default linking:
> >
> > lib zlib : z : <system>true ;
>
>What I don't like here is that "z" is not a source for "zlib".
>It would make UI confusing and implementation rather tricky. Can we
>do
>
> lib zlib : : <system>true <name>z ;
>
>?
Sure. After all we had previously mentioned, long time ago, that specifying
the <name> is desired in other circumstances.
> > 4. Externally available library, on a given location:
> >
> > lib zlib : z : <search>/usr/local/lib ;
>
>How does this interact with "prebuilt" rule? We can change "prebuilt"
>to work in this way
>
> lib fs : : <file>/a/b/c/libfs.a ;
Not sure if that's enough. After all one would want to specify multiple
locations to find the library, mapped to "-L" switch. For example:
lib fs : : <name>fs <search>/usr/local/lib <search>/opt/lib ;
>The problem is that "prebuilt" is not restricted to "lib" targets.
>Therefore, we must make "file" feature work for all target type, i.e.
>make a special generator, which is always selected when "file" is
>specified and does what "prebuilt" does now.
>
>That's nice, except for empty argument :-). The only problem is that
generator
>selection is still underdesigned :-(. So, I don't know if we can create a
>generator which will be *always* selected when there's <file> property.
Did you just convince yourself to not use <file> in prebuilt?
-- grafik - Don't Assume Anything
-- rrivera_at_[hidden] - grafik_at_[hidden]
-- 102708583_at_icq - Grafik666_at_AIM - Grafik_at_[hidden]
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