[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 04/06: tmac/{an-old.tmac,doc.tmac-u}: Improve diagnostic.
From: |
G. Branden Robinson |
Subject: |
[groff] 04/06: tmac/{an-old.tmac,doc.tmac-u}: Improve diagnostic. |
Date: |
Fri, 25 Sep 2020 09:33:52 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit c13afda8da1e0a8de3420cae2ea7254f59bb1c8f
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Fri Sep 25 22:09:04 2020 +1000
tmac/{an-old.tmac,doc.tmac-u}: Improve diagnostic.
* tmac/an-old.tmac:
* tmac/doc.tmac-u: Emit more informative fatal diagnostic when installed
version of groff is too old. Report the version found and explicitly
note consequent abort.
I was tempted to get rid of these diagnostics entirely; groff 1.18 is
over 18 years old now. However, CentOS 6.10 is still in maintenance and
ships 1.18.1.4, a bugfix release from 2006, which while new enough to
not trigger them, is still remarkably old to be in deployment.
---
ChangeLog | 7 +++++++
tmac/an-old.tmac | 9 ++++++---
tmac/doc.tmac-u | 7 +++++--
3 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 71813d0..4fd74a7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2020-09-25 G. Branden Robinson <g.branden.robinson@gmail.com>
+ * tmac/an-old.tmac:
+ * tmac/doc.tmac-u: Emit more informative fatal diagnostic when
+ installed version of groff is too old. Report the version found
+ and explicitly note consequent abort.
+
+2020-09-25 G. Branden Robinson <g.branden.robinson@gmail.com>
+
* tmac/tmac.am: Regenerate stripped macro files upon changes to
any of their unstripped counterparts. This is crude, but they
weren't being regenerated at _all_. Defeating a central
diff --git a/tmac/an-old.tmac b/tmac/an-old.tmac
index 03b9f5d..99107ea 100644
--- a/tmac/an-old.tmac
+++ b/tmac/an-old.tmac
@@ -33,12 +33,15 @@
.do nr *groff_an-old_tmac_C \n[.cp]
.cp 0
.
-.if (\n[.x]\n[.y] < 118) \
-. ab You need GNU troff 1.18 or higher to run this version of man!
-.
.\" Define a string for use in diagnostic messages.
.ds an-old an-old.tmac
.
+.if (\n[.x]\n[.y] < 118) \{\
+. ds an-msg \*[an-old]: groff man macros require groff 1.18 or later,
+. as an-msg " but found groff \n[.x].\n[.y]; aborting
+. ab \*[an-msg]
+.\}
+.
.nr need_eo_h 0
.nr need_col2 0
.
diff --git a/tmac/doc.tmac-u b/tmac/doc.tmac-u
index 6877b48..fcd042f 100644
--- a/tmac/doc.tmac-u
+++ b/tmac/doc.tmac-u
@@ -57,8 +57,11 @@
.cp 0
.
.
-.if (\n[.x]\n[.y] < 118) \
-. ab You need GNU troff version 1.18 or higher to run this version of mdoc!
+.if (\n[.x]\n[.y] < 118) \{\
+. ds doc-msg doc.tmac: groff mdoc macros require groff 1.18 or later,
+. as doc-msg " but found groff \n[.x].\n[.y]; aborting
+. ab \*[doc-msg]
+.\}
.
.
.\" Load start-up files
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 04/06: tmac/{an-old.tmac,doc.tmac-u}: Improve diagnostic.,
G. Branden Robinson <=