Documentation Tools
Changeset 173
- Timestamp:
- 05/23/07 23:16:28 (5 years ago)
- Location:
- trunk/Mk
- Files:
-
- 1 edited
- 1 copied
-
docbook.mk (modified) (2 diffs, 1 prop)
-
man.mk (copied) (copied from trunk/Mk/docbook.mk) (1 diff, 1 prop)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mk/docbook.mk
- Property svn:keywords set to Id
r172 r173 1 # $Id$ 2 # This Makefile deals with articles written in docbook, and rendering 3 # those articles to varius formats (namely XHTML and PDF). 1 4 2 5 # XSLT … … 23 26 all: xhtml xhtml-single 24 27 25 xhtml: $(XHTMLDIR)/$(NAME)/index.html 28 xhtml: $(XHTMLDIR)/$(NAME)/index.html 26 29 27 30 xhtml-single: $(XHTMLDIR)/$(NAME)-single/index.html -
trunk/Mk/man.mk
- Property svn:keywords set to Id
r172 r173 1 # $Id$ 2 # This Makefile provides rules for building manpages with docbook, 3 # and rendering those pages to various formats (namely roff). 4 5 # XXX are figures supported? We only use roff for ASCII output 6 # (XHTML or TeX otherwise), so is that relevant? What about 7 # tables (perhaps with the tbl macros)? 8 9 # Just because I always forget: groff -man -Tascii <file> | less 1 10 2 11 # XSLT 3 DOCBOOK_XSL = /usr/local/share/xsl/docbook 12 # Currently we have no customisations here 4 13 XSLT = xsltproc --xinclude 5 XHTMLSTYLE ?= ../doctools/xsl/docbook-chunked.xsl 6 XHTMLSTYLE_SINGLE ?= ../doctools/xsl/docbook-single.xsl 14 MANSTYLE ?= http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl 7 15 8 # PDF via dblatex (so much better than XSL-FO) 9 # Requires dblatex, http://dblatex.sf.net 10 DBLATEX = /usr/local/bin/dblatex 11 PDFSTYLE = simple 16 MANDIR = ../roff 17 STYLEOPT= --stringparam man.hyphenate 1 \ 18 --stringparam man.justify 1 \ 19 --stringparam man.hyphenate.urls 0 \ 20 --stringparam man.break.after.slash 1 \ 21 --stringparam man.hyphenate.filenames 0 \ 22 --stringparam man.hyphenate.computer.inlines 0 \ 23 --stringparam man.links.are.numbered 1 \ 24 --stringparam man.links.list.enabled 1 12 25 13 XHTMLDIR = ../xhtml 14 PDFDIR = ../pdf 15 RESOURCES ?= ../doctools/resources/*.css ../doctools/resources/*.png 16 CSSFILE ?= docs.css 17 STYLEOPT= --stringparam html.stylesheet $(CSSFILE) \ 18 --stringparam chunker.output.encoding UTF-8 \ 19 --stringparam chunk.section.depth 0 \ 20 --stringparam project_url $(PROJECT_URL) \ 21 --stringparam project_name $(PROJECT_NAME) 26 all: man 22 27 23 all: xhtml xhtml-single 28 man: $(MANDIR)/$(NAME) 24 29 25 xhtml: $(XHTMLDIR)/$(NAME)/index.html 30 $(MANDIR)/$(NAME): $(MANDIR) 31 $(XSLT) $(STYLEOPT) -o $(MANDIR)/$(NAME) $(MANSTYLE) $(SOURCE) 26 32 27 xhtml-single: $(XHTMLDIR)/$(NAME)-single/index.html 28 29 pdf: $(PDFDIR) 30 $(DBLATEX) -T $(PDFSTYLE) $(SOURCE) -o $(PDFDIR)/$(NAME).pdf 31 32 $(XHTMLDIR)/$(NAME)/index.html: resources 33 $(XSLT) $(STYLEOPT) -o $(XHTMLDIR)/$(NAME)/ $(XHTMLSTYLE) $(SOURCE) 34 35 $(XHTMLDIR)/$(NAME)-single/index.html: resources-single 36 $(XSLT) $(STYLEOPT) -o $(XHTMLDIR)/$(NAME)-single/index.html $(XHTMLSTYLE_SINGLE) $(SOURCE) 37 38 $(PDFDIR)/design.fo: $(PDFDIR) 39 $(XSLT) -o $(PDFDIR)/$(NAME).fo $(FOSTYLE) $(SOURCE) 40 41 $(PDFDIR): 42 mkdir -p $(PDFDIR) 43 44 $(XHTMLDIR)/$(NAME): 45 mkdir -p $(XHTMLDIR)/$(NAME) 46 47 $(XHTMLDIR)/$(NAME)-single: 48 mkdir -p $(XHTMLDIR)/$(NAME)-single 49 50 resources: $(XHTMLDIR)/$(NAME) 51 cp -r $(RESOURCES) $(XHTMLDIR)/$(NAME) 52 53 resources-single: $(XHTMLDIR)/$(NAME)-single 54 cp -r $(RESOURCES) $(XHTMLDIR)/$(NAME)-single 33 $(MANDIR): 34 mkdir -p $(MANDIR) 55 35 56 36 clean: 57 rm -rf $(XHTMLDIR)/$(NAME) 58 rm -rf $(XHTMLDIR)/$(NAME)-single 59 rm -rf $(PDFDIR) 37 rm -f $(MANDIR)/$(NAME) 60 38 61 39 force:
Note: See TracChangeset
for help on using the changeset viewer.