[patch] tweak make htmldocs (nochunks and better index).

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-kernel@...>, <linux-doc@...>
Date: Tuesday, May 29, 2007 - 3:28 pm

Signed-off-by: Rob Landley <rob@landley.net>

A) The "xmtml-nochunks" version of "make htmldocs" is easier to print.

B) Update the generated index.html to use the html <title> as a
   description for each file it links to.

--

--- git/Documentation/DocBook/Makefile	2007-05-23 16:36:56.000000000 -0400
+++ work/Documentation/DocBook/Makefile	2007-05-26 23:11:36.000000000 -0400
@@ -141,9 +141,12 @@
 		   cat $(HTML) >> $(main_idx)
 
 quiet_cmd_db2html = HTML   $@
-      cmd_db2html = xmlto xhtml $(XMLTOFLAGS) -o $(patsubst %.html,%,$@) $< && \
-		echo '<a HREF="$(patsubst %.html,%,$(notdir $@))/index.html"> \
-        $(patsubst %.html,%,$(notdir $@))</a><p>' > $@
+      cmd_db2html = xmlto xhtml-nochunks $(XMLTOFLAGS) -o $(patsubst %.html,%,$@) $< && \
+		NAME='$(patsubst %.html,%,$(notdir $@))'; \
+		echo -n "<p><a HREF=\"$$NAME/$$NAME.html\">$$NAME</a>" > $@ ; \
+		sed -nre 's@.*<title>(.*)</title>.*@\1@p' \
+			"Documentation/DocBook/$$NAME/$$NAME.html" >> $@ ; \
+		echo '<\p>' >> $@
 
 %.html:	%.xml
 	@(which xmlto > /dev/null 2>&1) || \
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch] tweak make htmldocs (nochunks and better index)., Rob Landley, (Tue May 29, 3:28 pm)