Steffan,

On 2/3/2010 5:50 AM, Steffen Dettmer wrote:
On Wed, Feb 3, 2010 at 8:33 AM, John Calcote<john.calc...@gmail.com>  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 Makefile.am file
that builds (for instance) libhello.a (untested):

install-exec-local:
        libtool --mode=install ./install-sh -c libhello.a
$(DESTDIR)$(lib)/libhello.a

This example came from the libtool manual (modified slightly for Automake
context).
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:

install-exec-local:
        libtool --mode=install ./install-sh -c libhello.a 
$(DESTDIR)$(libdir)/libhello.a

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

John


Reply via email to