From: Ralf Wildenhues Date: Wed, 5 Oct 2005 08:58:19 +0000 (+0000) Subject: * Makefile.am (BUILDCHECK_ENVIRONMENT) X-Git-Tag: release-2-1b~477 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9086d5c9fa248f32e5e9a3c73dbc6c848c422f7a;p=thirdparty%2Flibtool.git * Makefile.am (BUILDCHECK_ENVIRONMENT) (INSTALLCHECK_ENVIRONMENT): New macros. (check-local, installcheck-local): Use them. * tests/testsuite.at (PREPARE_TESTS): Extract host_alias, ECHO. Set configure_options appropriately. (LT_AT_CONFIGURE, LT_AT_AUTORECONF, LT_AT_MAKE): New macros. (LT_AT_BOOTSTRAP): Use them. * tests/am-subdir.at, tests/early-libtool.at, tests/old-m4-iface.at, tests/standalone.at: Likewise. * tests/link-order.test: Do not extract ECHO any more. --- diff --git a/ChangeLog b/ChangeLog index f6a56ffea..b88d68cf0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,16 @@ 2005-10-05 Ralf Wildenhues + * Makefile.am (BUILDCHECK_ENVIRONMENT) + (INSTALLCHECK_ENVIRONMENT): New macros. + (check-local, installcheck-local): Use them. + * tests/testsuite.at (PREPARE_TESTS): Extract host_alias, ECHO. + Set configure_options appropriately. + (LT_AT_CONFIGURE, LT_AT_AUTORECONF, LT_AT_MAKE): New macros. + (LT_AT_BOOTSTRAP): Use them. + * tests/am-subdir.at, tests/early-libtool.at, + tests/old-m4-iface.at, tests/standalone.at: Likewise. + * tests/link-order.test: Do not extract ECHO any more. + * libltdl/m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER): Require AC_CANONICAL_HOST and _LT_DECL_SED. diff --git a/Makefile.am b/Makefile.am index bf78fb9be..ca31ebdef 100644 --- a/Makefile.am +++ b/Makefile.am @@ -492,6 +492,9 @@ TESTS_ENVIRONMENT = MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" \ FC="$(FC)" FCFLAGS="$(FCFLAGS)" \ GCJ="$(GCJ)" GCJFLAGS="$(GCJFLAGS)" +BUILDCHECK_ENVIRONMENT = _lt_pkgdatadir="$(abs_top_srcdir)" +INSTALLCHECK_ENVIRONMENT = + check-recursive: $(srcdir)/$(TESTSUITE) # Use `$(srcdir)' for the benefit of non-GNU makes: this is @@ -520,12 +523,12 @@ CD_TESTDIR = abs_srcdir=`$(lt__cd) $(srcdir) && pwd`; cd tests # Hook the test suite into the check rule check-local: tests/atconfig $(srcdir)/$(TESTSUITE) $(CD_TESTDIR); \ - $(TESTS_ENVIRONMENT) $(SHELL) $$abs_srcdir/$(TESTSUITE) $(TESTSUITE_FLAGS) + $(TESTS_ENVIRONMENT) $(BUILDCHECK_ENVIRONMENT) $(SHELL) $$abs_srcdir/$(TESTSUITE) $(TESTSUITE_FLAGS) # Run the test suite on the *installed* tree. installcheck-local: $(CD_TESTDIR); \ - $(TESTS_ENVIRONMENT) $(SHELL) $$abs_srcdir/$(TESTSUITE) $(TESTSUITE_FLAGS) AUTOTEST_PATH=$(exec_prefix)/bin + $(TESTS_ENVIRONMENT) $(INSTALLCHECK_ENVIRONMENT) $(SHELL) $$abs_srcdir/$(TESTSUITE) $(TESTSUITE_FLAGS) AUTOTEST_PATH=$(exec_prefix)/bin # We need to remove any file droppings left behind by testsuite clean-local: clean-local-legacy diff --git a/tests/am-subdir.at b/tests/am-subdir.at index 2258121bd..ecbf4e795 100644 --- a/tests/am-subdir.at +++ b/tests/am-subdir.at @@ -74,7 +74,7 @@ AT_DATA(expout, ]]) LT_AT_BOOTSTRAP -"${MAKE-make}" +LT_AT_MAKE LT_AT_EXEC_CHECK([subdir/subdemo], 0, expout) AT_CLEANUP @@ -149,7 +149,7 @@ int libsub::sub (void) { return 27; } ]]) LT_AT_BOOTSTRAP -"${MAKE-make}" +LT_AT_MAKE LT_AT_EXEC_CHECK([subdir/subdemo], 0) AT_CLEANUP diff --git a/tests/early-libtool.at b/tests/early-libtool.at index 62701699f..d9166a890 100644 --- a/tests/early-libtool.at +++ b/tests/early-libtool.at @@ -102,11 +102,11 @@ exit 0 _EOF chmod a+x missing -test -f ltmain.sh || LT_AT_LIBTOOLIZE([--copy --verbose --install]) -test -f aclocal.m4 || $ACLOCAL -I m4 || exit 1 -test -f configure || $AUTOCONF --force || exit 1 -test -f Makefile || ./configure || exit 1 -${MAKE-make} +LT_AT_LIBTOOLIZE([--copy --verbose --install]) +LT_AT_ACLOCAL([-I m4]) +LT_AT_AUTOCONF([--force]) +LT_AT_CONFIGURE +LT_AT_MAKE LT_AT_EXEC_CHECK([./hell], [0], [expout]) @@ -206,11 +206,11 @@ exit 0 _EOF chmod a+x missing -test -f ltmain.sh || LT_AT_LIBTOOLIZE([--copy --verbose --install]) -test -f aclocal.m4 || $ACLOCAL -I m4 || exit 1 -test -f configure || $AUTOCONF --force || exit 1 -test -f Makefile || ./configure || exit 1 -${MAKE-make} +LT_AT_LIBTOOLIZE([--copy --verbose --install]) +LT_AT_ACLOCAL([-I m4]) +LT_AT_AUTOCONF([--force]) +LT_AT_CONFIGURE +LT_AT_MAKE LT_AT_EXEC_CHECK([./hell], [0], [expout]) diff --git a/tests/link-order.at b/tests/link-order.at index d56d364bd..4b1c58d0c 100644 --- a/tests/link-order.at +++ b/tests/link-order.at @@ -19,7 +19,6 @@ # link-order.test - make sure that library linking order matches AT_SETUP([Link order test.]) -eval `$LIBTOOL --config | grep ECHO=` LDFLAGS="$LDFLAGS -no-undefined" prefix_old=`pwd`/old diff --git a/tests/old-m4-iface.at b/tests/old-m4-iface.at index 61257a7f9..0c8eb61de 100644 --- a/tests/old-m4-iface.at +++ b/tests/old-m4-iface.at @@ -67,7 +67,7 @@ int main (int argc, char **argv) } ]]) -test -f ltmain.sh || LT_AT_LIBTOOLIZE([--install]) +LT_AT_LIBTOOLIZE([--install]) # This is slightly bogus, since only libtool.m4 was required in aclocal.m4 # with libtool-1.5x... @@ -76,9 +76,9 @@ test -f aclocal.m4 \ "$macrodir/ltsugar.m4" "$macrodir/ltversion.m4" > aclocal.m4 \ || exit 1 -test -f configure || $AUTOCONF --force || exit 1 -test -f Makefile || ./configure || exit 1 -${MAKE-make} +LT_AT_AUTOCONF([--force]) +LT_AT_CONFIGURE +LT_AT_MAKE LT_AT_EXEC_CHECK([./old], 0, [Hello, World!]) @@ -183,11 +183,11 @@ foo (const char *str) ]]) touch config.h.in # bug in current ltdl.m4 -test -f ltmain.sh || LT_AT_LIBTOOLIZE([--ltdl --install]) -test -f aclocal.m4 || $ACLOCAL -I libltdl/m4 || exit 1 -test -f configure || $AUTOCONF --force || exit 1 -test -f Makefile || ./configure || exit 1 -${MAKE-make} +LT_AT_LIBTOOLIZE([--ltdl --install]) +LT_AT_ACLOCAL([-I libltdl/m4]) +LT_AT_AUTOCONF([--force]) +LT_AT_CONFIGURE +LT_AT_MAKE LT_AT_EXEC_CHECK([./old], 0, [bar]) diff --git a/tests/standalone.at b/tests/standalone.at index 02809b07b..300b8ec8c 100644 --- a/tests/standalone.at +++ b/tests/standalone.at @@ -26,8 +26,8 @@ AT_BANNER([Standalone Libltdl.]) AT_SETUP([compiling softlinked libltdl]) LT_AT_LIBTOOLIZE([--ltdl=.]) -./configure -${MAKE-make} +LT_AT_CONFIGURE +LT_AT_MAKE AT_CHECK([test -f libltdlc.la]) @@ -41,8 +41,8 @@ AT_CLEANUP AT_SETUP([compiling copied libltdl]) LT_AT_LIBTOOLIZE([--copy --ltdl=.]) -./configure -${MAKE-make} +LT_AT_CONFIGURE +LT_AT_MAKE AT_CHECK([test -f libltdlc.la]) @@ -58,8 +58,8 @@ AT_SETUP([installable libltdl]) prefix=`pwd`/_inst LT_AT_LIBTOOLIZE([--copy --ltdl=.]) -./configure --enable-ltdl-install --prefix=$prefix -${MAKE-make} all install +LT_AT_CONFIGURE([--enable-ltdl-install --prefix=$prefix]) +LT_AT_MAKE([all install]) AT_CHECK([test -f $prefix/lib/libltdl.la]) AT_CHECK([test -f $prefix/include/ltdl.h]) @@ -135,7 +135,7 @@ TARGETS = libltdl/libltdlc.la module.la ltdldemo$(EXEEXT) all: $(TARGETS) $(LIBTOOL) libltdl/libltdlc.la: - cd libltdl && ./configure && $(MAKE) + cd libltdl && ./configure $(CONFIGURE_OPTIONS) && $(MAKE) ltdldemo$(EXEEXT): $(LIBTOOL) module.la libltdl/libltdlc.la main.lo $(LTLINK) -o ltdldemo main.lo -dlopen module.la ./libltdl/libltdlc.la @@ -151,8 +151,9 @@ module.lo: $(LIBTOOL) module.c ]]) LT_AT_LIBTOOLIZE([--copy --ltdl]) -${MAKE-make} CC="$CC" LIBTOOLFLAGS="$LIBTOOLFLAGS" CPPFLAGS="$CPPFLAGS" \ - CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" +LT_AT_MAKE([], [CC="$CC" LIBTOOLFLAGS="$LIBTOOLFLAGS" CPPFLAGS="$CPPFLAGS" \ + CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" \ + CONFIGURE_OPTIONS="$configure_options"]) LT_AT_EXEC_CHECK([./ltdldemo], 0, [ignore]) diff --git a/tests/testsuite.at b/tests/testsuite.at index 0f5f8208d..28c78903e 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -24,17 +24,23 @@ m4_divert_push([PREPARE_TESTS])dnl : ${ACLOCAL=aclocal} : ${AUTOHEADER=autoheader} : ${AUTOCONF=autoconf} +: ${AUTOMAKE=automake} : ${AUTORECONF=autoreconf} -export LIBTOOLIZE LIBTOOL ACLOCAL AUTOHEADER AUTOCONF AUTORECONF +export LIBTOOLIZE LIBTOOL ACLOCAL AUTOHEADER AUTOCONF AUTOMAKE AUTORECONF macrodir="$abs_top_srcdir/libltdl/m4" eval `$LIBTOOL --config | grep ^EGREP=` -eval `$LIBTOOL --config | $EGREP '^(host|host_os|build)='` +eval `$LIBTOOL --config | $EGREP '^(host|host_os|host_alias|build|ECHO)='` +configure_options= +if test -n "$host_alias"; then + configure_options="--host $host_alias" +fi m4_divert_pop([PREPARE_TESTS])dnl + # LT_AT_LIBTOOLIZE([ARGS]) # ------------------------ m4_define([LT_AT_LIBTOOLIZE], -[_lt_pkgdatadir="$abs_top_srcdir" "$LIBTOOLIZE" $1 +[$LIBTOOLIZE $1 ]) @@ -46,14 +52,47 @@ m4_define([LT_AT_CHECK_LIBTOOLIZE], ]) +# LT_AT_ACLOCAL([OPTIONS]) +# -------------------------- +m4_define([LT_AT_ACLOCAL], +[AT_CHECK([$ACLOCAL $1], [0], [ignore], [ignore]) +]) + + +# LT_AT_AUTOCONF([OPTIONS]) +# -------------------------- +m4_define([LT_AT_AUTOCONF], +[AT_CHECK([$AUTOCONF $1], [0], [ignore], [ignore]) +]) + + +# LT_AT_AUTORECONF([OPTIONS]) +# -------------------------- +m4_define([LT_AT_AUTORECONF], +[AT_CHECK([$AUTORECONF $1], [0], [ignore], [ignore]) +]) + + +# LT_AT_CONFIGURE([OPTIONS]) +# -------------------------- +m4_define([LT_AT_CONFIGURE], +[AT_CHECK([./configure $configure_options $1], [0], [ignore], [ignore]) +]) + + +# LT_AT_MAKE([TGTS], [VARS]) +# -------------------------- +m4_define([LT_AT_MAKE], +[AT_CHECK([$2 $MAKE -e $1], [0], [ignore], [ignore]) +]) + + # LT_AT_BOOTSTRAP # --------------- m4_define([LT_AT_BOOTSTRAP], -[ -test -f ./ltmain.sh || LT_AT_LIBTOOLIZE([--copy]) -test -f ./configure || _lt_pkgdatadir="$abs_top_srcdir" ${AUTORECONF} --force --verbose --install || exit 1 -test -f ./configure || exit 1 -./configure +[LT_AT_LIBTOOLIZE([--copy]) +LT_AT_AUTORECONF([--force --verbose --install]) +LT_AT_CONFIGURE ])