[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Creating a partial library

From: John Calcote
Subject: Re: Creating a partial library
Date: Wed, 03 Feb 2010 09:57:49 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv: Gecko/20100111 Thunderbird/3.0.1


On 2/3/2010 5:50 AM, Steffen Dettmer wrote:
On Wed, Feb 3, 2010 at 8:33 AM, John Calcote<address@hidden>  wrote:
(PIC-based static only) library is to use the "noinst" prefix. But libtool
can be used to manually install a convenience library, so you could use
libtool to do this in an install-exec-local rule in the file
that builds (for instance) libhello.a (untested):

        libtool --mode=install ./install-sh -c libhello.a

This example came from the libtool manual (modified slightly for Automake
ohh this is interesting. Isn't this breaking `make uninstall' and
thus `make distcheck'?  Would it be possible (better/suited/correct)
to have some lib_LIBRARIES=libother.a with a custom build rule
that simply copies the file? Then make install/uninstall could
work, but maybe this breaks other things?

The trouble with LIBRARIES is that it only builds non-PIC static libraries, which can't be linked into a libtool shared library. My example has a couple of minor flaws that I realized last night after sending it, including the missing uninstall-local rule:

        libtool --mode=install ./install-sh -c libhello.a 

        rm -f $(DESTDIR)$(libdir)/libhello.a


reply via email to

[Prev in Thread] Current Thread [Next in Thread]