]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* Makefile.am (BUILDCHECK_ENVIRONMENT)
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Wed, 5 Oct 2005 08:58:19 +0000 (08:58 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Wed, 5 Oct 2005 08:58:19 +0000 (08:58 +0000)
(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.

ChangeLog
Makefile.am
tests/am-subdir.at
tests/early-libtool.at
tests/link-order.at
tests/old-m4-iface.at
tests/standalone.at
tests/testsuite.at

index f6a56ffea203db8911fbedf1b51ef644eaceb9fe..b88d68cf09a662ee199d1c906a0c0bbdac2ec04a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
 2005-10-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
+       * 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.
 
index bf78fb9be87d3d313cdb56dc48e8e3dc685e708c..ca31ebdef1ff4e25e3cd9061a027ef1d44e71b0b 100644 (file)
@@ -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
index 2258121bd1be0c5e874788b2184741cf5a1703ee..ecbf4e7958ff87416b56f855b09de77410d560d0 100644 (file)
@@ -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
index 62701699fa721042371999b4c3e82ea29fc222c0..d9166a89079b0ecd9327287e1ca3c4626d276562 100644 (file)
@@ -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])
 
index d56d364bdcea72f63a65d802dc0c07fdacb2a096..4b1c58d0cf0bb3f94a1033ac800762993b89d568 100644 (file)
@@ -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
index 61257a7f9ee2a2cdead2ee7e2799bf66924e0d15..0c8eb61dedf446ba1930c5a0b58412135a76b2f8 100644 (file)
@@ -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])
 
index 02809b07bb3e850f1005590ea3f91a03221ec8fc..300b8ec8c3b1551cc0962cdb26b1419d8bf3f181 100644 (file)
@@ -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])
 
index 0f5f8208d77877dd407a3cc431c235ddfee804a9..28c78903e7908b2445bb324c6d41fbae9a9ec563 100644 (file)
@@ -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
 ])