]> git.sur5r.net Git - cc65/blob - doc/Makefile
Fixed a typo.
[cc65] / doc / Makefile
1 # -*- makefile -*-
2 #
3 # Makefile for the cc65 documentation
4 #
5
6 # You can put navigation-arrow pictures (next, back, contents) into HTML files
7 # by setting this variable, either here or on make's command-line.
8 # (You will need to copy the .png files from "share/doc/linuxdoc-tools*/html/".)
9 #
10 #BUTTONS=-I
11
12 # These options decide how text files are made:
13 # -f -- removes the backspace-overtyping that makes bold text
14 #       in the more/less commands and on typewriter-printers
15 # -m -- makes Unix manual pages
16 #
17 #TXT_OPTIONS=-f -m
18
19 SGML =  apple2.sgml     \
20         apple2enh.sgml  \
21         ar65.sgml       \
22         atari.sgml      \
23         atmos.sgml      \
24         c128.sgml       \
25         c16.sgml        \
26         c64.sgml        \
27         ca65.sgml       \
28         ca65html.sgml   \
29         cbm510.sgml     \
30         cbm610.sgml     \
31         cc65.sgml       \
32         cl65.sgml       \
33         co65.sgml       \
34         coding.sgml     \
35         customizing.sgml\
36         da65.sgml       \
37         debugging.sgml  \
38         dio.sgml        \
39         funcref.sgml    \
40         geos.sgml       \
41         grc65.sgml      \
42         index.sgml      \
43         intro.sgml      \
44         ld65.sgml       \
45         library.sgml    \
46         lynx.sgml       \
47         using-make.sgml \
48         nes.sgml        \
49         od65.sgml       \
50         pet.sgml        \
51         plus4.sgml      \
52         supervision.sgml\
53         vic20.sgml
54
55 TXT  =  $(SGML:.sgml=.txt)
56 HTML =  $(SGML:.sgml=.html)
57 INFO =  $(SGML:.sgml=.info)
58 DVI  =  $(SGML:.sgml=.dvi)
59 TEX  =  $(SGML:.sgml=.tex)
60
61 # ------------------------------------------------------------------------------
62 # Pattern-rules, to make targets
63
64 %.txt:  %.sgml
65         linuxdoc -B txt -f $(TXT_OPTIONS) $<
66
67 %.html: %.sgml
68         linuxdoc -B html --split=1 $(BUTTONS) $<
69
70 %.info: %.sgml
71         linuxdoc -B info $<
72
73 %.dvi:  %.sgml
74         linuxdoc -B latex --output=dvi $<
75
76 %.tex:  %.sgml
77         linuxdoc -B latex --output=tex $<
78
79 # ------------------------------------------------------------------------------
80 # Targets
81
82 .PHONY: all
83 all:    txt html info dvi
84
85 .PHONY: txt
86 txt:    linuxdoc $(TXT)
87
88 .PHONY: html
89 html:   linuxdoc $(HTML)
90
91 .PHONY: info
92 info:   linuxdoc $(INFO)
93
94 .PHONY: dvi
95 dvi:    linuxdoc $(DVI)
96
97 .PHONY: tex
98 tex:    linuxdoc $(TEX)
99
100 .PHONY: linuxdoc
101 linuxdoc:
102         @sgmlcheck index >/dev/null 2>&1 || { \
103         echo; \
104         echo '"LinuxDoc Tools" does not exist on this system.'; \
105         echo 'So, most of the documentation might not have been built.'; \
106         echo; \
107         false;}
108
109 .PHONY: clean
110 clean:
111         $(RM) *~
112
113 .PHONY: zap
114 zap:    clean
115         $(RM) $(TXT) $(TEX) $(DVI) *.htm* *.inf* *.man
116
117 # ------------------------------------------------------------------------------
118 # Special target rules
119
120 coding.html:    coding.sgml
121         sgml2html --split=0 $<
122
123 # funcref.sgml's third section is huge.
124 # So, funcref.html is split into sub-section files.
125 #
126 funcref.html:   funcref.sgml
127         sgml2html --split=2 $(BUTTONS) $<
128
129 # The index.html target is special:
130 # It is only a table of contents.  So, it should not be split.
131 #
132 index.html:     index.sgml
133         sgml2html --split=0 $<