2 # aNetHack 0.0.1 Makefile.doc $ANH-Date: 1432512789 2015/05/25 00:13:09 $ $ANH-Branch: master $:$ANH-Revision: 1.14 $
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.
23 # The command to use to generate a PostScript file
24 # PSCMD = ditroff | psdit
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
41 GUIDE_PREFORMAT = cat Guidebook.mn | $(NHGREP) | tbl tmac.n -
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
61 MANDIR = /usr/man/man6
64 # manual installation for most BSD-style systems
65 GAMEMANCREATE = cat anethack.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 anethack.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 - >
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 anethack.txt lev_comp.txt dgn_comp.txt recover.txt \
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 anethack.txt : anethack.6
98 cat anethack.6 | $(MAN2TXT) > anethack.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
106 cat dlb.6 | $(MAN2TXT) > dlb.txt
107 makedefs.txt : makedefs.6
108 cat makedefs.6 | $(MAN2TXT) > makedefs.txt
111 -rm -f Guidebook.aux Guidebook.log
114 -rm -f Guidebook Guidebook.ps Guidebook.dvi
116 maintainer-clean: spotless