gbranden pushed a commit to branch master
in repository groff.
commit e9da162af80d53128990a6b19237d8c8d416582c
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sat Feb 7 17:04:54 2026 -0600
[doc]: Simplify generation of HTML with groff.
* doc/doc.am: Simplify generation of HTML documents with groff.
(doc/pic.html, doc/webpage.html): Stop changing directories as part of
the target receipe; instead, alter the argument to grohtml's `-j`
option to include the name of the desired subdirectory. Drop test for
existence of separate image files afterward. Since the fix for
Savannah #67133 last May, we should be able to rely on groff to exit
with a nonzero status if grohtml fails. Tested with "make check" and
"make distcheck" in four configurations: the Cartesian product of
{BSD, GNU} make with {in-, out-of-}tree builds.
---
ChangeLog | 13 +++++++++++++
doc/doc.am | 14 +++++---------
2 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 0e352f270..7f7829c84 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2026-02-08 G. Branden Robinson <[email protected]>
+
+ * doc/doc.am: Simplify generation of HTML documents with groff.
+ (doc/pic.html, doc/webpage.html): Stop changing directories as
+ part of the target receipe; instead, alter the argument to
+ grohtml's `-j` option to include the name of the desired
+ subdirectory. Drop test for existence of separate image files
+ afterward. Since the fix for Savannah #67133 last May, we
+ should be able to rely on groff to exit with a nonzero status if
+ grohtml fails. Tested with "make check" and "make distcheck" in
+ four configurations: the Cartesian product of {BSD, GNU} make
+ with {in-, out-of-}tree builds.
+
2026-02-07 G. Branden Robinson <[email protected]>
* src/preproc/tbl/table.cpp (table::compute_overall_width):
diff --git a/doc/doc.am b/doc/doc.am
index ce5d65857..d5a0c9eaf 100644
--- a/doc/doc.am
+++ b/doc/doc.am
@@ -405,10 +405,8 @@ 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) \
- && cd $(doc_builddir) \
- && $(DOC_GROFF) -pet -P-Ipic -P-Dimg -P-jpic -Thtml -ms \
- $(doc_srcdir)/pic.ms > pic.html.tmp
- $(AM_V_at)test -f $(doc_builddir)/img/pic-1.png \
+ && $(DOC_GROFF) -pet -P-Ipic -P-Ddoc/img -P-jdoc/pic -Thtml \
+ -ms $(doc_srcdir)/pic.ms > [email protected] \
&& mv [email protected] $@
# groff(1)'s `-I` implies `-g` and `-s`, so we must depend on grn and
@@ -418,11 +416,9 @@ 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) -P-jwebpage -P-nrb \
- -P-Iwebpage -P-Dimg -Thtml -ms $(doc_srcdir)/webpage.ms \
- > webpage.html.tmp
- $(AM_V_at)test -f $(doc_builddir)/img/webpage-1.png \
+ && $(DOC_GROFF) -t -I $(doc_srcdir) -P-jdoc/webpage -P-nrb \
+ -P-Iwebpage -P-Ddoc/img -Thtml -ms $(doc_srcdir)/webpage.ms \
+ > [email protected] \
&& mv [email protected] $@
# We remove groff.css only from an out-of-source build tree.
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit