2018-05-30 09:05:11 -07:00
|
|
|
LATEXMK=latexmk --halt-on-error -bibtex -pdf
|
|
|
|
LATEX=pdflatex --halt-on-error
|
|
|
|
|
2018-08-05 02:02:24 -07:00
|
|
|
sprout.pdf: protocol.tex zcash.bib incremental_merkle.pdf key_components.pdf
|
2016-02-16 11:45:29 -08:00
|
|
|
$(MAKE) pdf
|
|
|
|
|
2018-03-18 06:27:13 -07:00
|
|
|
sapling.pdf: protocol.tex zcash.bib incremental_merkle.pdf key_components_sapling.pdf
|
2017-07-10 23:58:57 -07:00
|
|
|
$(MAKE) sapling
|
|
|
|
|
2018-08-05 02:02:24 -07:00
|
|
|
.PHONY: auxsprout
|
|
|
|
auxsprout:
|
2018-07-18 03:17:33 -07:00
|
|
|
printf '\\renewcommand{\\docversion}{Version %s [\\SproutSpec]}' "$$(git describe --tags --abbrev=6)" |tee protocol.ver
|
2018-03-18 06:27:13 -07:00
|
|
|
mkdir -p aux
|
2018-08-05 02:02:24 -07:00
|
|
|
rm -f aux/sprout.* aux/protocol.*
|
|
|
|
$(LATEXMK) -jobname=sprout -auxdir=aux -outdir=aux protocol
|
2017-07-26 03:38:26 -07:00
|
|
|
|
2018-08-05 02:02:24 -07:00
|
|
|
.PHONY: sprout
|
|
|
|
sprout:
|
|
|
|
$(MAKE) auxsprout
|
|
|
|
mv -f aux/sprout.pdf .
|
2017-12-01 17:39:17 -08:00
|
|
|
|
2018-08-05 02:02:24 -07:00
|
|
|
.PHONY: pvcsprout
|
|
|
|
pvcsprout:
|
2018-07-18 03:17:33 -07:00
|
|
|
printf '\\renewcommand{\\docversion}{Version %s [\\SproutSpec]}' "$$(git describe --tags --abbrev=6)" |tee protocol.ver
|
2018-03-18 06:27:13 -07:00
|
|
|
mkdir -p aux
|
2018-08-05 02:02:24 -07:00
|
|
|
rm -f aux/sprout.* aux/protocol.*
|
|
|
|
$(LATEXMK) -jobname=sprout -auxdir=aux -pvc protocol
|
2015-12-22 18:13:11 -08:00
|
|
|
|
2018-03-26 11:25:46 -07:00
|
|
|
.PHONY: auxsapling
|
|
|
|
auxsapling:
|
2017-12-16 16:39:31 -08:00
|
|
|
printf '\\toggletrue{issapling}\n\\renewcommand{\\docversion}{Version %s [\\SaplingSpec]}' "$$(git describe --tags --abbrev=6)" |tee protocol.ver
|
2018-03-18 06:27:13 -07:00
|
|
|
mkdir -p aux
|
|
|
|
rm -f aux/sapling.*
|
2018-05-30 09:05:11 -07:00
|
|
|
$(LATEXMK) -jobname=sapling -auxdir=aux -outdir=aux protocol
|
2018-03-26 11:25:46 -07:00
|
|
|
|
|
|
|
.PHONY: sapling
|
|
|
|
sapling:
|
|
|
|
$(MAKE) auxsapling
|
2018-03-18 06:27:13 -07:00
|
|
|
mv -f aux/sapling.pdf .
|
2018-08-05 02:02:24 -07:00
|
|
|
ln -sf sapling.pdf protocol.pdf
|
2017-07-26 03:38:26 -07:00
|
|
|
|
|
|
|
.PHONY: pvcsapling
|
|
|
|
pvcsapling:
|
2017-12-16 16:39:31 -08:00
|
|
|
printf '\\toggletrue{issapling}\n\\renewcommand{\\docversion}{Version %s [\\SaplingSpec]}' "$$(git describe --tags --abbrev=6)" |tee protocol.ver
|
2018-03-18 06:27:13 -07:00
|
|
|
mkdir -p aux
|
|
|
|
rm -f aux/sapling.*
|
2018-05-30 09:05:11 -07:00
|
|
|
$(LATEXMK) -jobname=sapling -auxdir=aux -pvc protocol
|
2018-01-25 12:14:28 -08:00
|
|
|
|
2018-08-05 02:02:24 -07:00
|
|
|
.PHONY: nolatexmk-sprout
|
|
|
|
nolatexmk-sprout:
|
2018-07-18 03:17:33 -07:00
|
|
|
printf '\\renewcommand{\\docversion}{Version %s [\\SproutSpec]}' "$$(git describe --tags --abbrev=6)" |tee protocol.ver
|
2018-01-25 12:14:28 -08:00
|
|
|
# If $(LATEX) fails, touch an input so that 'make' won't think it is up-to-date next time.
|
2018-08-05 02:02:24 -07:00
|
|
|
rm -f sprout.aux sprout.bbl sprout.blg sprout.brf sprout.bcf
|
2018-01-25 12:14:28 -08:00
|
|
|
$(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; }
|
|
|
|
|
|
|
|
.PHONY: nolatexmk-sapling
|
|
|
|
nolatexmk-sapling:
|
|
|
|
printf '\\toggletrue{issapling}\n\\renewcommand{\\docversion}{Version %s [\\SaplingSpec]}' "$$(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.
|
|
|
|
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; }
|
|
|
|
|
2018-03-26 11:25:46 -07:00
|
|
|
.PHONY: html
|
2018-08-05 02:02:24 -07:00
|
|
|
html: sprout.pdf sapling.pdf
|
2018-03-26 11:25:46 -07:00
|
|
|
# Can't use --split-pages 1 because XHR doesn't work by default on local files in Chrome.
|
2018-08-05 02:02:24 -07:00
|
|
|
pdf2htmlEX --decompose-ligature 1 --font-size-multiplier 65 --fit-width 1000 --dest-dir html sprout.pdf
|
2018-03-26 11:25:46 -07:00
|
|
|
pdf2htmlEX --decompose-ligature 1 --font-size-multiplier 65 --fit-width 1000 --dest-dir html sapling.pdf
|
|
|
|
|
2015-12-22 18:13:11 -08:00
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
2018-03-24 02:11:18 -07:00
|
|
|
rm -f aux/* html/* protocol.ver \
|
2018-08-05 02:02:24 -07:00
|
|
|
sprout.dvi sprout.pdf sprout.bbl sprout.blg sprout.brf sprout.toc \
|
|
|
|
sprout.aux sprout.out sprout.log sprout.bcf sprout.run.xml sprout.fls sprout.fdb_latexmk \
|
|
|
|
sapling.dvi sapling.pdf sapling.bbl sapling.blg sapling.brf sapling.toc \
|
|
|
|
sapling.aux sapling.out sapling.log sapling.bcf sapling.run.xml sapling.fls sapling.fdb_latexmk
|
2018-03-24 02:10:32 -07:00
|
|
|
|
|
|
|
optimizer-installed.flag:
|
|
|
|
# Nail down git commits to make backdooring somewhat harder.
|
|
|
|
git clone https://github.com/pts/sam2p.git
|
|
|
|
cd sam2p && git reset --hard a2d7819107324faf7b0904fc7074f7dd4a0e16c7 && $(MAKE)
|
|
|
|
git clone https://github.com/pts/tif22pnm.git
|
|
|
|
cd tif22pnm && git reset --hard 22217c1a3ea355a899e9c7c79903488ca13d1dfe && $(MAKE)
|
|
|
|
git clone https://github.com/pts/pdfsizeopt.git
|
|
|
|
cd pdfsizeopt && git reset --hard 47a03403d70f6975888cee966858bebc51b76463
|
|
|
|
touch optimizer-installed.flag
|
|
|
|
|
|
|
|
.PHONY: clean-optimizer
|
|
|
|
clean-optimizer:
|
|
|
|
rm -rf sam2p tif22pnm pdfsizeopt optimizer-installed.flag
|
|
|
|
|
2018-08-05 02:02:24 -07:00
|
|
|
.PHONY: optsprout
|
|
|
|
optsprout: optimizer-installed.flag
|
|
|
|
$(MAKE) auxsprout
|
2018-03-26 04:05:35 -07:00
|
|
|
PATH="${PATH}:$(CURDIR)/sam2p:$(CURDIR)/tif22pnm" pdfsizeopt/pdfsizeopt --v=40 --use-image-optimizer=sam2p \
|
2018-08-05 02:02:24 -07:00
|
|
|
--tmp-dir=aux aux/sprout.pdf sprout.pdf
|
2018-03-24 02:10:32 -07:00
|
|
|
|
2018-03-26 11:25:46 -07:00
|
|
|
.PHONY: optsapling
|
|
|
|
optsapling: optimizer-installed.flag
|
|
|
|
$(MAKE) auxsapling
|
2018-03-26 04:05:35 -07:00
|
|
|
PATH="${PATH}:$(CURDIR)/sam2p:$(CURDIR)/tif22pnm" pdfsizeopt/pdfsizeopt --v=40 --use-image-optimizer=sam2p \
|
2018-03-26 11:25:46 -07:00
|
|
|
--tmp-dir=aux aux/sapling.pdf sapling.pdf
|
2018-08-05 02:02:24 -07:00
|
|
|
ln -sf sapling.pdf protocol.pdf
|
2018-03-24 02:10:32 -07:00
|
|
|
|
|
|
|
.PHONY: optimized
|
2018-08-05 02:02:24 -07:00
|
|
|
optimized: optsprout optsapling
|