Subject: Re: [Boost-build] Building aggregate libraries from other libraries
From: Vladimir Prus (ghost_at_[hidden])
Date: 2011-05-28 10:08:47
On Saturday, May 28, 2011 16:33:55 Matt Chambers wrote:
> On May 28, 2011 6:46 AM, "Vladimir Prus" <ghost_at_[hidden]> wrote:
> > On Friday, May 27, 2011 22:19:24 Matthew Chambers wrote:
> > > I have a project that's split into a nice array of library targets. But
> > > some of my clients want a monolithic way of accessing these. Instead
> > > of: lib_pwiz_A.a
> > > lib_pwiz_B.a
> > > lib_pwiz_C.a
> > > (+15 others)
> > >
> > > They just want:
> > > lib_pwiz.a
> > >
> > > Is there a way to make an explicit target simply the aggregate all the
> > > individual libraries into a monolithic one? Preferably for either
> > > link=shared or link=static, but only working for link=static would be
> > > acceptable.
> > There is no tool in gcc toolchain that can do that. So, the only way is
> > to write a script that would extract every member from every .a file
> > (remember, that it is nothing but archive), and then compose them
> > together -- both using the 'ar' utility.
> I would like it to work independent of toolchain, I just used .a as an
> example. I expect the aggregate target would reflect on the
> sources/libraries of its sources and build a library from them. Is this
> possible with a generator? Any hurdles I should expect?
Yes, it should be possible with a custom generator class, and I would
not expect any issues.
-- Vladimir Prus http://vladimir_prus.blogspot.com Boost.Build: http://boost.org/boost-build2
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