[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: automake warning using lib_LTLIBRARIES
From: |
Alexandre Duret-Lutz |
Subject: |
Re: automake warning using lib_LTLIBRARIES |
Date: |
Sat, 26 Jan 2002 13:37:26 +0100 |
User-agent: |
Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1 (i386-debian-linux-gnu) |
>>> "Roger" == Roger Leigh <address@hidden> writes:
About
| if BUILD_LIBGIMPPRINT
| lib_LTLIBRARIES = libgimpprint.la
| endif
| if BUILD_LIBGIMPPRINT
| bin_SCRIPTS = gimpprint-config
| endif
|
| EXTRA_SCRIPTS = gimpprint-config
| EXTRA_LTLIBRARIES = libgimpprint.la
resulting in
| `libgimpprint.la' is already going to be installed in `lib'
[...]
Roger> I thought that if you defined something conditionally,
Roger> you were supposed to put it in an EXTRA_PRIMARY
Roger> definition too, so that automake knew the full set of
Roger> stuff that might be built.
Roger> After all, lib_LTLIBRARIES might just as easily be an
Roger> @libobject@ autoconf substitution, where automake won't
Roger> know what might be built. Or, should EXTRA_PRIMARY only
Roger> be used for this type of conditional?
If Automake sees `dir_PRIMARY = fubar' it knows that it must
output some rules to build `fubar', even if `dir_PRIMARY' is
defined conditionally.
However if it sees `dir_PRIMARY = @fubar@', Automake can't guess
what address@hidden@' will be substituted with, and can't output any
rule to build those unknown targets. That's where the
`EXTRA_PRIMARY' helps: it list those targets for which Automake
should output build rules.
Now, you're right that with most primaries adding a superfluous
EXTRA_PRIMARY shouldn't hurt, that's like telling twice to
Automake you need building rules for the listed targets.
*_LTLIBRARIES is different because in order to build the library
you need to know where it will be installed (and pass the
appropriate -rpath option to libtool). That means you can't
install a library in two different places.
>From `foo_LTLIBRARIES = mumble.la' Automake knows that
`mumble.la' will be installed in `$(foodir)'; but from
`EXTRA_LTLIBRARIES = mumble.la' it cannot know where the
`mumble.la' will be installed, it could be somewhere else (so
this justifies the error message). In the latter case, you have
to play some _LDADD trickery to add the right -rpath flag
manually, as said in the Automake manual.
--
Alexandre Duret-Lutz