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 once:
6         pdflatex applied-crypto-hardening
7
8 pdf: 
9         ./update-metadata-for-gitinfo
10         pdflatex applied-crypto-hardening
11         bibtex applied-crypto-hardening
12         while grep -s "Rerun to get cross-references right" \
13         applied-crypto-hardening.log ; do \
14             pdflatex applied-crypto-hardening ; \
15         done
16         #dvipdfm -z 9 applied-crypto-hardening
17         #dvipdf applied-crypto-hardening.dvi
18
19 html:
20         latex2html applied-crypto-hardening
21
22 md:
23         pandoc -f latex -t markdown -o applied-crypto-hardening.markdown \
24             applied-crypto-hardening.tex
25
26 # experimental
27 txt:
28         detex applied-crypto-hardening > applied-crypto-hardening.txt
29
30
31 #epub:
32          # experimental
33 #        ~/Library/texmf/tex/latex/tex4ebook/tex4ebook applied-crypto-hardening.tex
34
35 epub:
36  # experimental
37         pandoc -f latex -t epub -o applied-crypto-hardening.epub applied-crypto-hardening.tex
38
39 upload:
40         rsync -avz --progress --no-p --no-g --no-t applied-crypto-hardening.pdf www.bettercrypto.org:/var/www/static/
41
42 www:    pdf upload
43
44 clean:
45         rm -f applied-crypto-hardening.aux applied-crypto-hardening.bbl \
46             applied-crypto-hardening.blg applied-crypto-hardening.dvi   \
47             applied-crypto-hardening.log applied-crypto-hardening.pdf   \
48             applied-crypto-hardening.toc applied-crypto-hardening.markdown \
49                         applied-crypto-hardening.out
50         rm -rf applied-crypto-hardening/
51         rm -rf gitHeadInfo.gin
52         if [ -f "applied-crypto-hardening.txt" ]; then rm "applied-crypto-hardening.txt"; fi