Build *roff documents with groff warnings enabled.

...some of them, at any rate.  We shut off (1) warnings provoked by Matt
Bishop's "mn" macro package, and (2) warnings spuriously emitted by
groff 1.23 and previous when "-wall" (or "-ww") is specified.

Also update explanatory comments.
This commit is contained in:
G. Branden Robinson
2024-09-10 06:04:14 -05:00
parent e318d21afc
commit d116052796
2 changed files with 11 additions and 1 deletions

View File

@@ -19,6 +19,8 @@ GUIDEBOOK = Guidebook # regular ASCII file
# Some versions of col need -x to keep them from converting spaces to tabs;
# some versions of col don't do the conversion by default and don't
# recognize the option. Sigh.
#
# col is unnecessary, but harmless, with groff. See grotty(1).
COLCMD = col -bx
#COLCMD = col -b

View File

@@ -76,6 +76,13 @@ NROFFISGROFF := $(shell echo `nroff --version | grep "GNU groff version"`)
ifneq "$(NROFFISGROFF)" ""
# get the version of groff and flag if it is gt or eq to 1.23
GROFFGE123 := $(shell expr `echo $(NROFFISGROFF) | cut -f2 -d.` \>= 23)
# or less than 1.24
GROFFLT124 := $(shell expr `echo $(NROFFISGROFF) | cut -f2 -d.` \< 24)
# -Wtab -Wrange are for the sake of tmac.n.
NROFF_FLAGS := -wall -Wtab -Wrange
ifneq "$(GROFFLT124)" ""
NROFF_FLAGS += -Wel -Wscale
endif
endif # NROFFISGROFF
ifneq "$(NROFFISGROFF)" "" # It's groff
@@ -83,7 +90,8 @@ ifneq "$(NROFFISGROFF)" "" # It's groff
MAN2TXTPRE += -Tascii
ifneq "$(GROFFGE123)" "" # It's groff 1.23 or greater
#$(info GROFFGE123=$(GROFFGE123))
# add the groff 1.23 specific plain text flag -P
# nroff in groff 1.23 supports the -P option to pass arguments to the
# output driver. -cbou are flags to grotty(1).
MAN2TXTPRE += -P -cbou
MAN2TXTPOST=
else