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