New doc/Makefile, uses rules extracted from ../src/Makefile
[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 all: $(DOCS)
8
9 # For a description of pandoc's markdown format, see:
10 # http://johnmacfarlane.net/pandoc/demo/example9/pandocs-markdown.html -->
11
12 # for older pandoc (<1.9) run first:
13 # perl -i.bak -npe 's/"(Authors|Subjects)": "(.*?)"/"$1": "test"/' tools/htdocs/whitepaper.markdown
14 #
15 %.html: %.markdown
16         rm -f $@
17         pandoc --standalone --toc -c mkws-doc.css $< | sed '/^<col width="[0-9]*%" \/>$//d' > $@
18         chmod ugo-w $@
19
20 %.odt: %.markdown
21         rm -f $@
22         pandoc --standalone $< -o $@
23         chmod ugo-w $@
24
25 # ### In order to compile the whitepaper, which has tables, to PDF,
26 # you will need to install the Debian package
27 #       texlive-latex-recommended
28 %.pdf: %.markdown
29         rm -f $@
30         pandoc --standalone $< -o $@
31         chmod ugo-w $@
32
33 clean:
34         rm -f $(DOCS)
35