more MAN2TXT follow-up

Following a commit for Issue #1153, g-branden-robinson commented:
> Mac OS X stayed on _groff_ 1.19.2 for over a decade (presumably due to
> _groff_ 1.20 adopting to GNU GPLv3), until finally dropping _groff_
> altogether for macOS Ventura (2022).
>
> There _has_ been an interface change in that time.  The [`-P` option I
> advised about is new to _groff_ 1.23.0 (July 2023)]
> (https://git.savannah.gnu.org/cgit/groff.git/tree/NEWS?h=1.23.0#n86).
> [...]
>
> There is a significant number of _groff_ users via Homebrew (enough that
> we hear from them occasionally via bug reports).  Some of these have
> upgraded to 1.23.0 via that mechanism.
> [...]
>
> `nroff -` is not necessary with any _nroff_ known to me; like many other
> Bell Labs Unix programs, it reads from the standard input stream by default
> if not given any operands.

Action taken:

1. Remove the unnecessary ' -' from the nroff command in Makefile.doc.
2. In the misc.370 file containing make snippets to include, test whether
   groff >= 1.23, and only insert the -P option for 1.23 or greater.
This commit is contained in:
nhmall
2023-11-28 08:00:14 -05:00
parent f6e70bbc58
commit c8f4ad907f
2 changed files with 16 additions and 12 deletions

View File

@@ -115,8 +115,11 @@ Guidebook.dat : Gbk-1pg-pfx.mn Gbk-1pg-sfx.mn $(GUIDEBOOK_MN) tmac.n tmac.nh \
$(ONEPAGECMD) > $@
# plain text output
#MAN2TXT = $(NHGREP) | nroff -man $(MORE_MAN2TXT_FLAGS) - | $(COLCMD)
MAN2TXT = $(NHGREP) | nroff -man $(MORE_MAN2TXT_FLAGS) -
# MORE_MAN2TXT_FLAGS is included so that a hints file can alter the options
MAN2TXT = $(NHGREP) | nroff -man $(MORE_MAN2TXT_FLAGS)
# If you aren't using a hints file, you can uncomment the following
# line if you have groff 1.23 or greater.
#MAN2TXT = $(NHGREP) | nroff -man -Tascii -P -cbou
nethack.txt : nethack.6
cat nethack.6 | $(MAN2TXT) > nethack.txt
recover.txt : recover.6