Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2008-03-27 01:42:17


Alex Khassapov wrote:

> David Abrahams <dave <at> boost-consulting.com> writes:
>
>>
>> Toon Knapen <toon.knapen <at> fft.be> writes:
>>
>> > David Abrahams wrote:
>> >
>> >>>Isn't
>> >>>
>> >>> On Unix, "lib" prefix is prepended to names of all targets of type LIB
>> >>> that don't have that prefix already.
>> >>>
>> >>>simple enough?
>> >>
>> >>
>> >> It's reasonably simple until you start having to follow it by
>> >> "except..." or "unless..."
>> >> :)
>> >
>> > And it probably needs to be clarified that bbv2 does not support
>> > creating libraries *without* the lib prefix anymore.
>> >
>> > This will bite me because I have inherited a project where libraries are
>> > created (using bbv2) without the lib prefix. OK no problem so far if all
>> > of a sudden all libraries have a lib prefix. But now there are other
>> > tools that refer to these libraries with the name of the libraries
>> > hardcoded.
>>
>> Here's your first customer for an "except..." clause.
>>
>> See?
>>
>
> Yeah, we had the same problem and had to write the <tag> rule to prevent
> appending "lib"
>
> rule tagrule ( .name : type ? : property-set )
> {
> #ECHO $(.name) $(type) ;
> local ret = "" ;
> if ( $(.name) = $(name) & $(type) = SHARED_LIB )
> {
> # return itga.so, get extention for SHARED_LIB
> local ext = [ type.generated-target-suffix $(type) : $(property-set) ] ;
> ret = $(name:S=.$(ext)) ;
> }
> return $(ret) ;

Why your libraries don't have "lib" prefix in the first place?

- 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