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