automake
[Top][All Lists]
Advanced

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

Re: AM_CONDITIONAL not working properly, or I just don't understand :-(


From: Gary V. Vaughan
Subject: Re: AM_CONDITIONAL not working properly, or I just don't understand :-(
Date: Wed, 15 Oct 2003 16:43:30 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20030925 Thunderbird/0.3

Kevin P. Fleming wrote:
Gary V. Vaughan wrote:

Completely untested, but have you tried:

pkglib_LTLIBRARIES =
noinst_LTLIBRARIES =
if INSTALL_LIBS
pkglib_LTLIBRARIES += $(LIBLIST)
else
noinst_LTLIBRARIES += $(LIBLIST)
endif


Just tried it, same results, automake reports each module in LIBLIST as "already going to be installed in 'noinst'". In fact, I even tried changing noinst_ to lib_, and now it reports "already going to be installed in 'lib'".

Argh! No wait, I am a dufus. A noinst_LTLIBRARY is always a convenience library, whereas a pkglib_LTLIBRARY is affected by configure --disable-shared etc. Even if you somehow got past the syntax problems, the semantics are all wrong anyhow.

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.

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__/





reply via email to

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