musl libc build, rather than glibc
We've had reports of a couple of issues building against musl libc.
Issues reported:
- build procedures utilize cat for Guidebook-creation, and cat
is deprecated in distros that use musl libc.
- some of the CRASHREPORT code is using library functions that
are not available in the musl libc environment. The reported
functions were backtrace() and backtrace_symbols(), which use
header file /usr/include/execinfo.h.
So we'll try to accommodate this. Since we don't have a means of
autodetecting the musl libc situation during the build (as of yet), the
builder will have to specify 'make musl=1' on the make command line.
Specifying 'musl=1' on the make command line will:
1. ensure that NOCRASHREPORT gets defined in the C preprocessor.
2. set COLCMD to be '../util/stripbs' instead of 'col -bx'.
Closes #1393
This commit is contained in:
@@ -11,6 +11,8 @@ NHSROOT=..
|
||||
|
||||
MAKEDEFS = ../util/makedefs
|
||||
|
||||
#STRIPBS ?= ../util/stripbs
|
||||
|
||||
# Which version do we want to build? (XXX These are not used anywhere.)
|
||||
GUIDEBOOK = Guidebook # regular ASCII file
|
||||
#GUIDEBOOK = Guidebook.ps # PostScript file
|
||||
@@ -21,8 +23,9 @@ GUIDEBOOK = Guidebook # regular ASCII file
|
||||
# recognize the option. Sigh.
|
||||
#
|
||||
# col is unnecessary, but harmless, with groff. See grotty(1).
|
||||
COLCMD = col -bx
|
||||
#COLCMD = col -b
|
||||
COLCMD ?= col -bx
|
||||
#COLCMD ?= col -b
|
||||
#COLCMD ?= $(STRIPBS)
|
||||
|
||||
# The command to use to generate a PostScript file
|
||||
# PSCMD = ditroff | psdit
|
||||
@@ -59,8 +62,8 @@ ONEPAGE_PREFORMAT = cat Gbk-1pg-pfx.mn $(GUIDEBOOK_MN) Gbk-1pg-sfx.mn \
|
||||
| $(NHGREP) | tbl tmac.n -
|
||||
|
||||
# the basic guidebook
|
||||
Guidebook : $(GUIDEBOOK_MN) tmac.n tmac.nh $(NEEDMAKEDEFS)
|
||||
$(GUIDECMD) > Guidebook
|
||||
Guidebook : $(GUIDEBOOK_MN) tmac.n tmac.nh $(NEEDMAKEDEFS) $(STRIPBS)
|
||||
-$(GUIDECMD) > Guidebook
|
||||
|
||||
# Fancier output for those with ditroff, psdit and a PostScript printer.
|
||||
# Could be converted to Guidebook.pdf if tool(s) for that are available.
|
||||
@@ -80,7 +83,10 @@ Guidebook.dvi : $(GUIDEBOOK_TEX)
|
||||
# (note: 'make makedefs', not 'make $(MAKEDEFS)')
|
||||
$(MAKEDEFS) : ../util/makedefs.c ../include/config.h ../src/mdlib.c \
|
||||
../util/mdgrep.h
|
||||
( cd ../util ; make makedefs )
|
||||
( cd .. ; make makedefs )
|
||||
|
||||
../util/stripbx: ../util/stripbs.c
|
||||
( cd .. ; $(MAKE) stripbs )
|
||||
|
||||
GAME = nethack
|
||||
MANDIR ?= /usr/man/man6
|
||||
|
||||
Reference in New Issue
Block a user