From: Borislav Petkov Date: Tue, 8 May 2007 07:29:36 +0000 (-0700) Subject: kernel-doc: generate main index page when building 'htmldocs' X-Git-Tag: v2.6.22-rc1~663 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=eb81d93046e7de51d47b8f1303d80e6f51ac9e33;p=linux-block.git 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 Acked-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile index 10b5cd6c54a0..6fd1646d3204 100644 --- a/Documentation/DocBook/Makefile +++ b/Documentation/DocBook/Makefile @@ -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 '

Linux Kernel HTML Documentation

' >> $(main_idx) && \ + echo '

Kernel Version: $(KERNELVERSION)

' >> $(main_idx) && \ + cat $(HTML) >> $(main_idx) + quiet_cmd_db2html = HTML $@ cmd_db2html = xmlto xhtml $(XMLTOFLAGS) -o $(patsubst %.html,%,$@) $< && \ echo ' \ - Goto $(patsubst %.html,%,$(notdir $@))

' > $@ + $(patsubst %.html,%,$(notdir $@))

' > $@ %.html: %.xml @(which xmlto > /dev/null 2>&1) || \