From: Collin Funk Date: Sun, 18 Jan 2026 05:23:15 +0000 (-0800) Subject: doc: post process html with non-GNU make programs X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=740d33b8da14cf410057249f884cf7a612b28d6b;p=thirdparty%2Fcoreutils.git doc: post process html with non-GNU make programs * .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_builddir)/build-aux/makeinfo-wrapper.sh. (AM_MAKEINFOFLAGS): Move over some values from the previous MAKEINFO definition. --- diff --git a/.gitignore b/.gitignore index 756f2d8740..b6a576d562 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 5a6ebc0406..2e9c4ed552 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 41b7ad45d7..6acea2f19e 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 7d8b5013d7..1dfa4352a9 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 bdd6e4038e..3c03ddd036 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 04ce909e9b..129def7cdb 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_builddir)/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 +AM_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, @@ -37,7 +39,7 @@ MAKEINFO = @MAKEINFO@ -c CHECK_NORMAL_MENU_STRUCTURE=1 # Otherwise, it would also generate files with names like .info-[123], # and those names all map to one 14-byte name (.info-) on some crufty # old systems. -AM_MAKEINFOFLAGS = --no-split +AM_MAKEINFOFLAGS += --no-split doc/constants.texi: $(top_srcdir)/src/tail.c $(top_srcdir)/src/shred.c $(AM_V_GEN)LC_ALL=C; export LC_ALL; \