On 02/02/2026 19:18, Pádraig Brady wrote:
On 02/02/2026 18:40, Collin Funk wrote:
Pádraig Brady <[email protected]> writes:

Hrm, even though `export ...` is POSIX supported,
testing on solaris 11 suggests it may give "Badly formed macro assignment".
I suspect that's why it was restricted to cfg.mk and thus GNU make.
I'm thinking perhaps of reverting v9.9-207-g740d33b8d
so that the post processing / web manual is restricted to GNU make.
non-gnu make will still work, just without the adjusted anchors.

If you do that should we add a warning for non-GNU make users when
--enable-manual-url is used?

I worry about a distribution using local manuals and having their built
programs link to anchors that don't exist because they did not use GNU
make.

I suppose.
The other option is to propagate MAKEINFO explicitly in gnulib's web-manual 
rule,
like the following.  Though I'm reluctant to update gnulib again
(I'm unsure of the implications of the gettext update for example).

diff --git a/top/maint.mk b/top/maint.mk
index ad60c8fb11..3475f3733c 100644
--- a/top/maint.mk
+++ b/top/maint.mk
@@ -1740,6 +1740,7 @@ web-manual:
          $(AM_V_GEN)test -z "$(manual_title)" \
            && { echo define manual_title in cfg.mk 1>&2; exit 1; } || :
          $(AM_V_at)cd '$(srcdir)/doc'; \
+         MAKEINFO="$(MAKEINFO)" \
            $(SHELL) ../$(_build-aux)/gendocs.sh $(gendocs_options_) \
               -o '$(abs_builddir)/doc/manual' \
               --email $(PACKAGE_BUGREPORT) $(PACKAGE) \

This does seem to work well,
and we can apply it to coreutils only for now with the attached.

cheers,
Padraig
From d9fb823121b1453359d0c6ed8926d4dbb156c59b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <[email protected]>
Date: Mon, 2 Feb 2026 20:15:17 +0000
Subject: [PATCH] maintainer-makefile: propagate MAKEINFO to gendocs

Make this change temporarily in coreutils.
Move to gnulib after v9.10 is released.

* top/maint.mk (web-manual): Propagate MAKEINFO explicitly,
rather than requiring it exported in the environment,
which can be awkward on Solaris make for example.
---
 cfg.mk               |  2 +-
 gl/local.mk          |  3 ++-
 gl/top/maint.mk.diff | 12 ++++++++++++
 3 files changed, 15 insertions(+), 2 deletions(-)
 create mode 100644 gl/top/maint.mk.diff

diff --git a/cfg.mk b/cfg.mk
index 1dfa4352a..404927f01 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -943,7 +943,7 @@ _ll = ^src/longlong\.h$$
 exclude_file_name_regexp--sc_useless_cpp_parens = $(_ll)
 exclude_file_name_regexp--sc_space_before_open_paren = $(_ll)
 
-tbi_1 = ^tests/pr/|(\.mk|^man/help2man)$$
+tbi_1 = ^tests/pr/|(\.mk|^gl/.*\.diff|^man/help2man)$$
 tbi_2 = ^scripts/git-hooks/(pre-commit|pre-applypatch|applypatch-msg)$$
 tbi_3 = (GNU)?[Mm]akefile(\.am)?$$|$(_ll)
 exclude_file_name_regexp--sc_prohibit_tab_based_indentation = \
diff --git a/gl/local.mk b/gl/local.mk
index 8befebe0a..56ffb5855 100644
--- a/gl/local.mk
+++ b/gl/local.mk
@@ -81,4 +81,5 @@ gl/modules/targetdir \
 gl/modules/xdectoint \
 gl/modules/xfts \
 gl/tests/test-fadvise.c \
-gl/tests/test-rand-isaac.c
+gl/tests/test-rand-isaac.c \
+gl/top/maint.mk.diff
diff --git a/gl/top/maint.mk.diff b/gl/top/maint.mk.diff
new file mode 100644
index 000000000..44b99488a
--- /dev/null
+++ b/gl/top/maint.mk.diff
@@ -0,0 +1,12 @@
+diff --git a/top/maint.mk b/top/maint.mk
+index ad60c8fb11..3475f3733c 100644
+--- a/top/maint.mk
++++ b/top/maint.mk
+@@ -1740,6 +1740,7 @@ web-manual:
+ 	$(AM_V_GEN)test -z "$(manual_title)" \
+ 	  && { echo define manual_title in cfg.mk 1>&2; exit 1; } || :
+ 	$(AM_V_at)cd '$(srcdir)/doc'; \
++	  MAKEINFO="$(MAKEINFO)" \
+ 	  $(SHELL) ../$(_build-aux)/gendocs.sh $(gendocs_options_) \
+ 	     -o '$(abs_builddir)/doc/manual' \
+ 	     --email $(PACKAGE_BUGREPORT) $(PACKAGE) \
-- 
2.52.0

Reply via email to