This is the mail archive of the
automake@gnu.org
mailing list for the automake project.
install dependencies are ignored
- From: "Philip Graham Willoughby" <pgw99 at doc dot ic dot ac dot uk>
- To: <automake at gnu dot org>
- Date: Wed, 7 May 2003 12:28:14 +0100
- Subject: install dependencies are ignored
Here's the relevent fragment of my Makefile.am:
pkglib_LTLIBRARIES=libapttlog.la
libapttlog_la_SOURCES=aptt/log/log.c
libapttlog_la_LIBADD=@LIBLTDL@
lib_LTLIBRARIES=libaptttest.la
libaptttest_la_SOURCES=aptt/test/test.c
libaptttest_la_LIBADD=libapttlog.la @LTLIBINTL@
When I run make install, libaptttest.la is always installed first. This
never works, because it depends on libapttlog.la having been installed
previously. I can fix it for my case by changing:
install-exec-am: install-libLTLIBRARIES install-libexecPROGRAMS \
install-pkglibLTLIBRARIES
to:
install-exec-am: install-pkglibLTLIBRARIES install-libLTLIBRARIES \
install-libexecPROGRAMS
but this probably doesn't work for everyone (on the other hand, I would have
thought you always wanted all PROGRAMS targets after all (LT)?LIBRARIES
targets anyway).
As far as I can see, the best way to avoid this in all situations is to
generate dependency rules for make from the LIBADD (and of course, LDADD)
information, something like:
$libdir/libaptttest.la: $pkglibdir/libapttlog.la
-- install rule --
Of course, the rule for $pkglibdir/libapttlog.la would need a similar
dependency on whatever it is that @LIBLTDL@ expands to - this would surely
be slightly tricky because automake never sees the expanded value because
it's not known until configure time.
Regards,
Philip Willoughby