accomodate for different latex output warnings about undefined refs
[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         makeglossaries applied-crypto-hardening
16         ${LATEX} applied-crypto-hardening
17         while grep -E "(Rerun to get cross-references right)|(There were undefined references)" \
18         applied-crypto-hardening.log ; do \
19             ${LATEX} applied-crypto-hardening ; \
20         done
21         #dvipdfm -z 9 applied-crypto-hardening
22         #dvipdf applied-crypto-hardening.dvi
23
24 html:
25         latex2html applied-crypto-hardening
26
27 md:
28         pandoc -f latex -t markdown -o applied-crypto-hardening.markdown \
29             applied-crypto-hardening.tex
30
31 # experimental
32 txt:
33         detex applied-crypto-hardening > applied-crypto-hardening.txt
34
35
36 #epub:
37          # experimental
38 #        ~/Library/texmf/tex/latex/tex4ebook/tex4ebook applied-crypto-hardening.tex
39
40 epub:
41  # experimental
42         pandoc -f latex -t epub -o applied-crypto-hardening.epub applied-crypto-hardening.tex
43
44 upload:
45         rsync -avz --progress --no-p --no-g --no-t applied-crypto-hardening.pdf www.bettercrypto.org:/var/www/static/
46         rsync -avz --progress --no-p --no-g --no-t configuration www.bettercrypto.org:/var/www/static/
47
48 www:    pdf upload
49
50 clean:
51         rm -f applied-crypto-hardening.aux applied-crypto-hardening.bbl \
52             applied-crypto-hardening.blg applied-crypto-hardening.dvi   \
53             applied-crypto-hardening.log applied-crypto-hardening.pdf   \
54             applied-crypto-hardening.toc applied-crypto-hardening.markdown \
55             applied-crypto-hardening.glo applied-crypto-hardening.glg \
56             applied-crypto-hardening.gls applied-crypto-hardening.ind \
57             applied-crypto-hardening.ilg applied-crypto-hardening.ist \
58             applied-crypto-hardening.idx applied-crypto-hardening.lol \
59                         applied-crypto-hardening.out
60         rm -rf applied-crypto-hardening/
61         rm -rf gitHeadInfo.gin
62         rm -f applied-crypto-hardening.txt