gbranden pushed a commit to branch master
in repository groff.

commit b022f5086cd8b2be6b778a198e7ac15bbce5bd95
Author: G. Branden Robinson <[email protected]>
AuthorDate: Thu Oct 1 01:34:09 2026 -0500

    Fix Savannah #68716.
    
    Revise build of man pages to avoid POSIX-unportable make(1) trick, which
    worked with GNU but not BSD Make.
    
    * Makefile.am (.man): Stop running all man pages through the built
      soelim(1).
    
    * doc/doc.am: Drop prerequisite-only rule of `GROFF_MAN_PAGES_ALL`
      expansion on the built soelim.
    
    * man/groff.7.man: Rename this file...
    * man/groff.7.man.in: ...to this.
    
    * man/man.am: Define new macro `man_srcdir`.  Migrate `EXTRA_DIST` to
      ship maintained form of groff(7) under its new name.  Add the
      constructed version to `MOSTLYCLEANFILES`.
    
      (man/groff.7.man): New target rule uses the built soelim(1) to
      construct this file from its "*.in" counterpart.
    
    Fixes <https://savannah.gnu.org/bugs/?68716>.  Thanks to Ingo Schwarze
    for the report and explanation.
---
 ChangeLog                           | 20 ++++++++++++++++++++
 Makefile.am                         |  2 +-
 doc/doc.am                          |  2 --
 man/{groff.7.man => groff.7.man.in} |  0
 man/man.am                          | 14 +++++++++++---
 5 files changed, 32 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index afd634ea4..068f79cfb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2026-10-01  G. Branden Robinson <[email protected]>
+
+       Revise build of man pages to avoid POSIX-unportable make(1)
+       trick, which worked with GNU but not BSD Make.
+
+       * Makefile.am (.man): Stop running all man pages through the
+       built soelim(1).
+       * doc/doc.am: Drop prerequisite-only rule of
+       `GROFF_MAN_PAGES_ALL` expansion on the built soelim.
+       * man/groff.7.man: Rename this file...
+       * man/groff.7.man.in: ...to this.
+       * man/man.am: Define new macro `man_srcdir`.  Migrate
+       `EXTRA_DIST` to ship maintained form of groff(7) under its new
+       name.  Add the constructed version to `MOSTLYCLEANFILES`.
+       (man/groff.7.man): New target rule uses the built soelim(1) to
+       construct this file from its "*.in" counterpart.
+
+       Fixes <https://savannah.gnu.org/bugs/?68716>.  Thanks to Ingo
+       Schwarze for the report and explanation.
+
 2026-10-01  G. Branden Robinson <[email protected]>
 
        * Makefile.am: Trivially resequence macro definitions.
diff --git a/Makefile.am b/Makefile.am
index a73c72399..d49a5eebc 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -866,7 +866,7 @@ SUFFIXES += .man
             -e "s|[@]TMAC_MDIR[@]|`echo $(tmacdir) | sed -f 
$(makevarescape)`/mm|g" \
             -e "s|[@]TMAC_S_PREFIX[@]|\\\\%$(tmac_s_prefix)|g" \
             -e "s|[@]VERSION[@]|$(VERSION)|g" \
-            $< | $(SOELIMBIN) -I $(srcdir) -I $(builddir) \
+            $< \
             >$@
 
 # Version files - see script "build-aux/git-version-gen".
diff --git a/doc/doc.am b/doc/doc.am
index 0794c5c9d..e85409487 100644
--- a/doc/doc.am
+++ b/doc/doc.am
@@ -283,8 +283,6 @@ GROFF_MAN_PAGES3 = \
 GROFF_MAN_PAGES_ALL = $(GROFF_MAN_PAGES1) $(GROFF_MAN_PAGES2) \
   $(GROFF_MAN_PAGES3)
 
-$(GROFF_MAN_PAGES_ALL): soelim
-
 # This is a convenience target for (re-)generating all the man pages.
 man-all: $(GROFF_MAN_PAGES_ALL)
 
diff --git a/man/groff.7.man b/man/groff.7.man.in
similarity index 100%
rename from man/groff.7.man
rename to man/groff.7.man.in
diff --git a/man/man.am b/man/man.am
index 73e429be5..27f57e5aa 100644
--- a/man/man.am
+++ b/man/man.am
@@ -15,6 +15,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+man_srcdir = $(top_srcdir)/man
+
 man5_MANS += \
   man/groff_font.5 \
   man/groff_out.5 \
@@ -25,19 +27,25 @@ man7_MANS += \
   man/groff.7 \
   man/roff.7
 EXTRA_DIST += \
+  man/groff.7.man.in \
+  man/groff_char.7.man \
+  man/groff_diff.7.man \
   man/groff_font.5.man \
   man/groff_out.5.man \
   man/groff_tmac.5.man \
-  man/groff_char.7.man \
-  man/groff_diff.7.man \
-  man/groff.7.man \
   man/roff.7.man
 
+man/groff.7.man: man/groff.7.man.in soelim
+       $(AM_V_at)$(MKDIR_P) $(top_builddir)/man
+       $(AM_V_GEN)$(SOELIMBIN) $(man_srcdir)/groff.7.man.in > $@
+
 # Case of out-of-source build: we must create the 'man' directory.
 BUILT_SOURCES += man
 man:
        $(MKDIR_P) $(top_builddir)/man
 
+MOSTLYCLEANFILES += \
+   man/groff.7.man
 
 # Local Variables:
 # mode: makefile-automake

_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to