Files
nethack/sys/unix/Makefile.doc
PatR bb62ab6fc1 another Guidebook update - mostly NETHACKOPTIONS
Move some 'roff macros from Guidebook.mn to new file tmac.nh.

Header for tmac.nh is not being updated, even after explicitly adding
it to .gitattributes.  I'm not sure what I've done wrong.  (I'm using
'git nhadd doc/' here rather than explicit 'git nhadd doc/tmac.nh'.)

In Guidebook.mn, change the ``setenv NETHACKOPTIONS'' example so that
it fits within one line in Guidebook.txt.  (I looked at 3.4.3's
edition of that file and the example went not just beyond the margin
of the formatted text but beyond 80 columns, so wrapped in an ugly
fashion.)  I had previously changed 'autoquiver' to 'color' to shorten
it, now have changed '!autopickup' to '!leg' to show an example of
truncated option name as well as shorten, and also 'fruit:papaya' to
'fruit:lime' to squeeze out the last two columns needed to fit within
the text margin while retaining 'name:Blue Meanie' as requested.
Guidebook.txt shows both NETHACKOPTIONS examples with indentation
suppressed, Guidebook.ps uses normal indentation (evidently using a
narrower font, even with \f(CR (constant-width Roman) to approximate
TeX's \tt, since the indented example fits fine and looks better).

Some Guidebook.tex catchup.  I suspect that lots of bits and bobs
don't match between Guidebook.mn and Guidebook.tex these days.
Particularly quoting and variant font (italics, bold, \tt) usage.
Also the recently added box around the sample screenshot.  This
modifies the screenshot to match Guidebook.mn's, reflecting change
in status field spacing by STATUS_HILITES.
2018-10-27 00:42:11 -07:00

123 lines
4.1 KiB
Makefile

# NetHack Documentation Makefile.
# NetHack 3.6 Makefile.doc $NHDT-Date: 1540625947 2018/10/27 07:39:07 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.17 $
# Copyright (c) 2015 by Kenneth Lorber, Kensington, Maryland
# NetHack may be freely redistributed. See license for details.
# Root of source tree:
NHSROOT=..
# for Atari
# SHELL=E:/GEMINI2/MUPFEL.TTP
MAKEDEFS = ../util/makedefs
# Which version do we want to build? (XXX These are not used anywhere.)
GUIDEBOOK = Guidebook # regular ASCII file
#GUIDEBOOK = Guidebook.ps # PostScript file
#GUIDEBOOK = Guidebook.dvi # TeX device-independent 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.
COLCMD = col -bx
#COLCMD = col -b
# The command to use to generate a PostScript file
# PSCMD = ditroff | psdit
PSCMD = groff
# Use the "cat" GUIDECMD if nroff and/or tbl and/or col are not installed
# Not appropriate for creating Guidebook.txt.
# GUIDECMD = cat Guidebook.txt
#
# Single page. Might need adjustment to .pl value
# GUIDECMD= $(GUIDE_PREFORMAT) | perl -pe 's/^(.mt)$$/.pl 4720v\n.in 0\n.po 8\n.ll 64m\n$$1/' | nroff -c -Tascii | $(COLCMD)
#
GUIDECMD = $(GUIDE_PREFORMAT) | nroff -c -Tascii | $(COLCMD)
# Only generate output for the current configuration:
NHGREP = $(MAKEDEFS) --grep --input - --output -
# Generate output for all configurations:
#NHGREP = $(MAKEDEFS) --grep --input - --output - --grep-define ALLDOCS
# Fallback:
#NHGREP = cat
GUIDE_PREFORMAT = cat Guidebook.mn | $(NHGREP) | tbl tmac.n -
# the basic guidebook
Guidebook: Guidebook.mn tmac.n tmac.nh
$(GUIDECMD) > Guidebook
# Fancier output for those with ditroff, psdit and a PostScript printer.
Guidebook.ps: Guidebook.mn tmac.n tmac.nh
$(GUIDE_PREFORMAT) | $(PSCMD) > Guidebook.ps
# Guidebook.tex is the same as Guidebook.mn but formatted with LaTeX.
# - The invocation command for LaTeX may vary in different installations.
# - To print Guidebook.dvi you need to use a suitable dvi-driver.
# - LaTeX needs to be run twice; second pass uses Guidebook.aux made by first.
Guidebook.dvi: Guidebook.tex
latex Guidebook.tex
latex Guidebook.tex
GAME = nethack
MANDIR = /usr/man/man6
MANEXT = 6
# manual installation for most BSD-style systems
GAMEMANCREATE = cat nethack.6 | $(NHGREP) >
LEVMANCREATE = cat lev_comp.6 | $(NHGREP) >
DGNMANCREATE = cat dgn_comp.6 | $(NHGREP) >
RCVRMANCREATE = cat recover.6 | $(NHGREP) >
DLBMANCREATE = cat dlb.6 | $(NHGREP) >
MDMANCREATE = cat makedefs.6 | $(NHGREP) >
# manual installation for most SYSV-style systems
# GAMEMANCREATE = cat nethack.6 | $(NHGREP) | nroff -man - >
# LEVMANCREATE = cat lev_comp.6 | $(NHGREP) | nroff -man - >
# DGNMANCREATE = cat dgn_comp.6 | $(NHGREP) | nroff -man - >
# RCVRMANCREATE = cat recover.6 | $(NHGREP) | nroff -man - >
# DLBMANCREATE = cat dlb.6 | $(NHGREP) | nroff -man - >
# MDMANCREATE = cat makedefs.6 | $(NHGREP) | nroff -man - >
manpages:
-$(GAMEMANCREATE) $(MANDIR)/$(GAME).$(MANEXT)
-$(LEVMANCREATE) $(MANDIR)/lev_comp.$(MANEXT)
-$(DGNMANCREATE) $(MANDIR)/dgn_comp.$(MANEXT)
-$(RCVRMANCREATE) $(MANDIR)/recover.$(MANEXT)
-$(DLBMANCREATE) $(MANDIR)/dlb.$(MANEXT)
-$(MDMANCREATE) $(MANDIR)/makedefs.$(MANEXT)
# manual creation for distribution
DISTRIB = Guidebook.txt nethack.txt lev_comp.txt dgn_comp.txt recover.txt \
dlb.txt makedefs.txt
distrib: $(DISTRIB)
@echo "Plain text documentation is up to date."
Guidebook.txt : Guidebook.mn tmac.n tmac.nh
$(GUIDECMD) > Guidebook.txt
MAN2TXT = $(NHGREP) | nroff -man - | $(COLCMD)
nethack.txt : nethack.6
cat nethack.6 | $(MAN2TXT) > nethack.txt
lev_comp.txt : lev_comp.6
cat lev_comp.6 | $(MAN2TXT) > lev_comp.txt
dgn_comp.txt : dgn_comp.6
cat dgn_comp.6 | $(MAN2TXT) > dgn_comp.txt
recover.txt : recover.6
cat recover.6 | $(MAN2TXT) > recover.txt
dlb.txt : dlb.6
cat dlb.6 | $(MAN2TXT) > dlb.txt
makedefs.txt : makedefs.6
cat makedefs.6 | $(MAN2TXT) > makedefs.txt
clean:
-rm -f Guidebook.aux Guidebook.log
spotless: clean
-rm -f Guidebook Guidebook.ps Guidebook.dvi
maintainer-clean: spotless
-rm -f $(DISTRIB)
# -rm -f Makefile