Debian Codegraph @

doc/Makefile

raw symbols SCIP
1 #
2 # Makefile for making html and pdf documentation (etc) of the libpgtcl
3 # interface.
4 #
5 # This requires all that complicated docbook sgml stuff, plus tex if you
6 # want to generate postscript or pdf. You need at least
7 # openjade and pdfjadetex to run it, plus all the stuff they need.
8 #
9 # There is a lot of useful information on
10 #
11 # http://www.postgresql.org/docs/7.3/static/doc-toolsets.html
12 #
13 # The man page generation requires docbook2X
14 #
15 # http://docbook2x.sourceforge.net/
16 #
17
18
19 STYLESHEET=stylesheet.dsl
20 SGMLSOURCE=libpgtcl.sgml
21
22 all: html man pdf
23
24 .PHONY: html man pdf clean
25
26 html: html/HTML.index
27 html/HTML.index: $(SGMLSOURCE)
28 -rm -rf html
29 -mkdir html
30 cd html && docbook2html -s /usr/share/xml/docbook/schema -i output-html -d ../$(STYLESHEET) ../$(SGMLSOURCE)
31 -find html/ -type f -name "*.html" -exec tidy -quiet -wrap 2000 -modify \{\} \;
32 sh ./clean-html.sh html/*
33
34 man: $(SGMLSOURCE)
35 -rm -rf man
36 -mkdir man
37 cp $(SGMLSOURCE) man/$(SGMLSOURCE)
38 cd man && docbook2man -V default-manpage-section=n $(SGMLSOURCE)
39 rm man/$(SGMLSOURCE)*
40 find man -name \*\. -exec mv {} {}n \;
41 sh ./fix-fi.sh man/*
42 sh ./clean-man.sh man/*
43
44
45 # Install Debian packages docbook-utils and ghostscript
46 pdf: libpgtcl.pdf
47 libpgtcl.pdf: $(SGMLSOURCE)
48 rm -f libpgtcl.ps libpgtcl.pdf
49 docbook2ps -V default-manpage-section=n $(SGMLSOURCE)
50 ps2pdf libpgtcl.ps
51
52 clean:
53 rm -rf man html libpgtcl.aux libpgtcl.log libpgtcl.out libpgtcl.tex-pdf libpgtcl.fot
54
55 all-man-docker:
56 mkdir -p docker-context
57 cd docker-context && docker build -t pgtcl-doc -f ../Dockerfile .
58 docker run --rm -it -v $$PWD:/root/doc pgtcl-doc make all
59 docker rmi pgtcl-doc