]> git.sur5r.net Git - cc65/blob - doc/Makefile
Have the callirq module export __CALLIRQ__ and changed all config files so
[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         smc.sgml        \
53         sp65.sgml       \
54         supervision.sgml\
55         vic20.sgml
56
57 TXT  =  $(SGML:.sgml=.txt)
58 HTML =  $(SGML:.sgml=.html)
59 INFO =  $(SGML:.sgml=.info)
60 DVI  =  $(SGML:.sgml=.dvi)
61 TEX  =  $(SGML:.sgml=.tex)
62
63 # ------------------------------------------------------------------------------
64 # Pattern-rules, to make targets
65
66 %.txt:  %.sgml
67         linuxdoc -B txt -f $(TXT_OPTIONS) $<
68
69 %.html: %.sgml
70         linuxdoc -B html --split=1 $(BUTTONS) $<
71
72 %.info: %.sgml
73         linuxdoc -B info $<
74
75 %.dvi:  %.sgml
76         linuxdoc -B latex --output=dvi $<
77
78 %.tex:  %.sgml
79         linuxdoc -B latex --output=tex $<
80
81 # ------------------------------------------------------------------------------
82 # Targets
83
84 .PHONY: all
85 all:    txt html info dvi
86
87 .PHONY: txt
88 txt:    linuxdoc $(TXT)
89
90 .PHONY: html
91 html:   linuxdoc $(HTML)
92
93 .PHONY: info
94 info:   linuxdoc $(INFO)
95
96 .PHONY: dvi
97 dvi:    linuxdoc $(DVI)
98
99 .PHONY: tex
100 tex:    linuxdoc $(TEX)
101
102 .PHONY: linuxdoc
103 linuxdoc:
104         @sgmlcheck index >/dev/null 2>&1 || { \
105         echo; \
106         echo '"LinuxDoc Tools" does not exist on this system.'; \
107         echo 'So, most of the documentation might not have been built.'; \
108         echo; \
109         false;}
110
111 .PHONY: clean
112 clean:
113         $(RM) *~
114
115 .PHONY: zap
116 zap:    clean
117         $(RM) $(TXT) $(TEX) $(DVI) *.htm* *.inf* *.man
118
119 # ------------------------------------------------------------------------------
120 # Special target rules
121
122 coding.html:    coding.sgml
123         sgml2html --split=0 $<
124
125 # funcref.sgml's third section is huge.
126 # So, funcref.html is split into sub-section files.
127 #
128 funcref.html:   funcref.sgml
129         sgml2html --split=2 $(BUTTONS) $<
130
131 # The index.html target is special:
132 # It is only a table of contents.  So, it should not be split.
133 #
134 index.html:     index.sgml
135         sgml2html --split=0 $<