summaryrefslogtreecommitdiffstats
path: root/Documentation/DocBook/Makefile
blob: 2079bae183d8badf019fe9b8f16cae2e497999ab (plain)
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
BOOKS	:= wanbook.sgml z8530book.sgml mcabook.sgml videobook.sgml kernel-api.sgml parportbook.sgml

PS	:=	$(patsubst %.sgml, %.ps, $(BOOKS))
PDF	:=	$(patsubst %.sgml, %.pdf, $(BOOKS))

$(BOOKS): $(TOPDIR)/scripts/docproc

.PHONY:	books ps pdf clean mrproper db2ps db2pdf

books:	$(BOOKS)

ps:	$(PS)

pdf:	$(PDF)

db2ps db2pdf:
	@(which $@ > /dev/null 2>&1) || \
	 (echo "*** You need to install DocBook stylesheets ***"; \
	  exit 1)

$(TOPDIR)/scripts/docproc:
	$(MAKE) -C $(TOPDIR)/scripts docproc

wanbook.sgml: wanbook.tmpl
	$(TOPDIR)/scripts/docgen $(TOPDIR)/drivers/net/wan/syncppp.c \
		<wanbook.tmpl >wanbook.sgml

z8530book.sgml: z8530book.tmpl
	$(TOPDIR)/scripts/docgen $(TOPDIR)/drivers/net/wan/z85230.c \
		<z8530book.tmpl >z8530book.sgml

mcabook.sgml: mcabook.tmpl
	$(TOPDIR)/scripts/docgen $(TOPDIR)/arch/i386/kernel/mca.c \
		<mcabook.tmpl >mcabook.sgml

videobook.sgml: videobook.tmpl
	$(TOPDIR)/scripts/docgen $(TOPDIR)/drivers/char/videodev.c \
		<videobook.tmpl >videobook.sgml

kernel-api.sgml: kernel-api.tmpl
	$(TOPDIR)/scripts/docgen $(TOPDIR)/drivers/char/videodev.c \
		$(TOPDIR)/arch/i386/kernel/mca.c \
		$(TOPDIR)/arch/i386/kernel/mtrr.c \
		$(TOPDIR)/drivers/char/misc.c \
		$(TOPDIR)/drivers/char/videodev.c \
		$(TOPDIR)/drivers/net/net_init.c \
		$(TOPDIR)/drivers/net/8390.c \
		$(TOPDIR)/drivers/char/serial.c \
		$(TOPDIR)/drivers/pci/pci.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)/kernel/pm.c \
		$(TOPDIR)/kernel/ksyms.c \
		$(TOPDIR)/net/netsyms.c \
		<kernel-api.tmpl >kernel-api.sgml

parportbook.sgml: parportbook.tmpl
	$(TOPDIR)/scripts/docgen $(TOPDIR)/drivers/parport/init.c \
		<parportbook.tmpl >parportbook.sgml

DVI	:=	$(patsubst %.sgml, %.dvi, $(BOOKS))
AUX	:=	$(patsubst %.sgml, %.aux, $(BOOKS))
TEX	:=	$(patsubst %.sgml, %.tex, $(BOOKS))
LOG	:=	$(patsubst %.sgml, %.log, $(BOOKS))

clean:
	$(RM) core *~
	$(RM) $(BOOKS)
	$(RM) $(DVI) $(AUX) $(TEX) $(LOG)

mrproper: clean
	$(RM) $(PS) $(PDF)

%.ps : %.sgml db2ps
	db2ps $<

%.pdf : %.sgml
	db2pdf $<

include $(TOPDIR)/Rules.make