Hello,
to round up a couple of minor bits here:
* John Calcote wrote on Wed, Feb 03, 2010 at 05:57:49PM CET:
> 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
If you are using Automake (and on this list, I guess that's pretty much
given), then please use the variables to pick up the in-tree libtool
script as well as the usual flag variables for the makefile.am author
and the user:
install-exec-local: install-libhello
uninstall-local: uninstall-libhello
install-libhello:
@$(NORMAL_INSTALL)
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL)
$(INSTALL_STRIP_FLAG) libhello.a $(DESTDIR)$(libdir)/libhello.a
uninstall-libhello:
@$(NORMAL_UNINSTALL)
rm -f $(DESTDIR)$(libdir)/libhello.a
The explanation for the $(NORMAL_INSTALL) bits can be found in
info standards 'Install Command Categories'
(which is a fairly obscure feature), and putting the commands in a
separate rule which the standard rules just depend on, helps you to
easily extend the Makefile.am (or fragment) later: you can have multiple
install-exec-local: install-foo
statements but only one set of commands associated with a target.
Cheers,
Ralf