Merge branch 'master' of github.com:BetterCrypto/Applied-Crypto-Hardening
[ach-master.git] / src / Makefile
1 NOW := $(shell date)
2
3 all:    pdf html md
4
5 pdf: 
6         ./update-metadata-for-gitinfo
7         pdflatex applied-crypto-hardening
8         bibtex applied-crypto-hardening
9         while grep -s "Rerun to get cross-references right" \
10         applied-crypto-hardening.log ; do \
11             pdflatex applied-crypto-hardening ; \
12         done
13         #dvipdfm -z 9 applied-crypto-hardening
14         #dvipdf applied-crypto-hardening.dvi
15
16 html:
17         latex2html applied-crypto-hardening
18
19 md:
20         pandoc -f latex -t markdown -o applied-crypto-hardening.markdown \
21             applied-crypto-hardening.tex
22
23 #epub:
24          # experimental
25 #        ~/Library/texmf/tex/latex/tex4ebook/tex4ebook applied-crypto-hardening.tex
26
27 epub:
28  # experimental
29         pandoc -f latex -t epub -o applied-crypto-hardening.epub applied-crypto-hardening.tex
30
31 upload:
32         rsync -avz --progress --no-p --no-g --no-t applied-crypto-hardening.pdf www.bettercrypto.org:/var/www/static/
33
34 www:    pdf upload
35
36 clean:
37         rm -f applied-crypto-hardening.aux applied-crypto-hardening.bbl \
38             applied-crypto-hardening.blg applied-crypto-hardening.dvi   \
39             applied-crypto-hardening.log applied-crypto-hardening.pdf   \
40             applied-crypto-hardening.toc applied-crypto-hardening.markdown \
41                         applied-crypto-hardening.out
42         find . -name "*_generated.tex" -exec rm \{\} \;
43         rm -rf applied-crypto-hardening/
44         rm -rf gitHeadInfo.gin