gbranden pushed a commit to branch master
in repository groff.

commit 336f511916d654c8768422c67d8836e96caab95e
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sun Sep 27 21:46:53 2026 -0500

    Unsplit groff's Info manual.
    
    * doc/doc.am ($(GROFF_INFO)): Run `$(MAKEINFO)` with `--no-split`
      option.  Also name the output file explicitly based on expansion of
      the `doc_builddir` macro since that appears to be necessary to support
      in-tree builds from a Git working copy.
    
      (dist-hook, dist-info-bits): Drop prerequisite declaration and target;
      we no longer need to override what Automake does for us to ship our
      Info manual.
    
      (mostlyclean_doc): Stop manually deleting "doc/groff.info-*" files;
      they are no longer created.
    
    Presumably, Info files are split by default due to inertia.  By 1980s
    standards, they can get really big.  Politically correct GNU users only
    ever use Emacs to view Info documents.  But GNU Emacs is itself big by
    those same standards.  So loading a big Info buffer into memory
    alongside one's big editor on a system that had maybe 2-4MB of RAM could
    lead to thrashing.
    
    I propose that Texinfo change this default.  Today, splitting Info files
    yields no benefit.  Observe.
    
    $ for v in 1.22.3 1.22.4 1.23.0 1.24.0 1.24.1 HEAD
      do
        echo "groff $v"
        d="$HOME"/groff-$v/share/info
        (cd "$d" && ls -1hs *info*)
        time emacs --batch --eval '(info "'$d'/groff.info")' 2>/dev/null
        echo
      done
    groff 1.22.3
     12K groff.info
    300K groff.info-1
    400K groff.info-2
    
    real    0m0.113s
    user    0m0.077s
    sys     0m0.036s
    
    groff 1.22.4
     12K groff.info
    296K groff.info-1
    408K groff.info-2
    
    real    0m0.101s
    user    0m0.077s
    sys     0m0.024s
    
    groff 1.23.0
     16K groff.info
    296K groff.info-1
    308K groff.info-2
    236K groff.info-3
    
    real    0m0.101s
    user    0m0.085s
    sys     0m0.016s
    
    groff 1.24.0
     20K groff.info
    296K groff.info-1
    292K groff.info-2
    340K groff.info-3
    
    real    0m0.102s
    user    0m0.085s
    sys     0m0.016s
    
    groff 1.24.1
     20K groff.info
    296K groff.info-1
    292K groff.info-2
    340K groff.info-3
    
    real    0m0.101s
    user    0m0.093s
    sys     0m0.008s
    
    groff HEAD
    1020K groff.info
    
    real    0m0.106s
    user    0m0.077s
    sys     0m0.029s
---
 ChangeLog  | 14 ++++++++++++++
 doc/doc.am | 18 +++++-------------
 2 files changed, 19 insertions(+), 13 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 168f0fd62..6e2608bd7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2026-09-27  G. Branden Robinson <[email protected]>
+
+       Unsplit groff's Info manual.
+
+       * doc/doc.am ($(GROFF_INFO)): Run `$(MAKEINFO)` with
+       `--no-split` option.  Also name the output file explicitly based
+       on expansion of the `doc_builddir` macro since that appears to
+       be necessary to support in-tree builds from a Git working copy.
+       (dist-hook, dist-info-bits): Drop prerequisite declaration and
+       target; we no longer need to override what Automake does for us
+       to ship our Info manual.
+       (mostlyclean_doc): Stop manually deleting "doc/groff.info-*"
+       files; they are no longer created.
+
 2026-09-27  G. Branden Robinson <[email protected]>
 
        * doc/doc.am: Fix code style nit.  Favor interpolation of
diff --git a/doc/doc.am b/doc/doc.am
index cffbdf1d7..0952e2a7c 100644
--- a/doc/doc.am
+++ b/doc/doc.am
@@ -462,7 +462,6 @@ DOC_LL=line-layout
 mostlyclean-local: mostlyclean_doc
 mostlyclean_doc:
        $(RM) $(GROFF_DVI) $(PROCESSEDDOCFILES_PDF)
-       $(RM) doc/groff.info-*
        if test $(top_builddir) != $(top_srcdir); then \
          $(RM) $(top_builddir)/doc/groff.css \
            $(GROFF_HTML) $(GROFF_INFO) $(GROFF_PDF) $(GROFF_TXT) \
@@ -680,6 +679,9 @@ doc/groff.texi: $(top_srcdir)/doc/groff.texi.in
        $(AM_V_GEN)$(MKDIR_P) `dirname $@` \
        && $(DOC_SED) $(top_srcdir)/doc/groff.texi.in >$@
 
+# Do not feed `$(MAKEINFO)` `$(GROFF_INFO)` as the output file, or you
+# will produce a useless stump "groff.info" file when building in-tree.
+# Construct the `-o` argument from `$(doc_builddir)` instead.
 EXTRA_DIST += $(GROFF_INFO)
 MAINTAINERCLEANFILES += $(GROFF_INFO)
 if HAVE_MAKEINFO
@@ -687,21 +689,11 @@ $(GROFF_INFO): doc/groff.texi
        $(AM_V_at)$(MKDIR_P) $(doc_builddir)
        $(AM_V_GEN)LANG=C \
        LC_ALL=C \
-       $(MAKEINFO) -o doc/groff.info --enable-encoding \
+       $(MAKEINFO) -o $(doc_builddir)/groff.info \
+         --no-split --enable-encoding \
          -I $(doc_srcdir) $(doc_builddir)/groff.texi
 endif # HAVE_MAKEINFO
 
-# Distribute the Info files.
-dist-hook: dist-info-bits
-dist-info-bits:
-       chmod u+w $(distdir)/doc
-       for d in $(doc_builddir) $(doc_srcdir); do \
-         if [ -f "$$d"/groff.info ]; then \
-           cp -f "$$d"/groff.info-* $(distdir)/doc; \
-           break; \
-         fi; \
-       done
-
 EXTRA_DIST += doc/groff.txt
 MAINTAINERCLEANFILES += doc/groff.txt
 .texi.txt:

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

Reply via email to