From 83618bd71be40597ed2e32e5e0ff38d717fbad9c Mon Sep 17 00:00:00 2001 From: Daira Hopwood Date: Wed, 26 Jul 2017 11:38:26 +0100 Subject: [PATCH] Makefile changes to support latexmk and building sapling.pdf. Signed-off-by: Daira Hopwood --- protocol/Makefile | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/protocol/Makefile b/protocol/Makefile index 9d7be265..9b14402a 100644 --- a/protocol/Makefile +++ b/protocol/Makefile @@ -4,29 +4,33 @@ protocol.pdf: protocol.tex zcash.bib incremental_merkle.pdf key_components.pdf sapling.pdf: protocol.tex zcash.bib incremental_merkle.pdf key_components.pdf $(MAKE) sapling -LATEX=pdflatex - .PHONY: pdf pdf: printf '\\renewcommand{\\docversion}{Version %s}' "$$(git describe --tags --abbrev=6)" |tee protocol.ver - # If $(LATEX) fails, touch an input so that 'make' won't think it is up-to-date next time. + # If latexmk fails, touch an input so that 'make' won't think it is up-to-date next time. rm -f protocol.aux protocol.bbl protocol.blg protocol.brf protocol.bcf - $(LATEX) protocol.tex || { touch incremental_merkle.pdf; exit 1; } - biber protocol - $(LATEX) protocol.tex || { touch incremental_merkle.pdf; exit 1; } - $(LATEX) protocol.tex || { touch incremental_merkle.pdf; exit 1; } - $(LATEX) protocol.tex || { touch incremental_merkle.pdf; exit 1; } + latexmk -bibtex -pdf protocol || { touch incremental_merkle.pdf; exit 1; } + +.PHONY: pvcpdf +pvcpdf: + printf '\\renewcommand{\\docversion}{Version %s}' "$$(git describe --tags --abbrev=6)" |tee protocol.ver + # If latexmk fails, touch an input so that 'make' won't think it is up-to-date next time. + rm -f protocol.aux protocol.bbl protocol.blg protocol.brf protocol.bcf + latexmk -bibtex -pdf -pvc protocol .PHONY: sapling sapling: printf '\\toggletrue{issapling}\n\\renewcommand{\\docversion}{Version %s [Sapling]}' "$$(git describe --tags --abbrev=6)" |tee protocol.ver - # If $(LATEX) fails, touch an input so that 'make' won't think it is up-to-date next time. + # If latexmk fails, touch an input so that 'make' won't think it is up-to-date next time. rm -f sapling.aux sapling.bbl sapling.blg sapling.brf sapling.bcf - $(LATEX) -jobname=sapling protocol.tex || { touch incremental_merkle.pdf; exit 1; } - biber sapling - $(LATEX) -jobname=sapling protocol.tex || { touch incremental_merkle.pdf; exit 1; } - $(LATEX) -jobname=sapling protocol.tex || { touch incremental_merkle.pdf; exit 1; } - $(LATEX) -jobname=sapling protocol.tex || { touch incremental_merkle.pdf; exit 1; } + latexmk -bibtex -pdf -jobname=sapling protocol || { touch incremental_merkle.pdf; exit 1; } + +.PHONY: pvcsapling +pvcsapling: + printf '\\toggletrue{issapling}\n\\renewcommand{\\docversion}{Version %s [Sapling]}' "$$(git describe --tags --abbrev=6)" |tee protocol.ver + # If latexmk fails, touch an input so that 'make' won't think it is up-to-date next time. + rm -f sapling.aux sapling.bbl sapling.blg sapling.brf sapling.bcf + latexmk -bibtex -pdf -jobname=sapling -pvc protocol .PHONY: clean clean: