Hi Pádraig,
After pushing my last patch, I noticed that the html post processing
depends on GNU Make being used since MAKEINFO is defined to the
makeinfo-wrapper.sh script in cfg.mk. That file is only included in
GNUMakefile.
What do you think about this patch turning the script into a file to
be created by AC_CONFIG_FILES? I don't think it can be done any other
way, e.g., an environment variable, since MAKEINFO will be defined to
a value with spaces, "${SHELL} build-aux/missing makeinfo".
-- 8< --
* .gitignore (/build-aux/makeinfo-wrapper.sh):
* Makefile.am (EXTRA_DIST): Remove build-aux/makeinfo-wrapper.sh.
* build-aux/makeinfo-wrapper.sh.in: New file, renamed from
build-aux/makeinfo-wrapper.sh and modified to use @MAKEINFO@ instead of
makeinfo.
* cfg.mk (MAKEINFO): Remove variable.
* configure.ac: Add build-aux/makeinfo-wrapper.sh as a configure file.
* doc/local.mk (MAKEINFO): Define to
$(abs_top_srcdir)/build-aux/makeinfo-wrapper.sh.
(MAKEINFOFLAGS): New variable.
---
.gitignore | 1 +
Makefile.am | 1 -
build-aux/{makeinfo-wrapper.sh => makeinfo-wrapper.sh.in} | 2 +-
cfg.mk | 2 --
configure.ac | 2 ++
doc/local.mk | 4 +++-
6 files changed, 7 insertions(+), 5 deletions(-)
rename build-aux/{makeinfo-wrapper.sh => makeinfo-wrapper.sh.in} (97%)
diff --git a/.gitignore b/.gitignore
index 756f2d874..b6a576d56 100644
--- a/.gitignore
+++ b/.gitignore
@@ -29,6 +29,7 @@
/build-aux/config.sub
/build-aux/depcomp
/build-aux/install-sh
+/build-aux/makeinfo-wrapper.sh
/build-aux/mdate-sh
/build-aux/missing
/build-aux/snippet/
diff --git a/Makefile.am b/Makefile.am
index 5a6ebc040..2e9c4ed55 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -32,7 +32,6 @@ EXTRA_DIST = \
bootstrap.conf \
build-aux/gen-lists-of-programs.sh \
build-aux/gen-single-binary.sh \
- build-aux/makeinfo-wrapper.sh \
cfg.mk \
dist-check.mk \
maint.mk \
diff --git a/build-aux/makeinfo-wrapper.sh b/build-aux/makeinfo-wrapper.sh.in
similarity index 97%
rename from build-aux/makeinfo-wrapper.sh
rename to build-aux/makeinfo-wrapper.sh.in
index 41b7ad45d..6acea2f19 100755
--- a/build-aux/makeinfo-wrapper.sh
+++ b/build-aux/makeinfo-wrapper.sh.in
@@ -3,7 +3,7 @@
# only on lines containing "option", corresponding to our @optAnchor macro.
# Note texi uses "-" in anchors for spaces, hence why it escapes - with _002d.
-makeinfo "$@" || exit
+@MAKEINFO@ "$@" || exit
process_html()
{
diff --git a/cfg.mk b/cfg.mk
index 7d8b5013d..1dfa4352a 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -17,8 +17,6 @@
# Used in maint.mk's web-manual rule
manual_title = Core GNU utilities
-# html post processing
-export MAKEINFO = $(abs_top_srcdir)/build-aux/makeinfo-wrapper.sh
# Don't create node redirection files for each anchor
gendocs_options_ = --common --no-node-files
diff --git a/configure.ac b/configure.ac
index bdd6e4038..3c03ddd03 100644
--- a/configure.ac
+++ b/configure.ac
@@ -904,4 +904,6 @@ AC_CONFIG_FILES(
po/Makefile.in
gnulib-tests/Makefile
)
+AC_CONFIG_FILES([build-aux/makeinfo-wrapper.sh],
+ [chmod +x build-aux/makeinfo-wrapper.sh])
AC_OUTPUT
diff --git a/doc/local.mk b/doc/local.mk
index 04ce909e9..6f80cb189 100644
--- a/doc/local.mk
+++ b/doc/local.mk
@@ -25,9 +25,11 @@ doc_coreutils_TEXINFOS = \
doc/fdl.texi \
doc/sort-version.texi
+MAKEINFO = $(abs_top_srcdir)/build-aux/makeinfo-wrapper.sh
+
# The customization variable CHECK_NORMAL_MENU_STRUCTURE is necessary with
# makeinfo versions ≥ 6.8.
-MAKEINFO = @MAKEINFO@ -c CHECK_NORMAL_MENU_STRUCTURE=1
+MAKEINFOFLAGS = -c CHECK_NORMAL_MENU_STRUCTURE=1
# The following is necessary if the package name is 8 characters or longer.
# If the info documentation would be split into 10 or more separate files,
--
2.52.0