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