Getter to allow query to be read from team.
[mkws-moved-to-github.git] / doc / Makefile
1 # Copyright (c) 2013-2014 IndexData ApS. http://indexdata.com
2
3 DOCS = README.html README.odt README.pdf \
4        mkws-manual.html mkws-manual.odt mkws-manual.pdf \
5        mkws-developer.html mkws-developer.odt mkws-developer.pdf
6
7 INSTALLABLE = README.html mkws-manual.html mkws-developer.html mkws-doc.css
8 INSTALLED = $(INSTALLABLE:%=../tools/htdocs/%)
9
10 install: $(INSTALLED)
11
12 uninstall:
13         rm -f $(INSTALLED)
14
15 ../tools/htdocs/%: %
16         rm -f $@
17         cp -p $? $@
18         chmod ugo-w $@
19
20 all: $(DOCS)
21
22 # For a description of pandoc's markdown format, see:
23 # http://johnmacfarlane.net/pandoc/demo/example9/pandocs-markdown.html -->
24
25 # for older pandoc (<1.9) run first:
26 # perl -i.bak -npe 's/"(Authors|Subjects)": "(.*?)"/"$1": "test"/' tools/htdocs/mkws-manual.markdown
27 #
28 %.html: %.markdown
29         rm -f $@
30         pandoc --standalone --toc -c mkws-doc.css $< | sed '/^<col width="[0-9]*%" \/>$//d' > $@
31         chmod ugo-w $@
32
33 %.odt: %.markdown
34         rm -f $@
35         pandoc --standalone $< -o $@
36         chmod ugo-w $@
37
38 # ### In order to compile the manual, which has tables, to PDF,
39 # you will need to install the Debian package
40 #       texlive-latex-recommended
41 %.pdf: %.markdown
42         rm -f $@
43         pandoc --standalone $< -o $@
44         chmod ugo-w $@
45
46 clean:
47         rm -f $(DOCS)
48
49 distclean: clean uninstall
50
51 help:
52         @echo "make [ all | install | clean | distclean ]"
53