bug#79381: patch needed after gnulib changed

Bruno Haible via GNU coreutils Bug Reports <[email protected]>
Newsgroups gmane.comp.gnu.core-utils.bugs
Organization GNU
Message-ID <6588502.IomW65sffs@nimes>
Hi,

There was a change today in gnulib, that requires a small change in
packages that use gnulib-tool --with-tests with --makefile-name.
GNU coreutils is one such package.

Currently, './bootstrap' fails like this:
...
autoreconf: running: automake --add-missing --copy --force-missing
gnulib-tests/gnulib.mk:47: error: AM_CFLAGS must be set with '=' before using '+='
gnulib-tests/Makefile.am:1:   'gnulib-tests/gnulib.mk' included from here
gnulib-tests/Makefile.am:3: warning: AM_CFLAGS multiply defined in condition TRUE ...
gnulib-tests/gnulib.mk:47: ... 'AM_CFLAGS' previously defined here
gnulib-tests/Makefile.am:1:   'gnulib-tests/gnulib.mk' included from here
autoreconf: error: automake failed with exit status: 1
./bootstrap: autoreconf failed

The attached proposed patch fixes it.
0001-build-Update-after-gnulib-changed.patch (text/x-patch, 787 B)
From 84346559dc5b8d2c3eaa6d6fb858909840eef00d Mon Sep 17 00:00:00 2001
From: Bruno Haible <[email protected]>
Date: Thu, 4 Sep 2025 00:47:03 +0200
Subject: [PATCH] build: Update after gnulib changed

* gnulib-tests/Makefile.am: Move the AM_CFLAGS assignment before the
'include gnulib.mk'.
---
 gnulib-tests/Makefile.am | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnulib-tests/Makefile.am b/gnulib-tests/Makefile.am
index edaa0a726..05107d141 100644
--- a/gnulib-tests/Makefile.am
+++ b/gnulib-tests/Makefile.am
@@ -1,7 +1,7 @@
-include gnulib.mk
-
 AM_CFLAGS = $(GNULIB_TEST_WARN_CFLAGS) $(WERROR_CFLAGS)
 
+include gnulib.mk
+
 # A few tests are inherently warning-evoking.
 # In the typical case where we use -Werror, exempt the few offenders.
 
-- 
2.50.1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.