Some changes to achieve the following MAN2TXT commands...

If groff version is 1.23 or greater:
nroff -man -Tascii -P -cbou

If groff version is less than 1.23:
nroff -man -Tascii -c | col -b

If non-groff nroff:
nroff -man | col -b

Closes #1153 again.
This commit is contained in:
nhmall
2023-11-28 17:00:28 -05:00
parent 2cf5f725e8
commit 521af751f3
2 changed files with 12 additions and 7 deletions

View File

@@ -115,11 +115,14 @@ Guidebook.dat : Gbk-1pg-pfx.mn Gbk-1pg-sfx.mn $(GUIDEBOOK_MN) tmac.n tmac.nh \
$(ONEPAGECMD) > $@
# plain text output
# MORE_MAN2TXT_FLAGS is included so that a hints file can alter the options
MAN2TXT = $(NHGREP) | nroff -man $(MORE_MAN2TXT_FLAGS)
#
# MAN2TXTPRE and MAN2TXTPOST are included so that a hints file can alter
# both of them as required
MAN2TXTPOST ?= | col -b
MAN2TXT = $(NHGREP) | nroff -man $(MAN2TXTPRE) $(MAN2TXTPOST)
# 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
#MAN2TXT = $(NHGREP) | groff -man -Tascii -P -cbou
nethack.txt : nethack.6
cat nethack.6 | $(MAN2TXT) > nethack.txt
recover.txt : recover.6

View File

@@ -75,14 +75,16 @@ endif # NROFFISGROFF
ifneq "$(NROFFISGROFF)" "" # It's groff
# add the -Tascii flag used by groff
MORE_MAN2TXT_FLAGS += -Tascii
MAN2TXTPRE += -Tascii
ifneq "$(GROFFGE123)" "" # It's groff 1.23 or greater
#$(info GROFFGE123=$(GROFFGE123))
# add the groff 1.23 specific plain text flag -P
MORE_MAN2TXT_FLAGS += -P
MAN2TXTPRE += -P -cbou
MAN2TXTPOST=
else
MAN2TXTPRE += -c
# groff less than 1.23
endif
# add more plain text flags used by groff
MORE_MAN2TXT_FLAGS += -cbou
endif # end groff-specific
#end of hints/include/misc.370