gbranden pushed a commit to branch master
in repository groff.
commit 74b8bf5a1a9d60c38cfa4160f328ac20497cf731
Author: G. Branden Robinson <[email protected]>
AuthorDate: Fri May 16 08:04:22 2025 -0500
Detect grohtml failure better (BUILD FAILS).
* doc/doc.am (doc/pic.html, doc/webpage.html): Create output as a
".tmp"-suffixed file at first, then check for the first of multiple
associated image files we know should exist, moving the target into
place only if it does.
Per the previous commit, now the build truly fails when "groff -Thtml"
does. But only because we're looking for files that should exist, but
don't. Why is groff exiting with status 0?
For that, we need another change.
---
ChangeLog | 9 +++++++++
doc/doc.am | 10 +++++++---
2 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 9157128a0..bfa19df08 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2025-05-16 G. Branden Robinson <[email protected]>
+
+ Make build more sensitive to failure of HTML output.
+
+ * doc/doc.am (doc/pic.html, doc/webpage.html): Create output as
+ a ".tmp"-suffixed file at first, then check for the first of
+ multiple associated image files we know should exist, moving the
+ target into place only if it does.
+
2025-05-15 G. Branden Robinson <[email protected]>
* src/roff/troff/node.cpp (real_output_file::on)
diff --git a/doc/doc.am b/doc/doc.am
index a1c4ad635..82e7ae6d5 100644
--- a/doc/doc.am
+++ b/doc/doc.am
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2024 Free Software Foundation, Inc.
+# Copyright (C) 2002-2025 Free Software Foundation, Inc.
# Original Makefile.sub written by Werner Lemberg <[email protected]>.
# Adapted to Automake by Bertrand Garrigues
# ([email protected]).
@@ -394,7 +394,9 @@ 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
+ $(doc_srcdir)/pic.ms > pic.html.tmp
+ $(AM_V_at)test -f $(doc_builddir)/img/pic-1.png \
+ && 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.
@@ -406,7 +408,9 @@ doc/webpage.html: $(doc_srcdir)/webpage.ms
$(TMAC_PACKAGE_MS)
&& 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
+ > webpage.html.tmp
+ $(AM_V_at)test -f $(doc_builddir)/img/webpage-1.png \
+ && 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