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