Boost logo

Boost-Build :

Subject: Re: [Boost-build] How to use generators to CPP and LIB
From: Duncan Rance (gmane_at_[hidden])
Date: 2009-02-03 06:46:10


Vladimir Prus wrote:
>> I tried creating a RESOURCE-LIB type but got nowhere with that.
>
> Why? Here's what seem to work for me:
>
> import type ;
> import generators ;
>
> type.register RESOURCE_LIB : : STATIC_LIB ;
>
> type.register TXT : txt ;
>
> generators.register-standard $(__name__).rlib : TXT : RESOURCE_LIB ;
>
> actions rlib
> {
> cp /usr/lib/libiberty.a $(<)
> }
>
> resource-lib x : x.txt ;
> exe a : a.cpp x ;

Whoop! Whoop!

Thanks for that Mr Prus. I've now got my build working.

I hadn't found a way to register the action like that (with the
__name__ thing.) Also, I didn't realize that "resource-lib" would be
automatically available.

Thanks again,
Duncan


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