gbranden pushed a commit to branch master
in repository groff.

commit e2cd638955de3d8fb664529e76ff41bdc31a102e
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sun Jul 19 08:38:32 2026 -0500

    doc/doc.am: Employ `MAINTAINER_MODE`.
    
    Use GNU Automake's "maintainer mode" to manage maintainer-mode targets.
    
    * configure.ac: Interpolate `AM_MAINTAINER_MODE` macro with "disable"
      argument.
    
    * bootstrap: Note necessity of running the "configure" script with
      `--enable-maintainer-mode` (when building from groff's Git
      repository).
    
    * doc/doc.am: Add targets produced only in maintainer mode to the
      `MAINTAINERCLEANFILES` macro.
    
      ($(DOC_GNU_EPS)):
      ($(DOC_GNU_PNG)):
      ($(DOC_LINE_LAYOUT_EPS)):
      ($(DOC_LINE_LAYOUT_PNG)): Bracket existing target rules in
      `MAINTAINER_MODE` Automake conditional.  Add `else` branch defining
      them with empty recipes for non-maintainer mode.
    
    Fixes excessive build dependencies imposed on distribution archives.
    Thanks to Alexis Hildebrandt for the report in
    <https://lists.gnu.org/archive/html/groff/2026-07/msg00010.html>.
---
 ChangeLog    | 24 ++++++++++++++++++++++++
 bootstrap    |  2 +-
 configure.ac |  2 +-
 doc/doc.am   | 16 ++++++++++++++--
 4 files changed, 40 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index bbcea8778..1900f668c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,27 @@
+2026-07-19  G. Branden Robinson <[email protected]>
+
+       Use GNU Automake's "maintainer mode" to manage maintainer-mode
+       targets.
+
+       * configure.ac: Interpolate `AM_MAINTAINER_MODE` macro with
+       "disable" argument.
+       * bootstrap: Note necessity of running the "configure" script
+       with `--enable-maintainer-mode` (when building from groff's Git
+       repository).
+       * doc/doc.am: Add targets produced only in maintainer mode to
+       the `MAINTAINERCLEANFILES` macro.
+       ($(DOC_GNU_EPS)):
+       ($(DOC_GNU_PNG)):
+       ($(DOC_LINE_LAYOUT_EPS)):
+       ($(DOC_LINE_LAYOUT_PNG)): Bracket existing target rules in
+       `MAINTAINER_MODE` Automake conditional.  Add `else` branch
+       defining them with empty recipes for non-maintainer mode.
+
+       Fixes excessive build dependencies imposed on distribution
+       archives.  Thanks to Alexis Hildebrandt for the report in
+       <https://lists.gnu.org/archive/html/groff/2026-07/\
+       msg00010.html>.
+
 2026-07-17  G. Branden Robinson <[email protected]>
 
        * ChangeLog.124: New file.
diff --git a/bootstrap b/bootstrap
index 19f9424bb..7dc162b59 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1406,7 +1406,7 @@ autogen()
 
   bootstrap_epilogue
 
-  echo "$0: done.  Now you can run './configure'."
+  echo "$0: done.  Now you can run './configure --enable-maintainer-mode'."
 }
 
 # ----------------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index 0597946f4..2f4174577 100644
--- a/configure.ac
+++ b/configure.ac
@@ -38,7 +38,7 @@ AC_CONFIG_SRCDIR([src/roff/groff/groff.cpp])
 AC_USE_SYSTEM_EXTENSIONS
 
 AM_INIT_AUTOMAKE([subdir-objects])
-
+AM_MAINTAINER_MODE([disable])
 AM_SILENT_RULES([yes])
 
 # checks for programs
diff --git a/doc/doc.am b/doc/doc.am
index edf136697..774e9ab45 100644
--- a/doc/doc.am
+++ b/doc/doc.am
@@ -875,8 +875,7 @@ EXTRA_DIST += \
   $(DOC_LINE_LAYOUT_EPS) \
   $(DOC_LINE_LAYOUT_PNG)
 
-# maintainer mode targets
-
+if MAINTAINER_MODE
 $(DOC_GNU_EPS): doc/gnu.xpm
        $(AM_V_GEN)$(MKDIR_P) `dirname $@` \
        && if test "$(XPMTOPPM)" != found; then \
@@ -926,6 +925,19 @@ $(DOC_LINE_LAYOUT_EPS): doc/line-layout.roff pic groff 
troff grops \
 $(DOC_LINE_LAYOUT_PNG): $(DOC_LINE_LAYOUT_EPS)
        $(AM_V_GEN)$(MKDIR_P) `dirname $@` \
        && convert -density 300 $< PNG24:$@
+else
+$(DOC_GNU_EPS) \
+  $(DOC_GNU_PNG) \
+  $(DOC_LINE_LAYOUT_EPS) \
+  $(DOC_LINE_LAYOUT_PNG):
+       @:
+endif # MAINTAINER_MODE
+
+MAINTAINERCLEANFILES += \
+  $(DOC_GNU_EPS) \
+  $(DOC_GNU_PNG) \
+  $(DOC_LINE_LAYOUT_EPS) \
+  $(DOC_LINE_LAYOUT_PNG)
 
 # Local Variables:
 # fill-column: 72

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

Reply via email to