diff options
Diffstat (limited to 'Documentation/DocBook/Makefile')
-rw-r--r-- | Documentation/DocBook/Makefile | 31 |
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 | |||
19 | include $(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. |
35 | PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs cleandocs xmldoclinks | 37 | PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs cleandocs |
36 | 38 | ||
37 | BOOKS := $(addprefix $(obj)/,$(DOCBOOKS)) | 39 | BOOKS := $(addprefix $(obj)/,$(DOCBOOKS)) |
38 | xmldocs: $(BOOKS) | 40 | xmldocs: $(BOOKS) |
@@ -45,27 +47,14 @@ PDF := $(patsubst %.xml, %.pdf, $(BOOKS)) | |||
45 | pdfdocs: $(PDF) | 47 | pdfdocs: $(PDF) |
46 | 48 | ||
47 | HTML := $(sort $(patsubst %.xml, %.html, $(BOOKS))) | 49 | HTML := $(sort $(patsubst %.xml, %.html, $(BOOKS))) |
48 | htmldocs: $(HTML) xmldoclinks | 50 | htmldocs: $(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 | ||
52 | MAN := $(patsubst %.xml, %.9, $(BOOKS)) | 55 | MAN := $(patsubst %.xml, %.9, $(BOOKS)) |
53 | mandocs: $(MAN) | 56 | mandocs: $(MAN) |
54 | 57 | ||
55 | build_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 | |||
60 | xmldoclinks: | ||
61 | ifneq ($(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 | ||
67 | endif | ||
68 | |||
69 | installmandocs: mandocs | 58 | installmandocs: 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 |
98 | endef | 87 | endef |
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 |
105 | cmd_files := $(wildcard $(foreach f,$(BOOKS),$(dir $(f)).$(notdir $(f)).cmd)) | 94 | cmd_files := $(wildcard $(foreach f,$(BOOKS),$(dir $(f)).$(notdir $(f)).cmd)) |
106 | 95 | ||
107 | ifneq ($(cmd_files),) | 96 | ifneq ($(cmd_files),) |
@@ -150,7 +139,7 @@ quiet_cmd_db2pdf = PDF $@ | |||
150 | 139 | ||
151 | index = index.html | 140 | index = index.html |
152 | main_idx = Documentation/DocBook/$(index) | 141 | main_idx = Documentation/DocBook/$(index) |
153 | build_main_index = rm -rf $(main_idx) && \ | 142 | build_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 | ||
243 | clean-dirs := $(patsubst %.xml,%,$(DOCBOOKS)) man | 232 | clean-dirs := $(patsubst %.xml,%,$(DOCBOOKS)) man |
244 | 233 | ||
245 | cleandocs: | 234 | cleandocs: 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 | ||