aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/DocBook/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/DocBook/Makefile')
-rw-r--r--Documentation/DocBook/Makefile31
1 files changed, 10 insertions, 21 deletions
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index 3cebfa0d1611..66725a3d30dc 100644
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -14,7 +14,9 @@ DOCBOOKS := z8530book.xml mcabook.xml device-drivers.xml \
14 genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \ 14 genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \
15 80211.xml debugobjects.xml sh.xml regulator.xml \ 15 80211.xml debugobjects.xml sh.xml regulator.xml \
16 alsa-driver-api.xml writing-an-alsa-driver.xml \ 16 alsa-driver-api.xml writing-an-alsa-driver.xml \
17 tracepoint.xml media.xml drm.xml 17 tracepoint.xml drm.xml media_api.xml
18
19include $(srctree)/Documentation/DocBook/media/Makefile
18 20
19### 21###
20# The build process is as follows (targets): 22# The build process is as follows (targets):
@@ -32,7 +34,7 @@ PS_METHOD = $(prefer-db2x)
32 34
33### 35###
34# The targets that may be used. 36# The targets that may be used.
35PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs cleandocs xmldoclinks 37PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs cleandocs
36 38
37BOOKS := $(addprefix $(obj)/,$(DOCBOOKS)) 39BOOKS := $(addprefix $(obj)/,$(DOCBOOKS))
38xmldocs: $(BOOKS) 40xmldocs: $(BOOKS)
@@ -45,27 +47,14 @@ PDF := $(patsubst %.xml, %.pdf, $(BOOKS))
45pdfdocs: $(PDF) 47pdfdocs: $(PDF)
46 48
47HTML := $(sort $(patsubst %.xml, %.html, $(BOOKS))) 49HTML := $(sort $(patsubst %.xml, %.html, $(BOOKS)))
48htmldocs: $(HTML) xmldoclinks 50htmldocs: $(HTML)
49 $(call build_main_index) 51 $(call build_main_index)
50 $(call build_images) 52 $(call build_images)
53 $(call install_media_images)
51 54
52MAN := $(patsubst %.xml, %.9, $(BOOKS)) 55MAN := $(patsubst %.xml, %.9, $(BOOKS))
53mandocs: $(MAN) 56mandocs: $(MAN)
54 57
55build_images = mkdir -p $(objtree)/Documentation/DocBook/media/ && \
56 cp $(srctree)/Documentation/DocBook/dvb/*.png \
57 $(srctree)/Documentation/DocBook/v4l/*.gif \
58 $(objtree)/Documentation/DocBook/media/
59
60xmldoclinks:
61ifneq ($(objtree),$(srctree))
62 for dep in dvb media-entities.tmpl media-indices.tmpl v4l; do \
63 rm -f $(objtree)/Documentation/DocBook/$$dep \
64 && ln -s $(srctree)/Documentation/DocBook/$$dep $(objtree)/Documentation/DocBook/ \
65 || exit; \
66 done
67endif
68
69installmandocs: mandocs 58installmandocs: mandocs
70 mkdir -p /usr/local/man/man9/ 59 mkdir -p /usr/local/man/man9/
71 install Documentation/DocBook/man/*.9.gz /usr/local/man/man9/ 60 install Documentation/DocBook/man/*.9.gz /usr/local/man/man9/
@@ -97,11 +86,11 @@ define rule_docproc
97 ) > $(dir $@).$(notdir $@).cmd 86 ) > $(dir $@).$(notdir $@).cmd
98endef 87endef
99 88
100%.xml: %.tmpl xmldoclinks FORCE 89%.xml: %.tmpl FORCE
101 $(call if_changed_rule,docproc) 90 $(call if_changed_rule,docproc)
102 91
103### 92###
104#Read in all saved dependency files 93#Read in all saved dependency files
105cmd_files := $(wildcard $(foreach f,$(BOOKS),$(dir $(f)).$(notdir $(f)).cmd)) 94cmd_files := $(wildcard $(foreach f,$(BOOKS),$(dir $(f)).$(notdir $(f)).cmd))
106 95
107ifneq ($(cmd_files),) 96ifneq ($(cmd_files),)
@@ -150,7 +139,7 @@ quiet_cmd_db2pdf = PDF $@
150 139
151index = index.html 140index = index.html
152main_idx = Documentation/DocBook/$(index) 141main_idx = Documentation/DocBook/$(index)
153build_main_index = rm -rf $(main_idx) && \ 142build_main_index = rm -rf $(main_idx); \
154 echo '<h1>Linux Kernel HTML Documentation</h1>' >> $(main_idx) && \ 143 echo '<h1>Linux Kernel HTML Documentation</h1>' >> $(main_idx) && \
155 echo '<h2>Kernel Version: $(KERNELVERSION)</h2>' >> $(main_idx) && \ 144 echo '<h2>Kernel Version: $(KERNELVERSION)</h2>' >> $(main_idx) && \
156 cat $(HTML) >> $(main_idx) 145 cat $(HTML) >> $(main_idx)
@@ -242,7 +231,7 @@ clean-files := $(DOCBOOKS) \
242 231
243clean-dirs := $(patsubst %.xml,%,$(DOCBOOKS)) man 232clean-dirs := $(patsubst %.xml,%,$(DOCBOOKS)) man
244 233
245cleandocs: 234cleandocs: cleanmediadocs
246 $(Q)rm -f $(call objectify, $(clean-files)) 235 $(Q)rm -f $(call objectify, $(clean-files))
247 $(Q)rm -rf $(call objectify, $(clean-dirs)) 236 $(Q)rm -rf $(call objectify, $(clean-dirs))
248 237