Re: Documentation/kernel-doc-nano-HOWTO.txt

From: Andrew Morton (andrewm@uow.edu.au)
Date: Fri May 19 2000 - 11:45:39 EST


Tim Waugh wrote:
>
> On Fri, May 19, 2000 at 10:49:32AM -0400, Horst von Brand wrote:
>
> > In any case it doesn't work here (RedHat 6.2 + updates, linux-2.3.99-pre9-2
> > on sparc): "make pdfdocs" runs over JadeTeX memory limits
>
> How about 'make psdocs' and then using ps2pdf?

erm... I'm the guilty party here. pdfjadetex is broken.

I've attached here a patch which uses ps2pdf instead. I've also tossed
in:

- A top-level target 'htmldocs'

- A target in Documentation/DocBook/Makefile 'html'

- A target in Documentation/DocBook/Makefile 'tarball'

The 'html' target does the obvious thing. It also generates an
appropriate symlink 'index.html' in each book's subdir. It doesn't seem
to be possible to determine what the actual toplevel html output file is
going to be called, so you have to enter this in the Makefile. :(

The 'tarball' target creates linux-kernel-api.tar.gz, suitable for
transport to a web server.

- Updated the 'mrproper' and 'clean' targets appropriately.

Tim (or Horst) - could you please bang on this a bit, see if it makes
sense? Thanks.

[ The fonts are waaay too large in all output formats, BTW ]

-- 
-akpm-

--- linux-2.3.99-pre9-1/Makefile Mon May 15 21:26:07 2000 +++ linux-akpm/Makefile Sat May 20 01:44:10 2000 @@ -426,6 +426,9 @@ pdfdocs: sgmldocs $(MAKE) -C Documentation/DocBook pdf +htmldocs: sgmldocs + $(MAKE) -C Documentation/DocBook html + sums: find . -type f -print | sort | xargs sum > .SUMS --- linux-2.3.99-pre9-1/Documentation/DocBook/Makefile Mon May 15 21:26:07 2000 +++ linux-akpm/Documentation/DocBook/Makefile Sat May 20 02:41:11 2000 @@ -1,11 +1,19 @@ -BOOKS := wanbook.sgml z8530book.sgml mcabook.sgml videobook.sgml kernel-api.sgml parportbook.sgml +BOOKS := wanbook.sgml z8530book.sgml mcabook.sgml videobook.sgml \ + kernel-api.sgml parportbook.sgml + +# A list of the names of the toplevel HTML files (to be linked to index.html) +HTMLNAMES= + +# Name for the HTML tarball which 'make tarball' produces +TARBALL = linux-kernel-api.tar.gz PS := $(patsubst %.sgml, %.ps, $(BOOKS)) PDF := $(patsubst %.sgml, %.pdf, $(BOOKS)) +HTML := $(patsubst %.sgml, %.html, $(BOOKS)) $(BOOKS): $(TOPDIR)/scripts/docproc -.PHONY: books ps pdf clean mrproper db2ps db2pdf +.PHONY: books ps pdf clean mrproper db2ps ps2pdf db2html books: $(BOOKS) @@ -13,6 +21,10 @@ pdf: $(PDF) +html: $(HTML) + +tarball: $(TARBALL) + db2ps db2pdf: @(which $@ > /dev/null 2>&1) || \ (echo "*** You need to install DocBook stylesheets ***"; \ @@ -24,18 +36,22 @@ wanbook.sgml: wanbook.tmpl $(TOPDIR)/scripts/docgen $(TOPDIR)/drivers/net/wan/syncppp.c \ <wanbook.tmpl >wanbook.sgml +HTMLNAMES += wanguide z8530book.sgml: z8530book.tmpl $(TOPDIR)/scripts/docgen $(TOPDIR)/drivers/net/wan/z85230.c \ <z8530book.tmpl >z8530book.sgml +HTMLNAMES += z85230guide mcabook.sgml: mcabook.tmpl $(TOPDIR)/scripts/docgen $(TOPDIR)/arch/i386/kernel/mca.c \ <mcabook.tmpl >mcabook.sgml +HTMLNAMES += mcaguide videobook.sgml: videobook.tmpl $(TOPDIR)/scripts/docgen $(TOPDIR)/drivers/char/videodev.c \ <videobook.tmpl >videobook.sgml +HTMLNAMES += v4lguide kernel-api.sgml: kernel-api.tmpl $(TOPDIR)/scripts/docgen $(TOPDIR)/drivers/char/videodev.c \ @@ -56,29 +72,48 @@ $(TOPDIR)/kernel/ksyms.c \ $(TOPDIR)/net/netsyms.c \ <kernel-api.tmpl >kernel-api.sgml +HTMLNAMES += linuxkernelapi parportbook.sgml: parportbook.tmpl $(TOPDIR)/scripts/docgen $(TOPDIR)/drivers/parport/init.c \ <parportbook.tmpl >parportbook.sgml +HTMLNAMES += parportguide DVI := $(patsubst %.sgml, %.dvi, $(BOOKS)) AUX := $(patsubst %.sgml, %.aux, $(BOOKS)) TEX := $(patsubst %.sgml, %.tex, $(BOOKS)) LOG := $(patsubst %.sgml, %.log, $(BOOKS)) +JUNK := $(patsubst %.sgml, %.junk, $(BOOKS)) +HDIRS := $(patsubst %.sgml, %, $(BOOKS)) + +$(TARBALL): $(HTML) + chmod -R a+rX,o-w $(HDIRS) + tar cvfz $@ $(HDIRS) clean: $(RM) core *~ + $(RM) -r DBTOHTML_OUTPUT_DIR* $(RM) $(BOOKS) $(RM) $(DVI) $(AUX) $(TEX) $(LOG) + $(RM) -r $(JUNK) mrproper: clean - $(RM) $(PS) $(PDF) + $(RM) $(PS) $(PDF) $(TARBALL) + $(RM) -r $(HDIRS) %.ps : %.sgml db2ps db2ps $< -%.pdf : %.sgml - db2pdf $< +%.pdf : %.ps ps2pdf + ps2pdf $*.ps + +%.html: %.sgml db2html + db2html $< + for i in $(HTMLNAMES) ; do \ + if [ -f $*/$$i.html ] ; then \ + ln -s $$i.html $*/index.html ; \ + fi ; \ + done include $(TOPDIR)/Rules.make

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue May 23 2000 - 21:00:18 EST