diff options
author | Borislav Petkov <bbpetkov@yahoo.de> | 2007-05-08 03:29:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-08 14:15:10 -0400 |
commit | eb81d93046e7de51d47b8f1303d80e6f51ac9e33 (patch) | |
tree | 9442d4c65f1cd68c5a3b399e3b88e73ba3013025 | |
parent | 198b766013e680a9e367aeb0d62f402029868a09 (diff) |
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>
-rw-r--r-- | Documentation/DocBook/Makefile | 10 |
1 files changed, 9 insertions, 1 deletions
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) | |||
43 | 43 | ||
44 | HTML := $(sort $(patsubst %.xml, %.html, $(BOOKS))) | 44 | HTML := $(sort $(patsubst %.xml, %.html, $(BOOKS))) |
45 | htmldocs: $(HTML) | 45 | htmldocs: $(HTML) |
46 | $(call build_main_index) | ||
46 | 47 | ||
47 | MAN := $(patsubst %.xml, %.9, $(BOOKS)) | 48 | MAN := $(patsubst %.xml, %.9, $(BOOKS)) |
48 | mandocs: $(MAN) | 49 | mandocs: $(MAN) |
@@ -132,10 +133,17 @@ quiet_cmd_db2pdf = PDF $@ | |||
132 | %.pdf : %.xml | 133 | %.pdf : %.xml |
133 | $(call cmd,db2pdf) | 134 | $(call cmd,db2pdf) |
134 | 135 | ||
136 | |||
137 | main_idx = Documentation/DocBook/index.html | ||
138 | build_main_index = rm -rf $(main_idx) && \ | ||
139 | echo '<h1>Linux Kernel HTML Documentation</h1>' >> $(main_idx) && \ | ||
140 | echo '<h2>Kernel Version: $(KERNELVERSION)</h2>' >> $(main_idx) && \ | ||
141 | cat $(HTML) >> $(main_idx) | ||
142 | |||
135 | quiet_cmd_db2html = HTML $@ | 143 | quiet_cmd_db2html = HTML $@ |
136 | cmd_db2html = xmlto xhtml $(XMLTOFLAGS) -o $(patsubst %.html,%,$@) $< && \ | 144 | cmd_db2html = xmlto xhtml $(XMLTOFLAGS) -o $(patsubst %.html,%,$@) $< && \ |
137 | echo '<a HREF="$(patsubst %.html,%,$(notdir $@))/index.html"> \ | 145 | echo '<a HREF="$(patsubst %.html,%,$(notdir $@))/index.html"> \ |
138 | Goto $(patsubst %.html,%,$(notdir $@))</a><p>' > $@ | 146 | $(patsubst %.html,%,$(notdir $@))</a><p>' > $@ |
139 | 147 | ||
140 | %.html: %.xml | 148 | %.html: %.xml |
141 | @(which xmlto > /dev/null 2>&1) || \ | 149 | @(which xmlto > /dev/null 2>&1) || \ |