Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

kernel-doc: generate main index page when building 'htmldocs'

A patch for kernel-doc that enables the generation of a global, TOC-like
index.html page after building 'htmldocs'

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Borislav Petkov and committed by
Linus Torvalds
eb81d930 198b7660

+9 -1
+9 -1
Documentation/DocBook/Makefile
··· 43 43 44 44 HTML := $(sort $(patsubst %.xml, %.html, $(BOOKS))) 45 45 htmldocs: $(HTML) 46 + $(call build_main_index) 46 47 47 48 MAN := $(patsubst %.xml, %.9, $(BOOKS)) 48 49 mandocs: $(MAN) ··· 133 132 %.pdf : %.xml 134 133 $(call cmd,db2pdf) 135 134 135 + 136 + main_idx = Documentation/DocBook/index.html 137 + build_main_index = rm -rf $(main_idx) && \ 138 + echo '<h1>Linux Kernel HTML Documentation</h1>' >> $(main_idx) && \ 139 + echo '<h2>Kernel Version: $(KERNELVERSION)</h2>' >> $(main_idx) && \ 140 + cat $(HTML) >> $(main_idx) 141 + 136 142 quiet_cmd_db2html = HTML $@ 137 143 cmd_db2html = xmlto xhtml $(XMLTOFLAGS) -o $(patsubst %.html,%,$@) $< && \ 138 144 echo '<a HREF="$(patsubst %.html,%,$(notdir $@))/index.html"> \ 139 - Goto $(patsubst %.html,%,$(notdir $@))</a><p>' > $@ 145 + $(patsubst %.html,%,$(notdir $@))</a><p>' > $@ 140 146 141 147 %.html: %.xml 142 148 @(which xmlto > /dev/null 2>&1) || \