This patch syncs gnulib-tool.py with changes made to gnulib-tool to
accommodate changes made to the verify-tests module. It seems that this
module caused issues when running in parallel (i.e. "make -j16 check").
The solution to this involved using the EXTRA_PROGRAMS Automake
variable. For this change gnulib-tool had to be updated to emit an
empty assignment of EXTRA_PROGRAMS at the top of $test_dir/Makefile.am.
This prevents Automake from warning about it not being previously set.

This change is trivial but here is a test case just to confirm.

Before patch:
[collin@debian gnulib]$ gnulib-tool.py --create-testdir --dir t1 vma-iter
...
executing aclocal -I ../glm4
executing autoconf
executing autoheader
executing automake --add-missing --copy
Makefile.am:888: error: EXTRA_PROGRAMS must be set with '=' before using '+='
parallel-tests: installing '../build-aux/test-driver'

After patch:
[collin@debian gnulib]$ gnulib-tool.py --create-testdir --dir t1 vma-iter
....
executing aclocal -I ../glm4
executing autoconf
executing autoheader
executing automake --add-missing --copy
parallel-tests: installing '../build-aux/test-driver'
From 80ad36681386e5878a841abcdc3e834629e9a958 Mon Sep 17 00:00:00 2001
From: Collin Funk <collin.fu...@gmail.com>
Date: Thu, 22 Feb 2024 11:27:42 -0800
Subject: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 26.

Follow gnulib-tool change
2017-04-20  Bruno Haible  <br...@clisp.org>
verify tests: Fix spurious failure with parallel make.

* pygnulib/GLEmiter.py (GLEmiter.tests_Makefile_am): Emit initialization
of EXTRA_PROGRAMS so that the verify-tests module does not cause
Automake to warn about the use of "+=" instead of "=".
---
 ChangeLog            | 10 ++++++++++
 gnulib-tool.py.TODO  | 17 -----------------
 pygnulib/GLEmiter.py |  1 +
 3 files changed, 11 insertions(+), 17 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 677e798885..2bd61f3052 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2024-02-22  Collin Funk  <collin.fu...@gmail.com>
+
+	gnulib-tool.py: Follow gnulib-tool changes, part 26.
+	Follow gnulib-tool change
+	2017-04-20  Bruno Haible  <br...@clisp.org>
+	verify tests: Fix spurious failure with parallel make.
+	* pygnulib/GLEmiter.py (GLEmiter.tests_Makefile_am): Emit initialization
+	of EXTRA_PROGRAMS so that the verify-tests module does not cause
+	Automake to warn about the use of "+=" instead of "=".
+
 2024-02-22  Collin Funk  <collin.fu...@gmail.com>
 
 	gnulib-tool.py: Follow gnulib-tool changes, part 25.
diff --git a/gnulib-tool.py.TODO b/gnulib-tool.py.TODO
index 1b4fe26cfc..2b33ae2308 100644
--- a/gnulib-tool.py.TODO
+++ b/gnulib-tool.py.TODO
@@ -877,23 +877,6 @@ Date:   Mon May 15 23:13:57 2017 +0200
 
 --------------------------------------------------------------------------------
 
-commit a7bd2403d2d3e49a8698495e74cdbe6a5261128a
-Author: Bruno Haible <br...@clisp.org>
-Date:   Thu Apr 20 21:27:40 2017 +0200
-
-    verify tests: Fix spurious failure with parallel make.
-
-    * gnulib-tool (func_emit_tests_Makefile_am): Emit initialization of
-    EXTRA_PROGRAMS.
-    * tests/test-verify.sh: Build test-verify-try.o, not test-verify.o.
-    * tests/test-verify-try.c: New file.
-    * modules/verify-tests (Files): Add it.
-    (EXTRA_PROGRAMS): Add test-verify-try.
-    (MOSTLYCLEANFILES): Update accordingly.
-    Reported by Adam James Stewart <ajstew...@anl.gov>.
-
---------------------------------------------------------------------------------
-
 commit 363135016c25696d7a173094715e7f3f2dda3596
 Author: Bruno Haible <br...@clisp.org>
 Date:   Wed Mar 15 23:24:03 2017 +0100
diff --git a/pygnulib/GLEmiter.py b/pygnulib/GLEmiter.py
index f83aa40ea9..c7b1e61fc4 100644
--- a/pygnulib/GLEmiter.py
+++ b/pygnulib/GLEmiter.py
@@ -1001,6 +1001,7 @@ AC_DEFUN([%V1%_LIBSOURCES], [
         emit += 'noinst_PROGRAMS =\n'
         if not for_test:
             emit += 'check_PROGRAMS =\n'
+        emit += 'EXTRA_PROGRAMS =\n'
         emit += 'noinst_HEADERS =\n'
         emit += 'noinst_LIBRARIES =\n'
         if libtests:
-- 
2.39.2

Reply via email to