Automake does not explicitly add dependencies for -dlopen and -dlpreopen libs. Also, Automake-generated makefiles are not safe for make -j all check
(and other combinations of toplevel targets). This is difficult to fix within Automake without incurring quite a bit of redundancy; so ... This patch fixes these omissions in Libtool's testsuite. Applied to master. FWIW, while testing with Debian package pmake (which is a variant of BSD make) I found a bug in its parallel build mode in conjunction with VPATH described here: <http://bugs.debian.org/494860>. This is exposed with the $(srcdir)/libltdl/stamp-mk rule in the toplevel Makefile of Libtool. Cheers, Ralf 2008-08-12 Ralf Wildenhues <[EMAIL PROTECTED]> Parallel make testsuite fixes. * tests/configure-iface.at (installable libltdl) (--with-ltdl-include/lib, --with-included-ltdl): Add dlopened libmodule.la to main_DEPENDENCIES. * tests/old-m4-iface.at (AC_WITH_LTDL): Likewise, let ltdldemo depend upon module.la and libltdl/libltdlc.la. * tests/testsuite.at (LT_AT_MAKE): Invoke each target in turn, default to 'all'. * tests/early-libtool.at (config.lt): Define 'all' target. diff --git a/tests/configure-iface.at b/tests/configure-iface.at index 5e33eca..38e7824 100644 --- a/tests/configure-iface.at +++ b/tests/configure-iface.at @@ -132,7 +132,7 @@ libmodule_la_LDFLAGS = -module bin_PROGRAMS = main main_LDFLAGS = -dlopen libmodule.la main_LDADD = $(LIBLTDL) -main_DEPENDENCIES = $(LTDLDEPS) +main_DEPENDENCIES = $(LTDLDEPS) libmodule.la ]]) # Install everything! @@ -201,7 +201,7 @@ libmodule_la_LDFLAGS = -module bin_PROGRAMS = main main_LDFLAGS = -dlopen libmodule.la main_LDADD = $(LIBLTDL) -main_DEPENDENCIES = $(LTDLDEPS) +main_DEPENDENCIES = $(LTDLDEPS) libmodule.la ]]) # We don't use 'libtoolize --ltdl', so that we get an error if the test @@ -255,7 +255,7 @@ libmodule_la_LDFLAGS = -module bin_PROGRAMS = main main_LDFLAGS = -dlopen libmodule.la main_LDADD = $(LIBLTDL) -main_DEPENDENCIES = $(LTDLDEPS) +main_DEPENDENCIES = $(LTDLDEPS) libmodule.la ]]) LT_AT_BOOTSTRAP([--ltdl], [-I libltdl/m4], [], [--add-missing], [], diff --git a/tests/early-libtool.at b/tests/early-libtool.at index 74d3a84..75e26a2 100644 --- a/tests/early-libtool.at +++ b/tests/early-libtool.at @@ -168,6 +168,8 @@ LDFLAGS = @LDFLAGS@ COMPILE = $(CC) $(CPPFLAGS) $(CFLAGS) $(DEFAULT_INCLUDES) LINK = $(LIBTOOL) --mode=link --tag=CC $(CC) $(CFLAGS) $(LDFLAGS) -o $@ +all: hell$(EXEEXT) + hell$(EXEEXT): main.$(OBJEXT) libhello.la $(LINK) main.$(OBJEXT) libhello.la diff --git a/tests/old-m4-iface.at b/tests/old-m4-iface.at index f36f97f..3365a2a 100644 --- a/tests/old-m4-iface.at +++ b/tests/old-m4-iface.at @@ -137,7 +137,7 @@ libltdl/libltdlc.la: module.la: module.lo $(LTLINK) module.lo -module -avoid-version -rpath /dev/null [EMAIL PROTECTED]@: [EMAIL PROTECTED]@ [EMAIL PROTECTED]@: [EMAIL PROTECTED]@ module.la libltdl/libltdlc.la $(LTLINK) [EMAIL PROTECTED]@ -dlopen module.la @LIBLTDL@ .SUFFIXES: diff --git a/tests/testsuite.at b/tests/testsuite.at index 4dfc4ab..7a3b01d 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -152,7 +152,10 @@ m4_define([LT_AT_CONFIGURE], # -------------------------- m4_define([LT_AT_MAKE], [( $unset LIBTOOL LIBTOOLIZE - AT_CHECK([$MAKE $1 $2], [0], [ignore], [ignore]) ) + for target in m4_default([$1], [all]) + do + AT_CHECK([$MAKE $target $2], [0], [ignore], [ignore]) + done ) ])