Subject: patch needed after gnulib changed

From: Bruno Haible <[email-masked]>
Date: Thu, 04 Sep 2025 00:49:23 +0200

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.

>From 84346559dc5b8d2c3eaa6d6fb858909840eef00d Mon Sep 17 00:00:00 2001
From: Bruno Haible <[email-masked]>
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