mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] [KERNEL-DOC] generate main index page when building 'htmldocs'
@ 2007-04-10 23:44 Borislav Petkov
  2007-04-11  4:21 ` Randy Dunlap
  0 siblings, 1 reply; 4+ messages in thread
From: Borislav Petkov @ 2007-04-10 23:44 UTC (permalink / raw)
  To: Andrew Morton; +Cc: lkml, randy.dunlap

Here's 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>


Index: 21-rc6/Documentation/DocBook/Makefile
===================================================================
--- 21-rc6.orig/Documentation/DocBook/Makefile	2007-04-11 00:02:02.000000000 +0200
+++ 21-rc6/Documentation/DocBook/Makefile	2007-04-11 01:00:21.000000000 +0200
@@ -44,6 +44,7 @@
 
 HTML := $(patsubst %.xml, %.html, $(BOOKS))
 htmldocs: $(HTML)
+	$(call build_main_index)
 
 MAN := $(patsubst %.xml, %.9, $(BOOKS))
 mandocs: $(MAN)
@@ -133,10 +134,17 @@
 %.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) || \

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-04-11 15:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-10 23:44 [PATCH] [KERNEL-DOC] generate main index page when building 'htmldocs' Borislav Petkov
2007-04-11  4:21 ` Randy Dunlap
2007-04-11  8:02   ` [PATCH] [KERNEL-DOC] alphabetically-sorted entries in index.html of 'htmldocs' Borislav Petkov
2007-04-11 15:44     ` Randy Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®