gbranden pushed a commit to branch master
in repository groff.

commit 334730fcf12b91d1ab4da43526d5b3f93d52d29c
Author: G. Branden Robinson <[email protected]>
AuthorDate: Fri Feb 27 21:39:46 2026 -0600

    doc/doc.am: Fix generation of HTML documents.
    
    * doc/doc.am (doc/pic.html):
      (doc/webpage.html): Restore technique of changing directories into the
      build tree before running "groff -T html"; pre-grohtml assumes that
      the argument to post-grohtml's `-D` option is a file specification
      resolvable relative to HTML "<img src=...>" elements, which is
      inflexible, and prevents us from writing to "[email protected]".
    
    Thanks to Bjarni Ingi Gislason for the report in <https://
    lists.gnu.org/archive/html/groff/2026-02/msg00125.html>.  Problem
    introduced by me in commit e9da162af8, 2026-02-07.
---
 ChangeLog  | 14 ++++++++++++++
 doc/doc.am | 21 +++++++++++++++------
 2 files changed, 29 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 99303335d..ed7877a44 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2026-02-27  G. Branden Robinson <[email protected]>
+
+       * doc/doc.am (doc/pic.html):
+       (doc/webpage.html): Restore technique of changing directories
+       into the build tree before running "groff -T html"; pre-grohtml
+       assumes that the argument to post-grohtml's `-D` option is a
+       file specification resolvable relative to HTML "<img src=...>"
+       elements, which is inflexible, and prevents us from writing to
+       "[email protected]".
+
+       Thanks to Bjarni Ingi Gislason for the report in <https://\
+       lists.gnu.org/archive/html/groff/2026-02/msg00125.html>.
+       Problem introduced by me in commit e9da162af8, 2026-02-07.
+
 2026-02-21  G. Branden Robinson <[email protected]>
 
        * doc/doc.am (doc/webpage.html): Also pass `$(doc_builddir)` as
diff --git a/doc/doc.am b/doc/doc.am
index de9f90581..6cf9db589 100644
--- a/doc/doc.am
+++ b/doc/doc.am
@@ -401,25 +401,34 @@ doc/webpage.ps: $(doc_srcdir)/webpage.ms 
$(TMAC_PACKAGE_MS)
 #      $(GROFF_V)$(MKDIR_P) `dirname $@` \
 #      && $(DOC_GROFF) -Tps -ms $< >$@
 
+# XXX: We have to change directories into `doc_builddir` because
+# pre-grohtml assumes that the argument to post-grohtml's `-D` option is
+# a file specification resolvable relative to HTML "<img src=...>"
+# elements, which is inflexible, and prevents us from writing to
+# "[email protected]".
 doc/pic.html: eqn pic tbl
 doc/pic.html: tmac/www.tmac
 doc/pic.html: $(doc_srcdir)/pic.ms $(TMAC_PACKAGE_MS)
        $(GROFF_V)$(MKDIR_P) $(doc_builddir) \
-       && $(DOC_GROFF) -pet -P-Ipic -P-Ddoc/img -P-jdoc/pic -Thtml \
-         -ms $(doc_srcdir)/pic.ms > [email protected] \
-         && mv [email protected] $@
+       && cd $(doc_builddir) \
+       && $(DOC_GROFF) -pet -P-Ipic -P-Dimg -P-jpic -Thtml -ms \
+         $(doc_srcdir)/pic.ms > pic.html.tmp
+       $(AM_V_at)mv [email protected] $@
 
 # groff(1)'s `-I` implies `-g` and `-s`, so we must depend on grn and
 # soelim even though the document doesn't require them.
+#
+# XXX: See XXX comment before "pic.html" target above.
 doc/webpage.html: grn soelim
 doc/webpage.html: $(DOC_GNU_EPS) tmac/www.tmac tbl
 doc/webpage.html: $(doc_srcdir)/groff.css
 doc/webpage.html: $(doc_srcdir)/webpage.ms $(TMAC_PACKAGE_MS)
        $(GROFF_V)$(MKDIR_P) $(doc_builddir) \
+       && cd $(doc_builddir) \
        && $(DOC_GROFF) -t -I $(doc_srcdir) -I $(doc_builddir) \
-         -P-jdoc/webpage -P-nrb -P-Iwebpage -P-Ddoc/img -Thtml -ms \
-         $(doc_srcdir)/webpage.ms > [email protected] \
-         && mv [email protected] $@
+         -P-jwebpage -P-nrb -P-Iwebpage -P-Dimg -Thtml -ms \
+         $(doc_srcdir)/webpage.ms > webpage.html.tmp
+       $(AM_V_at)mv [email protected] $@
 
 # We remove groff.css only from an out-of-source build tree.
 mostlyclean-local: mostlyclean_doc

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

Reply via email to