NHDT->ANH, in most cases
[aNetHack.git] / sys / unix / Makefile.doc
blob2bcf09f9a3da64e0b5e638d5e040f9b94e458655
1 #       NetHack Makefile.
2 # NetHack 3.6  Makefile.doc     $ANH-Date: 1432512789 2015/05/25 00:13:09 $  $ANH-Branch: master $:$ANH-Revision: 1.14 $
4 # Root of source tree:
5 NHSROOT=..
7 # for Atari
8 # SHELL=E:/GEMINI2/MUPFEL.TTP
10 MAKEDEFS = ../util/makedefs
12 # Which version do we want to build?  (XXX These are not used anywhere.)
13 GUIDEBOOK = Guidebook           # regular ASCII file
14 #GUIDEBOOK = Guidebook.ps       # PostScript file
15 #GUIDEBOOK = Guidebook.dvi      # TeX device-independent file
17 # Some versions of col need -x to keep them from converting spaces to tabs;
18 # some versions of col don't do the conversion by default and don't
19 # recognize the option.  Sigh.
20 COLCMD = col -bx
21 #COLCMD = col -b
23 # The command to use to generate a PostScript file
24 # PSCMD = ditroff | psdit
25 PSCMD = groff
27 # Use the "cat" GUIDECMD if nroff and/or tbl and/or col are not installed
28 # Not appropriate for creating Guidebook.txt.
29 # GUIDECMD = cat Guidebook.txt
30 # The following works better with groff-1.18, eg on Linux
31 # GUIDECMD = $(GUIDE_PREFORMAT) | nroff -c -Tascii | $(COLCMD)
32 GUIDECMD = $(GUIDE_PREFORMAT) | nroff | $(COLCMD)
34 # Only generate output for the current configuration:
35 NHGREP = $(MAKEDEFS) --grep --input - --output -
36 # Generate output for all configurations:
37 #NHGREP = $(MAKEDEFS) --grep --input - --output - --grep-define ALLDOCS
38 # Fallback:
39 #NHGREP = cat
41 GUIDE_PREFORMAT = cat Guidebook.mn | $(NHGREP) | tbl tmac.n -
43 # the basic guidebook
44 Guidebook:      Guidebook.mn
45         $(GUIDECMD) > Guidebook
47 # Fancier output for those with ditroff, psdit and a PostScript printer.
48 Guidebook.ps:   Guidebook.mn
49         $(GUIDE_PREFORMAT) | $(PSCMD) > Guidebook.ps
51 # Guidebook.tex is the same as Guidebook.mn but formatted with LaTeX.
52 # - The invocation command for LaTeX may vary in different installations.
53 # - To print Guidebook.dvi you need to use a suitable dvi-driver.
54 # - LaTeX needs to be run twice; second pass uses Guidebook.aux made by first.
55 Guidebook.dvi:  Guidebook.tex
56         latex Guidebook.tex
57         latex Guidebook.tex
60 GAME    = nethack
61 MANDIR  = /usr/man/man6
62 MANEXT  = 6
64 # manual installation for most BSD-style systems
65 GAMEMANCREATE = cat nethack.6 | $(NHGREP) >
66 LEVMANCREATE = cat lev_comp.6 | $(NHGREP) >
67 DGNMANCREATE = cat dgn_comp.6 | $(NHGREP) >
68 RCVRMANCREATE = cat recover.6 | $(NHGREP) >
69 DLBMANCREATE = cat dlb.6 | $(NHGREP) >
70 MDMANCREATE = cat makedefs.6 | $(NHGREP) >
71 # manual installation for most SYSV-style systems
72 # GAMEMANCREATE = cat nethack.6 | $(NHGREP) | nroff -man - >
73 # LEVMANCREATE = cat lev_comp.6 | $(NHGREP) | nroff -man - >
74 # DGNMANCREATE = cat dgn_comp.6 | $(NHGREP) | nroff -man - >
75 # RCVRMANCREATE = cat recover.6 | $(NHGREP) | nroff -man - >
76 # DLBMANCREATE = cat dlb.6 | $(NHGREP) | nroff -man - >
77 # MDMANCREATE = cat makedefs.6 | $(NHGREP) | nroff -man - >
79 manpages:
80         -$(GAMEMANCREATE) $(MANDIR)/$(GAME).$(MANEXT)
81         -$(LEVMANCREATE) $(MANDIR)/lev_comp.$(MANEXT)
82         -$(DGNMANCREATE) $(MANDIR)/dgn_comp.$(MANEXT)
83         -$(RCVRMANCREATE) $(MANDIR)/recover.$(MANEXT)
84         -$(DLBMANCREATE) $(MANDIR)/dlb.$(MANEXT)
85         -$(MDMANCREATE) $(MANDIR)/makedefs.$(MANEXT)
87 # manual creation for distribution
88 DISTRIB = Guidebook.txt nethack.txt lev_comp.txt dgn_comp.txt recover.txt \
89         dlb.txt makedefs.txt
91 distrib: $(DISTRIB)
92         @echo "Plain text documentation is up to date."
94 Guidebook.txt   : Guidebook.mn tmac.n
95         $(GUIDECMD) > Guidebook.txt
96 MAN2TXT = $(NHGREP) | nroff -man - | $(COLCMD)
97 nethack.txt     : nethack.6
98         cat nethack.6 | $(MAN2TXT) > nethack.txt
99 lev_comp.txt    : lev_comp.6
100         cat lev_comp.6 | $(MAN2TXT) > lev_comp.txt
101 dgn_comp.txt    : dgn_comp.6
102         cat dgn_comp.6 | $(MAN2TXT) > dgn_comp.txt
103 recover.txt     : recover.6
104         cat recover.6 | $(MAN2TXT) > recover.txt
105 dlb.txt         : dlb.6
106         cat dlb.6 | $(MAN2TXT) > dlb.txt
107 makedefs.txt            : makedefs.6
108         cat makedefs.6 | $(MAN2TXT) > makedefs.txt
110 clean:
111         -rm -f Guidebook.aux Guidebook.log
113 spotless: clean
114         -rm -f Guidebook Guidebook.ps Guidebook.dvi
116 maintainer-clean: spotless
117         -rm -f $(DISTRIB)
118 #       -rm -f Makefile