Gary V. Vaughan wrote:The only way I can think of doing this is with an install-exec-hook that removes installed libraries if INSTALL_LIBS was not set:
if !INSTALL_LIBS install-exec-hook: $(MAKE) $(AM_MAKEFLAGS) uninstall-pkglibLTLIBRARIES endif
But this depends on an undocumented target. Better to put the modules in a separate dir with their own Makefile.am, and call that Makefile's uninstall rule in the same way.
Yuck... that means my users will see the libtool --mode=install messages and ldconfig runs for all 30+ modules, then they'll all get removed. For now I think I can live with the files getting installed and the users just knowing that they're not necessary for the application to be used.
Yeah, that is pretty sucky. What about installing the modules to a bogus directory (in the build tree?) and then removing that directory?
if !INSTALL_LIBS pkglibdir = $(top_builddir)/_noinst install-exec-hook: @echo "pruning statically linked modules" rm -rf $(pkglibdir) endif
Or, if you give the modules their own Makefile.am, you might be able to redefine INSTALL and mkinstalldirs to neuter the install rules:
if !INSTALL_LIBS INSTALL=: mkinstalldirs=: endif
Cheers, Gary. -- ())_. Gary V. Vaughan gary@(lilith.warpmail.net|gnu.org) ( '/ Research Scientist http://www.oranda.demon.co.uk ,_())____ / )= GNU Hacker http://www.gnu.org/software/libtool \' `& `(_~)_ Tech' Author http://sources.redhat.com/autobook =`---d__/