mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
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>
This commit is contained in:
parent
198b766013
commit
eb81d93046
@ -43,6 +43,7 @@ pdfdocs: $(PDF)
|
||||
|
||||
HTML := $(sort $(patsubst %.xml, %.html, $(BOOKS)))
|
||||
htmldocs: $(HTML)
|
||||
$(call build_main_index)
|
||||
|
||||
MAN := $(patsubst %.xml, %.9, $(BOOKS))
|
||||
mandocs: $(MAN)
|
||||
@ -132,10 +133,17 @@ quiet_cmd_db2pdf = PDF $@
|
||||
%.pdf : %.xml
|
||||
$(call cmd,db2pdf)
|
||||
|
||||
|
||||
main_idx = Documentation/DocBook/index.html
|
||||
build_main_index = rm -rf $(main_idx) && \
|
||||
echo '<h1>Linux Kernel HTML Documentation</h1>' >> $(main_idx) && \
|
||||
echo '<h2>Kernel Version: $(KERNELVERSION)</h2>' >> $(main_idx) && \
|
||||
cat $(HTML) >> $(main_idx)
|
||||
|
||||
quiet_cmd_db2html = HTML $@
|
||||
cmd_db2html = xmlto xhtml $(XMLTOFLAGS) -o $(patsubst %.html,%,$@) $< && \
|
||||
echo '<a HREF="$(patsubst %.html,%,$(notdir $@))/index.html"> \
|
||||
Goto $(patsubst %.html,%,$(notdir $@))</a><p>' > $@
|
||||
$(patsubst %.html,%,$(notdir $@))</a><p>' > $@
|
||||
|
||||
%.html: %.xml
|
||||
@(which xmlto > /dev/null 2>&1) || \
|
||||
|
Loading…
Reference in New Issue
Block a user