Merge branch 'linus' into tracing/core
[firefly-linux-kernel-4.4.55.git] / Documentation / DocBook / Makefile
index a3a83d38f96fa44a1d17d917e297959cce5036fc..9632444f6c6270b87894e2381f95985ed3126d7a 100644 (file)
@@ -13,7 +13,8 @@ DOCBOOKS := z8530book.xml mcabook.xml device-drivers.xml \
            gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \
            genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \
            mac80211.xml debugobjects.xml sh.xml regulator.xml \
-           alsa-driver-api.xml writing-an-alsa-driver.xml
+           alsa-driver-api.xml writing-an-alsa-driver.xml \
+           tracepoint.xml
 
 ###
 # The build process is as follows (targets):
@@ -31,7 +32,7 @@ PS_METHOD     = $(prefer-db2x)
 
 ###
 # The targets that may be used.
-PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs
+PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs cleandocs
 
 BOOKS := $(addprefix $(obj)/,$(DOCBOOKS))
 xmldocs: $(BOOKS)
@@ -143,7 +144,8 @@ quiet_cmd_db2pdf = PDF     $@
        $(call cmd,db2pdf)
 
 
-main_idx = Documentation/DocBook/index.html
+index = index.html
+main_idx = Documentation/DocBook/$(index)
 build_main_index = rm -rf $(main_idx) && \
                   echo '<h1>Linux Kernel HTML Documentation</h1>' >> $(main_idx) && \
                   echo '<h2>Kernel Version: $(KERNELVERSION)</h2>' >> $(main_idx) && \
@@ -213,11 +215,12 @@ silent_gen_xml = :
 dochelp:
        @echo  ' Linux kernel internal documentation in different formats:'
        @echo  '  htmldocs        - HTML'
-       @echo  '  installmandocs  - install man pages generated by mandocs'
-       @echo  '  mandocs         - man pages'
        @echo  '  pdfdocs         - PDF'
        @echo  '  psdocs          - Postscript'
        @echo  '  xmldocs         - XML DocBook'
+       @echo  '  mandocs         - man pages'
+       @echo  '  installmandocs  - install man pages generated by mandocs'
+       @echo  '  cleandocs       - clean all generated DocBook files'
 
 ###
 # Temporary files left by various tools
@@ -231,10 +234,14 @@ clean-files := $(DOCBOOKS) \
        $(patsubst %.xml, %.pdf,  $(DOCBOOKS)) \
        $(patsubst %.xml, %.html, $(DOCBOOKS)) \
        $(patsubst %.xml, %.9,    $(DOCBOOKS)) \
-       $(C-procfs-example)
+       $(C-procfs-example) $(index)
 
 clean-dirs := $(patsubst %.xml,%,$(DOCBOOKS)) man
 
+cleandocs:
+       $(Q)rm -f $(call objectify, $(clean-files))
+       $(Q)rm -rf $(call objectify, $(clean-dirs))
+
 # Declare the contents of the .PHONY variable as phony.  We keep that
 # information in a variable se we can use it in if_changed and friends.