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