add quotation mark in add_header HSTS directive
[ach-master.git] / src / Makefile
index 98ead94..437bbfb 100644 (file)
@@ -1,18 +1,24 @@
 NOW := $(shell date)
 
 NOW := $(shell date)
 
+TEXMFHOME ?={./texmf,$(shell kpsewhich -var-value TEXMFHOME)}
+LATEX = TEXMFHOME=${TEXMFHOME} pdflatex -synctex=1
+
 all:   pdf html md
 
 all:   pdf html md
 
-%_generated.tex: %.tex
-       ./perlify.pl
+once:
+       ${LATEX} applied-crypto-hardening
 
 pdf: 
        ./update-metadata-for-gitinfo
 
 pdf: 
        ./update-metadata-for-gitinfo
-       ./perlify.pl
-       pdflatex applied-crypto-hardening
+       ${LATEX} applied-crypto-hardening
        bibtex applied-crypto-hardening
        bibtex applied-crypto-hardening
+       makeglossaries applied-crypto-hardening
+       ${LATEX} applied-crypto-hardening
+       # re-do for refs
+       ${LATEX} applied-crypto-hardening
        while grep -s "Rerun to get cross-references right" \
         applied-crypto-hardening.log ; do \
        while grep -s "Rerun to get cross-references right" \
         applied-crypto-hardening.log ; do \
-           pdflatex applied-crypto-hardening ; \
+           ${LATEX} applied-crypto-hardening ; \
        done
        #dvipdfm -z 9 applied-crypto-hardening
        #dvipdf applied-crypto-hardening.dvi
        done
        #dvipdfm -z 9 applied-crypto-hardening
        #dvipdf applied-crypto-hardening.dvi
@@ -38,7 +44,8 @@ epub:
        pandoc -f latex -t epub -o applied-crypto-hardening.epub applied-crypto-hardening.tex
 
 upload:
        pandoc -f latex -t epub -o applied-crypto-hardening.epub applied-crypto-hardening.tex
 
 upload:
-       rsync -avz --progress --no-p --no-g --no-t applied-crypto-hardening.pdf www.bettercrypto.org:/var/www/static/
+       rsync -avz --progress --no-p --no-g --no-t applied-crypto-hardening.pdf www.bettercrypto.org:/var/www/bettercrypto.org/static
+       rsync -avz --progress --no-p --no-g --no-t configuration www.bettercrypto.org:/var/www/bettercrypto.org/static
 
 www:   pdf upload
 
 
 www:   pdf upload
 
@@ -47,8 +54,11 @@ clean:
             applied-crypto-hardening.blg applied-crypto-hardening.dvi   \
             applied-crypto-hardening.log applied-crypto-hardening.pdf   \
             applied-crypto-hardening.toc applied-crypto-hardening.markdown \
             applied-crypto-hardening.blg applied-crypto-hardening.dvi   \
             applied-crypto-hardening.log applied-crypto-hardening.pdf   \
             applied-crypto-hardening.toc applied-crypto-hardening.markdown \
+            applied-crypto-hardening.glo applied-crypto-hardening.glg \
+            applied-crypto-hardening.gls applied-crypto-hardening.ind \
+            applied-crypto-hardening.ilg applied-crypto-hardening.ist \
+            applied-crypto-hardening.idx applied-crypto-hardening.lol \
                        applied-crypto-hardening.out
                        applied-crypto-hardening.out
-       find . -name "*_generated.tex" -exec rm \{\} \;
        rm -rf applied-crypto-hardening/
        rm -rf gitHeadInfo.gin
        rm -rf applied-crypto-hardening/
        rm -rf gitHeadInfo.gin
-       rm applied-crypto-hardening.txt
+       rm -f applied-crypto-hardening.txt