]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* tests/recursive.at: New tests for libltdl as a subdirectory,
authorGary V. Vaughan <gary@gnu.org>
Mon, 7 Nov 2005 14:16:15 +0000 (14:16 +0000)
committerGary V. Vaughan <gary@gnu.org>
Mon, 7 Nov 2005 14:16:15 +0000 (14:16 +0000)
configured and compiled from the toplevel project using a
recursive make..
* tests/testsuite.at: Use it.
* Makefile.am (TESTSUITE_AT): Depend on it.

ChangeLog
Makefile.am
tests/recursive.at [new file with mode: 0644]
tests/testsuite.at

index a7256a0d71b1c1b55525444af9e297693d3b917a..b47312e909dfc199480f662ffe998f31fe96f207 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2005-11-07  Gary V. Vaughan  <gary@gnu.org>
+
+       * tests/recursive.at: New tests for libltdl as a subdirectory,
+       configured and compiled from the toplevel project using a
+       recursive make..
+       * tests/testsuite.at: Use it.
+       * Makefile.am (TESTSUITE_AT): Depend on it.
+
 2005-11-07  Gary V. Vaughan  <gary@gnu.org>
 
        * libltdl/m4/ltdl.m4 (LTDL_INIT): Don't force running
index 0100e444b8eb16d1d68bddd47560c451ad4193c4..f6b03e9e1ad70f616b86ee450e05ce4d1c9b4b6e 100644 (file)
@@ -364,6 +364,7 @@ TESTSUITE_AT        = tests/testsuite.at \
                  tests/libtoolize.at \
                  tests/nonrecursive.at \
                  tests/old-m4-iface.at \
+                 tests/recursive.at \
                  tests/standalone.at \
                  tests/deplibs-ident.at \
                  tests/stresstest.at \
diff --git a/tests/recursive.at b/tests/recursive.at
new file mode 100644 (file)
index 0000000..698fd1b
--- /dev/null
@@ -0,0 +1,110 @@
+# Hand crafted tests for GNU Libtool.                         -*- Autotest -*-
+# Copyright 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+AT_BANNER([Recursive Automake Libltdl.])
+
+# _LTDL_SETUP
+# -----------
+m4_pushdef([_LTDL_SETUP],
+[AT_DATA([configure.ac],
+[[AC_INIT([subdirectory-demo], ]AT_PACKAGE_VERSION[, ]AT_PACKAGE_BUGREPORT[)
+LT_CONFIG_LTDL_DIR([ltdl], [recursive])
+AC_CONFIG_AUX_DIR([ltdl/config])
+AC_CONFIG_MACRO_DIR([ltdl/m4])
+AC_CONFIG_LIBOBJ_DIR([ltdl])
+AM_INIT_AUTOMAKE([foreign])
+LT_INIT
+LT_WITH_LTDL
+AC_CONFIG_FILES([Makefile ltdl/Makefile])
+AC_OUTPUT
+]])
+
+AT_DATA([Makefile.am],
+[[ACLOCAL_AMFLAGS = -I ltdl/m4
+SUBDIRS = ltdl
+lib_LTLIBRARIES = foo.la
+foo_la_LDFLAGS = -module -avoid-version
+]])
+
+echo 'static int dummy = 0;' > foo.c
+])# _LTDL_SETUP
+
+## ------------------------ ##
+## Softlinked libltdl tree. ##
+## ------------------------ ##
+
+AT_SETUP([compiling softlinked libltdl])
+
+_LTDL_SETUP
+
+LT_AT_LIBTOOLIZE([--ltdl])
+AT_CHECK([if test -f ltdl/configure.ac; then false; fi])
+
+LT_AT_AUTORECONF([--force --verbose --install])
+LT_AT_CONFIGURE
+LT_AT_MAKE
+
+AT_CHECK([test -f ltdl/libltdlc.la])
+
+AT_CLEANUP
+
+
+## -------------------- ##
+## Copied libltdl tree. ##
+## -------------------- ##
+
+AT_SETUP([compiling copied libltdl])
+
+_LTDL_SETUP
+
+LT_AT_LIBTOOLIZE([--copy --ltdl])
+AT_CHECK([if test -f ltdl/configure.ac; then false; fi])
+
+LT_AT_AUTORECONF([--force --verbose --install])
+LT_AT_CONFIGURE
+LT_AT_MAKE
+
+AT_CHECK([test -f ltdl/libltdlc.la])
+
+AT_CLEANUP
+
+
+## ------------------------- ##
+## Installable libltdl tree. ##
+## ------------------------- ##
+
+AT_SETUP([installable libltdl])
+
+_LTDL_SETUP
+
+prefix=`pwd`/_inst
+
+LT_AT_LIBTOOLIZE([--copy --ltdl])
+AT_CHECK([if test -f ltdl/configure.ac; then false; fi])
+
+LT_AT_AUTORECONF([--force --verbose --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])
+
+AT_CLEANUP
+
+dnl Be careful not to let the definition leak into other tests
+m4_popdef([_LTDL_SETUP])
index 919f9d3c6115dc2b7e24fe386ab25155bfa4c39f..50a81a3079b98ebd3cc33b4a385f584b5e7a8093 100644 (file)
@@ -165,6 +165,8 @@ m4_include([standalone.at])
 m4_include([subproject.at])
 # nonrecursive libltdl compilation
 m4_include([nonrecursive.at])
+# recursive libltdl compilation
+m4_include([recursive.at])
 # C++ templates tests
 m4_include([template.at])
 # Behaviour of LT_OUTPUT