Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-01-15 12:19:00


Rene Rivera wrote:

>>>The last line should be tweaked to expand to nothing with VERSION_NUMBER
>>>is empty, but you get the idea. Then, on all platforms but OpenBSD,
>>>the default value of VERSION_NUMBER will be "", and on OpenBSD it will be
>>>"0.0". Will that work?
>
>
> That's what BBV1 bassically does, the symlink has to be reversed, and it
> barely works. I was trying to add the version support to BBV2 last month,
> but the fast changing code makes it harder ;-)

:-) Just ask.
OTOH, I expect targets.jam to be stable for some time.

> My solution is to use the symlink target and change the build graph so that
> it inserts the symlink target "in front" of the library target. It would
> create the dependence like so:
>
> libfoo.so (symlink-target) --> libfoo.so.0.0 (link-dll-target)

Ok, I see. What advantages would that have?
How did you plan to implement it? I would think that either generator for
shared-library should be all this, or another, special generator.

Or did you plan to use the 'symlink' rule, indirectly? That would not
be quite convenient, because it is declarative one, it only add new main
target.

> The problem is that the pair needs to be kept together, like targets that
> generate multiple files.

Why can't we use "libfoo.so" only? If it depends on libfoo.so.0.0 then
everything looks OK.

>>Just a small meta-comment: let's be sure to keep in mind that this is
>>a platform requirement, not a (direct) toolset requirement, so ideally
>>we'll find a way to encode this stuff in the platform. That is to
>>say, (for example) the constructor for library target objects should
>>automatically handle adding version numbers to the target filename.
>
>
> Yes, which is another reason I'd rather have another target handle the
> symlink part. So that the toolset itself doesn't have to.

Agh... this makes sense. One idea to make this independent from toolset is

1. Make a generator for SHARED_LIB respect <version> feature by
creating the targets structure you've descrived.

2. Somehow get the default value for <version> on selected platforms.
Offhard, I imagine that feature <platform>openbsd can be composite,
and expand to <version>0.0
Explicit values of <version> will override this default.

(I really don't know if this idea is good...)

- 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