Boost logo

Boost-Build :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-01-31 13:40:19


----- Original Message -----
From: "Rene Rivera" <grafik666_at_[hidden]>

> But this does bring up the problem of building both static libs and dlls
with
> the same basename. As you suggest it does seem like a good idea to rename
> static libs also to comform to platform practices but we can't do that
unless
> we support some way of differentiating them. And the only thing I can
think of
> is to allow LIB and DLL targets to have the same basename. So this would
> become possible:
>
> lib foobar : fubar.cpp ;
> dll foobar : fubar.cpp ;
>
> The somewhat easy way to allow this would be to traslate the above always
to:
>
> lib foobar$(SUFLIB) : fubar.cpp ;
> dll foobar$(SUFDLL) : fubar.cpp ;

I assume you mean that the translation happens internally, and also that you
would prepend $(PREFIXLIB), $(PREFIXDLL) as appropriate.

> But then would it not also be expected to be able to the same to other
target
> types?

Yes.

I was reluctant to do as you suggest because then the user would have to
know the platform-specific suffix when building particular targets from the
command-line. Actually, now that I think of it, this is absolutely no
problem. The user-specifiable targets are all NOTFILE targets anyway.

I'd like:

rule lib ( target : sources + : requirements * : default-build * )
{
local real-target = $(PREFIXLIB)$(target:S=$(SUFLIB)) ;
type-DEPENDS $(target) : $(real-target) ;
declare-local target $(real-target) : ... ;
}

I think that would work out well. Sorry, I've been trying to say more about
this but can't put my thoughts together right now. I hope the code suffices.

-Dave

 


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