Avoid link failures with separate libtests.a.
authorEric Blake <ebb9@byu.net>
Mon, 10 Dec 2007 16:54:54 +0000 (09:54 -0700)
committerEric Blake <ebb9@byu.net>
Tue, 11 Dec 2007 17:47:42 +0000 (10:47 -0700)
* gnulib-tool (func_emit_tests_Makefile_am): Also list local_ldadd
last, to satisfy circular dependencies.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
gnulib-tool

index d7af7f9..ed8799b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,10 @@
 2007-12-11  Eric Blake  <ebb9@byu.net>
+
+       Avoid link failures with separate libtests.a.
+       * gnulib-tool (func_emit_tests_Makefile_am): Also list local_ldadd
+       last, to satisfy circular dependencies.
+
+2007-12-11  Eric Blake  <ebb9@byu.net>
        and Bruno Haible  <bruno@clisp.org>
 
        Fix OpenBSD 4.0 <float.h> handling of long double.
index 39ac977..eef55a7 100755 (executable)
@@ -1923,7 +1923,10 @@ func_emit_tests_Makefile_am ()
   if $use_libtests; then
     local_ldadd=' libtests.a $(LIBTESTS_LIBDEPS)'
   fi
-  echo "LDADD =${local_ldadd} ${testsbase_inverse}/${sourcebase-lib}/${libname}.${libext}"
+  # local_ldadd must be listed first, since it often depends on non-test
+  # modules; it must also be listed last, since it can include modules
+  # such as progname that satisfy dependencies of non-test modules.
+  echo "LDADD =${local_ldadd} ${testsbase_inverse}/${sourcebase-lib}/${libname}.${libext}${local_ldadd}"
   echo
   if $use_libtests; then
     echo "libtests_a_SOURCES ="