some macOS doc updates
Allow 'make USE_MANDOC=1 distrib' to be used for generating the doc/*.txt files for systems that have mandoc and may not have groff. (macOS Ventura doesn't include groff in the OS). USE_MANDOC=1 is not restricted only to macOS. Have hints/macOS.370 specify the /usr/share/man/man6 directory for the macOS man pages, so that 'make manpages' will target the correct directory on that platform.
This commit is contained in:
@@ -83,6 +83,7 @@ $(MAKEDEFS) : ../util/makedefs.c ../include/config.h ../src/mdlib.c \
|
|||||||
GAME = nethack
|
GAME = nethack
|
||||||
MANDIR ?= /usr/man/man6
|
MANDIR ?= /usr/man/man6
|
||||||
MANEXT = 6
|
MANEXT = 6
|
||||||
|
NROFF ?= nroff
|
||||||
|
|
||||||
# manual installation for most BSD-style systems
|
# manual installation for most BSD-style systems
|
||||||
GAMEMANCREATE = cat nethack.6 | $(NHGREP) >
|
GAMEMANCREATE = cat nethack.6 | $(NHGREP) >
|
||||||
@@ -119,7 +120,7 @@ Guidebook.dat : Gbk-1pg-pfx.mn Gbk-1pg-sfx.mn $(GUIDEBOOK_MN) tmac.n tmac.nh \
|
|||||||
# MAN2TXTPRE and MAN2TXTPOST are included so that a hints file can alter
|
# MAN2TXTPRE and MAN2TXTPOST are included so that a hints file can alter
|
||||||
# both of them as required
|
# both of them as required
|
||||||
MAN2TXTPOST ?= | col -b
|
MAN2TXTPOST ?= | col -b
|
||||||
MAN2TXT = $(NHGREP) | nroff -man $(MAN2TXTPRE) $(MAN2TXTPOST)
|
MAN2TXT = $(NHGREP) | $(NROFF) -man $(MAN2TXTPRE) $(MAN2TXTPOST)
|
||||||
# If you aren't using a hints file, you can uncomment the following
|
# If you aren't using a hints file, you can uncomment the following
|
||||||
# line if you have groff 1.23 or greater.
|
# line if you have groff 1.23 or greater.
|
||||||
#MAN2TXT = $(NHGREP) | groff -man -Tascii -P -cbou
|
#MAN2TXT = $(NHGREP) | groff -man -Tascii -P -cbou
|
||||||
|
|||||||
@@ -65,6 +65,11 @@ CPLUSPLUS_NEEDED = 1
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifdef USE_MANDOC
|
||||||
|
NROFF = mandoc
|
||||||
|
MAN2TXTPRE=
|
||||||
|
MAN2TXTPOST=
|
||||||
|
else
|
||||||
#detection of groff
|
#detection of groff
|
||||||
NROFFISGROFF := $(shell echo `nroff --version | grep "GNU groff version"`)
|
NROFFISGROFF := $(shell echo `nroff --version | grep "GNU groff version"`)
|
||||||
#$(info NROFFISGROFF=$(NROFFISGROFF))
|
#$(info NROFFISGROFF=$(NROFFISGROFF))
|
||||||
@@ -86,6 +91,7 @@ MAN2TXTPRE += -c
|
|||||||
# groff less than 1.23
|
# groff less than 1.23
|
||||||
endif
|
endif
|
||||||
endif # end groff-specific
|
endif # end groff-specific
|
||||||
|
endif # not USE_MANDOC
|
||||||
|
|
||||||
#end of hints/include/misc.370
|
#end of hints/include/misc.370
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -88,6 +88,9 @@ endif # WANT_WIN_QT
|
|||||||
|
|
||||||
#-INCLUDE misc.370
|
#-INCLUDE misc.370
|
||||||
|
|
||||||
|
# manpages directory
|
||||||
|
MANDIR=/usr/share/man/man6
|
||||||
|
|
||||||
ifeq "$(USE_ASAN)" "1"
|
ifeq "$(USE_ASAN)" "1"
|
||||||
CFLAGS +=-fsanitize=address
|
CFLAGS +=-fsanitize=address
|
||||||
LFLAGS +=-fsanitize=address
|
LFLAGS +=-fsanitize=address
|
||||||
|
|||||||
Reference in New Issue
Block a user