aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/DocBook/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/DocBook/Makefile')
-rw-r--r--Documentation/DocBook/Makefile19
1 files changed, 13 insertions, 6 deletions
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index 1462ed86d40a..b1eb661e6302 100644
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -12,7 +12,8 @@ DOCBOOKS := z8530book.xml mcabook.xml device-drivers.xml \
12 kernel-api.xml filesystems.xml lsm.xml usb.xml kgdb.xml \ 12 kernel-api.xml filesystems.xml lsm.xml usb.xml kgdb.xml \
13 gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \ 13 gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \
14 genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \ 14 genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \
15 mac80211.xml debugobjects.xml sh.xml regulator.xml 15 mac80211.xml debugobjects.xml sh.xml regulator.xml \
16 alsa-driver-api.xml writing-an-alsa-driver.xml
16 17
17### 18###
18# The build process is as follows (targets): 19# The build process is as follows (targets):
@@ -30,7 +31,7 @@ PS_METHOD = $(prefer-db2x)
30 31
31### 32###
32# The targets that may be used. 33# The targets that may be used.
33PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs 34PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs cleandocs
34 35
35BOOKS := $(addprefix $(obj)/,$(DOCBOOKS)) 36BOOKS := $(addprefix $(obj)/,$(DOCBOOKS))
36xmldocs: $(BOOKS) 37xmldocs: $(BOOKS)
@@ -142,7 +143,8 @@ quiet_cmd_db2pdf = PDF $@
142 $(call cmd,db2pdf) 143 $(call cmd,db2pdf)
143 144
144 145
145main_idx = Documentation/DocBook/index.html 146index = index.html
147main_idx = Documentation/DocBook/$(index)
146build_main_index = rm -rf $(main_idx) && \ 148build_main_index = rm -rf $(main_idx) && \
147 echo '<h1>Linux Kernel HTML Documentation</h1>' >> $(main_idx) && \ 149 echo '<h1>Linux Kernel HTML Documentation</h1>' >> $(main_idx) && \
148 echo '<h2>Kernel Version: $(KERNELVERSION)</h2>' >> $(main_idx) && \ 150 echo '<h2>Kernel Version: $(KERNELVERSION)</h2>' >> $(main_idx) && \
@@ -212,11 +214,12 @@ silent_gen_xml = :
212dochelp: 214dochelp:
213 @echo ' Linux kernel internal documentation in different formats:' 215 @echo ' Linux kernel internal documentation in different formats:'
214 @echo ' htmldocs - HTML' 216 @echo ' htmldocs - HTML'
215 @echo ' installmandocs - install man pages generated by mandocs'
216 @echo ' mandocs - man pages'
217 @echo ' pdfdocs - PDF' 217 @echo ' pdfdocs - PDF'
218 @echo ' psdocs - Postscript' 218 @echo ' psdocs - Postscript'
219 @echo ' xmldocs - XML DocBook' 219 @echo ' xmldocs - XML DocBook'
220 @echo ' mandocs - man pages'
221 @echo ' installmandocs - install man pages generated by mandocs'
222 @echo ' cleandocs - clean all generated DocBook files'
220 223
221### 224###
222# Temporary files left by various tools 225# Temporary files left by various tools
@@ -230,10 +233,14 @@ clean-files := $(DOCBOOKS) \
230 $(patsubst %.xml, %.pdf, $(DOCBOOKS)) \ 233 $(patsubst %.xml, %.pdf, $(DOCBOOKS)) \
231 $(patsubst %.xml, %.html, $(DOCBOOKS)) \ 234 $(patsubst %.xml, %.html, $(DOCBOOKS)) \
232 $(patsubst %.xml, %.9, $(DOCBOOKS)) \ 235 $(patsubst %.xml, %.9, $(DOCBOOKS)) \
233 $(C-procfs-example) 236 $(C-procfs-example) $(index)
234 237
235clean-dirs := $(patsubst %.xml,%,$(DOCBOOKS)) man 238clean-dirs := $(patsubst %.xml,%,$(DOCBOOKS)) man
236 239
240cleandocs:
241 $(Q)rm -f $(call objectify, $(clean-files))
242 $(Q)rm -rf $(call objectify, $(clean-dirs))
243
237# Declare the contents of the .PHONY variable as phony. We keep that 244# Declare the contents of the .PHONY variable as phony. We keep that
238# information in a variable se we can use it in if_changed and friends. 245# information in a variable se we can use it in if_changed and friends.
239 246