]> git.sur5r.net Git - cc65/blob - doc/Makefile
Ignore start address in cbm_opendir. Rearrange the code somewhat to make it
[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         da65.sgml       \
36         debugging.sgml  \
37         dio.sgml        \
38         funcref.sgml    \
39         geos.sgml       \
40         grc.sgml        \
41         index.sgml      \
42         intro.sgml      \
43         ld65.sgml       \
44         library.sgml    \
45         lynx.sgml       \
46         make.sgml       \
47         nes.sgml        \
48         pet.sgml        \
49         plus4.sgml      \
50         supervision.sgml\
51         vic20.sgml
52
53 TXT  =  $(SGML:.sgml=.txt)
54 HTML =  $(SGML:.sgml=.html)
55 INFO =  $(SGML:.sgml=.info)
56 DVI  =  $(SGML:.sgml=.dvi)
57 TEX  =  $(SGML:.sgml=.tex)
58
59 # ------------------------------------------------------------------------------
60 # Pattern-rules, to make targets
61
62 %.txt:  %.sgml
63         linuxdoc -B txt -f $(TXT_OPTIONS) $<
64
65 %.html: %.sgml
66         linuxdoc -B html --split=1 $(BUTTONS) $<
67
68 %.info: %.sgml
69         linuxdoc -B info $<
70
71 %.dvi:  %.sgml
72         linuxdoc -B latex --output=dvi $<
73
74 %.tex:  %.sgml
75         linuxdoc -B latex --output=tex $<
76
77 # ------------------------------------------------------------------------------
78 # Targets
79
80 .PHONY: all
81 all:    txt html info dvi
82
83 .PHONY: txt
84 txt:    linuxdoc $(TXT)
85
86 .PHONY: html
87 html:   linuxdoc $(HTML)
88
89 .PHONY: info
90 info:   linuxdoc $(INFO)
91
92 .PHONY: dvi
93 dvi:    linuxdoc $(DVI)
94
95 .PHONY: tex
96 tex:    linuxdoc $(TEX)
97
98 .PHONY: linuxdoc
99 linuxdoc:
100         @sgmlcheck index >/dev/null 2>&1 || { \
101         echo; \
102         echo '"LinuxDoc Tools" does not exist on this system.'; \
103         echo 'So, most of the documentation might not have been built.'; \
104         echo; \
105         false;}
106
107 .PHONY: clean
108 clean:
109         $(RM) *~
110
111 .PHONY: zap
112 zap:    clean
113         $(RM) $(TXT) $(TEX) $(DVI) *.htm* *.inf* *.man
114
115 # ------------------------------------------------------------------------------
116 # Special target rules
117
118 coding.html:    coding.sgml
119         sgml2html --split=0 $<
120
121 # funcref.sgml's third section is huge.
122 # So, funcref.html is split into sub-section files.
123 #
124 funcref.html:   funcref.sgml
125         sgml2html --split=2 $(BUTTONS) $<
126
127 # The index.html target is special:
128 # It is only a table of contents.  So, it should not be split.
129 #
130 index.html:     index.sgml
131         sgml2html --split=0 $<