Add rules to install compiled markdown->html files.
[mkws-moved-to-github.git] / doc / Makefile
1 DOCS = README.html README.odt README.pdf \
2        whitepaper.html whitepaper.odt whitepaper.pdf
3
4 # Default rule when "make" is invoked without a target
5 **default**: README.html whitepaper.html
6
7 INSTALLABLE = README.html whitepaper.html
8 INSTALLED = $(INSTALLABLE:%=../tools/htdocs/%)
9
10 install: $(INSTALLED)
11
12 uninstall:
13         rm -f $(INSTALLED)
14
15 all: $(DOCS)
16
17 # For a description of pandoc's markdown format, see:
18 # http://johnmacfarlane.net/pandoc/demo/example9/pandocs-markdown.html -->
19
20 # for older pandoc (<1.9) run first:
21 # perl -i.bak -npe 's/"(Authors|Subjects)": "(.*?)"/"$1": "test"/' tools/htdocs/whitepaper.markdown
22 #
23 %.html: %.markdown
24         rm -f $@
25         pandoc --standalone --toc -c mkws-doc.css $< | sed '/^<col width="[0-9]*%" \/>$//d' > $@
26         chmod ugo-w $@
27
28 %.odt: %.markdown
29         rm -f $@
30         pandoc --standalone $< -o $@
31         chmod ugo-w $@
32
33 # ### In order to compile the whitepaper, which has tables, to PDF,
34 # you will need to install the Debian package
35 #       texlive-latex-recommended
36 %.pdf: %.markdown
37         rm -f $@
38         pandoc --standalone $< -o $@
39         chmod ugo-w $@
40
41 clean:
42         rm -f $(DOCS)
43