1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
|
BOOKS := wanbook.sgml z8530book.sgml mcabook.sgml videobook.sgml \
kernel-api.sgml parportbook.sgml kernel-hacking.sgml \
kernel-locking.sgml via-audio.sgml mousedrivers.sgml
PS := $(patsubst %.sgml, %.ps, $(BOOKS))
PDF := $(patsubst %.sgml, %.pdf, $(BOOKS))
HTML := $(patsubst %.sgml, %, $(BOOKS))
IMG-parportbook := parport-share.fig parport-multi.fig parport-structure.fig
EPS-parportbook := $(patsubst %.fig, %.eps, $(IMG-parportbook))
JPG-parportbook := $(patsubst %.fig, %.jpeg, $(IMG-parportbook))
$(BOOKS): $(TOPDIR)/scripts/docproc
.PHONY: books ps pdf html clean mrproper
books: $(BOOKS)
ps: $(PS)
pdf: $(PDF)
html: $(HTML)
%.eps: %.fig
-fig2dev -Leps $< $@
%.jpeg: %.fig
-fig2dev -Ljpeg $< $@
$(TOPDIR)/scripts/docproc:
$(MAKE) -C $(TOPDIR)/scripts docproc
mousedrivers.sgml: mousedrivers.tmpl
$(TOPDIR)/scripts/docgen <$< >$@
kernel-hacking.sgml: kernel-hacking.tmpl
$(TOPDIR)/scripts/docgen <$< >$@
kernel-locking.sgml: kernel-locking.tmpl
$(TOPDIR)/scripts/docgen <$< >$@
wanbook.sgml: wanbook.tmpl $(TOPDIR)/drivers/net/wan/syncppp.c
$(TOPDIR)/scripts/docgen $(TOPDIR)/drivers/net/wan/syncppp.c \
<wanbook.tmpl >wanbook.sgml
z8530book.sgml: z8530book.tmpl $(TOPDIR)/drivers/net/wan/z85230.c
$(TOPDIR)/scripts/docgen $(TOPDIR)/drivers/net/wan/z85230.c \
<z8530book.tmpl >z8530book.sgml
via-audio.sgml: via-audio.tmpl $(TOPDIR)/drivers/sound/via82cxxx_audio.c
$(TOPDIR)/scripts/docgen $(TOPDIR)/drivers/sound/via82cxxx_audio.c \
<via-audio.tmpl >via-audio.sgml
mcabook.sgml: mcabook.tmpl $(TOPDIR)/arch/i386/kernel/mca.c
$(TOPDIR)/scripts/docgen $(TOPDIR)/arch/i386/kernel/mca.c \
<mcabook.tmpl >mcabook.sgml
videobook.sgml: videobook.tmpl $(TOPDIR)/drivers/char/videodev.c
$(TOPDIR)/scripts/docgen $(TOPDIR)/drivers/char/videodev.c \
<videobook.tmpl >videobook.sgml
APISOURCES := $(TOPDIR)/drivers/char/videodev.c \
$(TOPDIR)/arch/i386/kernel/mca.c \
$(TOPDIR)/arch/i386/kernel/mtrr.c \
$(TOPDIR)/drivers/char/misc.c \
$(TOPDIR)/drivers/net/net_init.c \
$(TOPDIR)/drivers/net/8390.c \
$(TOPDIR)/drivers/char/serial.c \
$(TOPDIR)/drivers/pci/pci.c \
$(TOPDIR)/drivers/block/ll_rw_blk.c \
$(TOPDIR)/drivers/sound/sound_core.c \
$(TOPDIR)/drivers/sound/sound_firmware.c \
$(TOPDIR)/drivers/net/wan/syncppp.c \
$(TOPDIR)/drivers/net/wan/z85230.c \
$(TOPDIR)/fs/devfs/base.c \
$(TOPDIR)/kernel/pm.c \
$(TOPDIR)/kernel/ksyms.c \
$(TOPDIR)/net/netsyms.c
kernel-api.sgml: kernel-api.tmpl $(APISOURCES)
$(TOPDIR)/scripts/docgen $(APISOURCES) \
<kernel-api.tmpl >kernel-api.sgml
parportbook: $(JPG-parportbook)
parportbook.ps: $(EPS-parportbook)
parportbook.sgml: parportbook.tmpl $(TOPDIR)/drivers/parport/init.c
$(TOPDIR)/scripts/docgen $(TOPDIR)/drivers/parport/init.c <$< >$@
DVI := $(patsubst %.sgml, %.dvi, $(BOOKS))
AUX := $(patsubst %.sgml, %.aux, $(BOOKS))
TEX := $(patsubst %.sgml, %.tex, $(BOOKS))
LOG := $(patsubst %.sgml, %.log, $(BOOKS))
OUT := $(patsubst %.sgml, %.out, $(BOOKS))
clean:
-$(RM) core *~
-$(RM) $(BOOKS)
-$(RM) $(DVI) $(AUX) $(TEX) $(LOG) $(OUT)
-$(RM) $(JPG-parportbook) $(EPS-parportbook)
mrproper: clean
-$(RM) $(PS) $(PDF)
-$(RM) -r $(HTML)
-$(RM) .depend
-$(RM) $(TOPDIR)/scripts/mkdep-docbook
%.ps : %.sgml
@(which db2ps > /dev/null 2>&1) || \
(echo "*** You need to install DocBook stylesheets ***"; \
exit 1)
db2ps $<
%.pdf : %.sgml
@(which db2pdf > /dev/null 2>&1) || \
(echo "*** You need to install DocBook stylesheets ***"; \
exit 1)
db2pdf $<
%: %.sgml
@(which db2html > /dev/null 2>&1) || \
(echo "*** You need to install DocBook stylesheets ***"; \
exit 1)
-$(RM) -r $@
db2html $<
if [ ! -z "$(JPG-$@)" ]; then cp $(JPG-$@) $@; fi
#
# we could have our own dependency generator
#
#
# .depend: $(TOPDIR)/scripts/mkdep-docbook
# $(TOPDIR)/scripts/mkdep-docbook $(wildcard *.tmpl) > .depend
include $(TOPDIR)/Rules.make
|