]> Savannah Git Hosting - gnulib.git/commitdiff
gnulib-tool.py: Fix value of LDADD for libtests.
authorCollin Funk <collin.funk1@gmail.com>
Wed, 6 Mar 2024 10:44:39 +0000 (02:44 -0800)
committerBruno Haible <bruno@clisp.org>
Wed, 6 Mar 2024 11:17:13 +0000 (12:17 +0100)
* pygnulib/GLEmiter.py (GLEmiter.tests_Makefile_am): Fix value of LDADD
to match gnulib-tool.

ChangeLog
pygnulib/GLEmiter.py

index 2f6d58c2ddfb32db67186653308cb6f386b60cbb..0af21d2fe4bb50f79e3b6564c4edca6ca83fc93f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-03-06  Collin Funk  <collin.funk1@gmail.com>
+
+       gnulib-tool.py: Fix value of LDADD for libtests.
+       * pygnulib/GLEmiter.py (GLEmiter.tests_Makefile_am): Fix value of LDADD
+       to match gnulib-tool.
+
 2024-03-06  Collin Funk  <collin.funk1@gmail.com>
 
        gnulib-tool.py: Follow gnulib-tool changes, part 44.
index 43c19a402684d23e96f6674d1313fc2b8b709ac0..6b90c4956f35fcc2978650d8045f243045f360b2 100644 (file)
@@ -1156,8 +1156,6 @@ AC_DEFUN([%V1%_LIBSOURCES], [
         emit += '  -I%s/%s -I$(srcdir)/%s/%s\n' % (testsbase_inverse, sourcebase, testsbase_inverse, sourcebase)
         emit += '\n'
 
-        ldadd_before = ''
-        ldadd_after = ''
         if libtests:
             # All test programs need to be linked with libtests.a.
             # It needs to be passed to the linker before ${libname}.${libext},
@@ -1168,13 +1166,13 @@ AC_DEFUN([%V1%_LIBSOURCES], [
             # voluntarily omitted).
             # The LIBTESTS_LIBDEPS can be passed to the linker once or twice, it
             # does not matter.
-            ldadd_before = ' libtests.a'
-            ldadd_after = ' libtests.a $(LIBTESTS_LIBDEPS)'
-        emit += 'LDADD =%s %s/%s/%s.%s libtests.a %s/%s/%s.%s%s\n\n' \
-                % (ldadd_before,
-                   testsbase_inverse, sourcebase, libname, libext,
-                   testsbase_inverse, sourcebase, libname, libext,
-                   ldadd_after)
+            emit += ("LDADD = libtests.a %s/%s/%s.%s libtests.a %s/%s/%s.%s libtests.a $(LIBTESTS_LIBDEPS)\n"
+                     % (testsbase_inverse, sourcebase, libname, libext,
+                        testsbase_inverse, sourcebase, libname, libext))
+        else:
+            emit += ("LDADD = %s/%s/%s.%s\n"
+                     % (testsbase_inverse, sourcebase, libname, libext))
+        emit += '\n'
         if libtests:
             emit += 'libtests_a_SOURCES =\n'
             # Here we use $(LIBOBJS), not @LIBOBJS@. The value is the same. However,