[Top][All Lists]

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

Re: Creating a partial library

From: Ralf Wildenhues
Subject: Re: Creating a partial library
Date: Sat, 6 Feb 2010 17:32:37 +0100
User-agent: Mutt/1.5.20 (2009-10-28)


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 author
and the user:

install-exec-local: install-libhello
uninstall-local: uninstall-libhello

        $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) 
$(INSTALL_STRIP_FLAG) libhello.a $(DESTDIR)$(libdir)/libhello.a

        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 (or fragment) later: you can have multiple
  install-exec-local: install-foo

statements but only one set of commands associated with a target.


reply via email to

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