Merge branch 'NetHack-3.7-prepare-for-groff-1.24' of https://github.com/g-branden-robinson/NetHack into NetHack-3.7
This commit is contained in:
+15
-2
@@ -31,8 +31,21 @@
|
|||||||
.lt 70n
|
.lt 70n
|
||||||
.\}
|
.\}
|
||||||
.
|
.
|
||||||
.so tmac.nh \" extra macros which aren't in tmac.n
|
.\" Load extra macros that "tmac.n" doesn't define.
|
||||||
.if !\n(nH .so doc/tmac.nh
|
.de So
|
||||||
|
.ie \n(.g&(\n(.x=1)&(\n(.y>22) .soquiet \\$1
|
||||||
|
.el .so \\$1
|
||||||
|
..
|
||||||
|
.
|
||||||
|
.So tmac.nh
|
||||||
|
.if !\n(nH So doc/tmac.nh
|
||||||
|
.
|
||||||
|
.if !\n(nH \{\
|
||||||
|
.tm fatal error: cannot locate "tmac.nh" macro package
|
||||||
|
.ab
|
||||||
|
.\}
|
||||||
|
.
|
||||||
|
.rm So
|
||||||
.
|
.
|
||||||
.\" building Guidebook.txt doesn't have CR font available; groff 1.23 issues
|
.\" building Guidebook.txt doesn't have CR font available; groff 1.23 issues
|
||||||
.\" a warning each time any font can't be loaded; earlier versions silently
|
.\" a warning each time any font can't be loaded; earlier versions silently
|
||||||
|
|||||||
+1
-1
@@ -99,7 +99,7 @@ only if it is present, to obtain
|
|||||||
.B githash=
|
.B githash=
|
||||||
and
|
and
|
||||||
.B gitbranch=
|
.B gitbranch=
|
||||||
info and include related preprocessor #defines in
|
info and include related preprocessor #defines in
|
||||||
.I date.h
|
.I date.h
|
||||||
file.
|
file.
|
||||||
.br
|
.br
|
||||||
|
|||||||
+1
-1
@@ -29,7 +29,7 @@
|
|||||||
.\" labeled paragraph label (and first line)
|
.\" labeled paragraph label (and first line)
|
||||||
.de PL
|
.de PL
|
||||||
.br
|
.br
|
||||||
\\h'|-\\n(PYu'\\$1\\h'|-\\n(PXu'\ -\ \\c \" back up, output the label, then
|
\\h'|-\\n(PYu'\\$1\\h'|-\\n(PXu'\ -\ \\c\" back up, output the label, then
|
||||||
. \" skip to width-of(" - ") before the
|
. \" skip to width-of(" - ") before the
|
||||||
. \" normal indentation, output the " - "
|
. \" normal indentation, output the " - "
|
||||||
. \" then attach the next line (the
|
. \" then attach the next line (the
|
||||||
|
|||||||
@@ -70,34 +70,38 @@ NROFF = mandoc
|
|||||||
MAN2TXTPRE = -T ascii
|
MAN2TXTPRE = -T ascii
|
||||||
MAN2TXTPOST= | col -b
|
MAN2TXTPOST= | col -b
|
||||||
else
|
else
|
||||||
#detection of groff
|
#
|
||||||
NROFFISGROFF := $(shell echo `nroff --version | grep "GNU groff version"`)
|
# Detect groff.
|
||||||
|
NROFFISGROFF := $(shell echo `nroff --version | grep -c 'GNU.*groff.*version'`)
|
||||||
#$(info NROFFISGROFF=$(NROFFISGROFF))
|
#$(info NROFFISGROFF=$(NROFFISGROFF))
|
||||||
ifneq "$(NROFFISGROFF)" ""
|
ifneq "$(NROFFISGROFF)" "0"
|
||||||
# get the version of groff and flag if it is gt or eq to 1.23
|
# Gather groff's minor version number (register `.y`).
|
||||||
GROFFGE123 := $(shell expr `echo $(NROFFISGROFF) | cut -f2 -d.` \>= 23)
|
GROFFMINORVERSION := $(shell printf '.tm \\n[.y]\n' | nroff 2>&1)
|
||||||
# or less than 1.24
|
#$(info GROFFMINORVERSION=$(GROFFMINORVERSION))
|
||||||
GROFFLT124 := $(shell expr `echo $(NROFFISGROFF) | cut -f2 -d.` \< 24)
|
# Silence warnings produced by tmac.n, which NetHack does not modify.
|
||||||
# -Wtab -Wrange are for the sake of tmac.n.
|
NROFF_FLAGS := -wall -Wrange -Wscale -Wtab
|
||||||
NROFF_FLAGS := -wall -Wtab -Wrange
|
# groff <= 1.23 also supported an "el" warning category that was buggy.
|
||||||
ifneq "$(GROFFLT124)" ""
|
GROFFLE123 := $(shell expr $(GROFFMINORVERSION) \<= 23)
|
||||||
NROFF_FLAGS += -Wel -Wscale
|
#$(info GROFFLE123=$(GROFFLE123))
|
||||||
endif
|
ifeq "$(GROFFLE123)" "1"
|
||||||
endif # NROFFISGROFF
|
NROFF_FLAGS += -Wel
|
||||||
|
endif # end groff less than 1.23
|
||||||
|
endif # end NROFFISGROFF
|
||||||
|
# $(info NROFF_FLAGS=$(NROFF_FLAGS))
|
||||||
|
|
||||||
ifneq "$(NROFFISGROFF)" "" # It's groff
|
ifneq "$(NROFFISGROFF)" "" # It's groff
|
||||||
# add the -Tascii flag used by groff
|
# add the -Tascii flag used by groff
|
||||||
MAN2TXTPRE += -Tascii
|
MAN2TXTPRE += -Tascii
|
||||||
ifneq "$(GROFFGE123)" "" # It's groff 1.23 or greater
|
|
||||||
#$(info GROFFGE123=$(GROFFGE123))
|
|
||||||
# nroff in groff 1.23 supports the -P option to pass arguments to the
|
# nroff in groff 1.23 supports the -P option to pass arguments to the
|
||||||
# output driver. -cbou are flags to grotty(1).
|
# output driver. -cbou are flags to grotty(1).
|
||||||
|
GROFFGE123 := $(shell expr $(GROFFMINORVERSION) \>= 23)
|
||||||
|
#$(info GROFFGE123=$(GROFFGE123))
|
||||||
|
ifeq "$(GROFFGE123)" "1"
|
||||||
MAN2TXTPRE += -P -cbou
|
MAN2TXTPRE += -P -cbou
|
||||||
MAN2TXTPOST=
|
MAN2TXTPOST=
|
||||||
else
|
else
|
||||||
MAN2TXTPRE += -c
|
MAN2TXTPRE += -c
|
||||||
# groff less than 1.23
|
endif # end groff less than 1.23
|
||||||
endif
|
|
||||||
endif # end groff-specific
|
endif # end groff-specific
|
||||||
endif # not USE_MANDOC
|
endif # not USE_MANDOC
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user