gbranden pushed a commit to branch master
in repository groff.

commit c9a49a3076b6d699a0e57107a8a2708d5c224d71
Author: G. Branden Robinson <[email protected]>
AuthorDate: Tue Jul 28 16:02:00 2026 -0500

    doc/doc.am: Fix Savannah #68576.
    
    * doc/doc.am: Cut down "automake.pdf"'s excessive make(1) prerequisites.
      The document doesn't require pdfmom(1) and its many transitive
      dependencies; it doesn't use pic(1), eqn(1), or tbl(1) and does not
      use internal hyperlinks, so it does not require multi-pass formatting.
      Define new `DOC_GROFF_MOM` macro for performing a "basic mom(7)
      document build".  (doc/automake.pdf): Drop "pdfmom" as prerequisite.
      Add recipe for this target rule, using new macro.
    
    Fixes <https://savannah.gnu.org/bugs/?68576>.  Thanks to Nguyễn Gia
    Phong and Richard Purdie for the report.
---
 ChangeLog  | 14 ++++++++++++++
 doc/doc.am | 12 +++++++++++-
 2 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index d77855b1c..51a4ab4de 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2026-07-28  G. Branden Robinson <[email protected]>
+
+       * doc/doc.am: Cut down "automake.pdf"'s excessive make(1)
+       prerequisites.  The document doesn't require pdfmom(1) and its
+       many transitive dependencies; it doesn't use pic(1), eqn(1), or
+       tbl(1) and does not use internal hyperlinks, so it does not
+       require multi-pass formatting.  Define new `DOC_GROFF_MOM` macro
+       for performing a "basic mom(7) document build".
+       (doc/automake.pdf): Drop "pdfmom" as prerequisite.  Add recipe
+       for this target rule, using new macro.
+
+       Fixes <https://savannah.gnu.org/bugs/?68576>.  Thanks to Nguyễn
+       Gia Phong and Richard Purdie for the report.
+
 2026-07-28  Richard Purdie <[email protected]>
 
        * doc/doc.am (doc/groff-man-pages.pdf)
diff --git a/doc/doc.am b/doc/doc.am
index be3c533f8..2418b4731 100644
--- a/doc/doc.am
+++ b/doc/doc.am
@@ -41,6 +41,15 @@ DOC_GROFF = \
   GROFF_BIN_PATH="$(GROFF_BIN_PATH)" \
   $(GROFFBIN) $(MFLAG) $(FFLAG) -ww -b
 
+# We need a separate macro for running groff with `-mom`, because (a)
+# mom(7)'s macro package is in "contrib/", not "tmac/", and (b) that
+# package is not "`-ww`-clean".
+DOC_GROFF_MOM = \
+  GROFF_COMMAND_PREFIX= \
+  GROFF_BIN_PATH="$(GROFF_BIN_PATH)" \
+  $(GROFFBIN) -M$(abs_top_srcdir)/contrib/mom $(MFLAG) $(FFLAG) \
+  -mom -wall -b
+
 # There's no point crashing the build due to fonts being unavailable for
 # embedding (or selection, even, when their metrics are missing) if we
 # knew at configuration time that the venture wouldn't come off.
@@ -143,7 +152,8 @@ EXTRA_DIST += $(DOCFILES_NOINST)
 EXTRA_DIST += doc/automake.mom
 docpdfdocdir = $(pdfdocdir)
 nodist_docpdfdoc_DATA = $(PROCESSEDDOCFILES_PDF)
-doc/automake.pdf: doc/automake.mom pdfmom $(TMAC_PACKAGE_MOM)
+doc/automake.pdf: doc/automake.mom $(TMAC_PACKAGE_MOM)
+       $(GROFF_V)$(DOC_GROFF_MOM) -Tpdf $(doc_srcdir)/automake.mom >$@
 
 # GNU PIC html documentation, installed in $(htmldocdir)
 # Other pic*.html files are installed by the local rule

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

Reply via email to