Makefile fixes and improvements.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
Daira Hopwood 2018-09-02 08:50:40 +01:00
parent 5361fc591e
commit 5fd898adea
2 changed files with 11 additions and 11 deletions

View File

@ -2,7 +2,7 @@ LATEXMK=latexmk --halt-on-error -bibtex -pdf
LATEX=pdflatex --halt-on-error LATEX=pdflatex --halt-on-error
sprout.pdf: protocol.tex zcash.bib incremental_merkle.pdf key_components.pdf sprout.pdf: protocol.tex zcash.bib incremental_merkle.pdf key_components.pdf
$(MAKE) pdf $(MAKE) sprout
sapling.pdf: protocol.tex zcash.bib incremental_merkle.pdf key_components_sapling.pdf sapling.pdf: protocol.tex zcash.bib incremental_merkle.pdf key_components_sapling.pdf
$(MAKE) sapling $(MAKE) sapling
@ -69,7 +69,7 @@ nolatexmk-sapling:
$(LATEX) -jobname=sapling protocol.tex || { touch incremental_merkle.pdf; exit 1; } $(LATEX) -jobname=sapling protocol.tex || { touch incremental_merkle.pdf; exit 1; }
.PHONY: html .PHONY: html
html: sprout.pdf sapling.pdf html: sapling.pdf sprout.pdf
# Can't use --split-pages 1 because XHR doesn't work by default on local files in Chrome. # Can't use --split-pages 1 because XHR doesn't work by default on local files in Chrome.
pdf2htmlEX --decompose-ligature 1 --font-size-multiplier 65 --fit-width 1000 --dest-dir html sprout.pdf pdf2htmlEX --decompose-ligature 1 --font-size-multiplier 65 --fit-width 1000 --dest-dir html sprout.pdf
pdf2htmlEX --decompose-ligature 1 --font-size-multiplier 65 --fit-width 1000 --dest-dir html sapling.pdf pdf2htmlEX --decompose-ligature 1 --font-size-multiplier 65 --fit-width 1000 --dest-dir html sapling.pdf
@ -110,4 +110,4 @@ optsapling: optimizer-installed.flag
cp -f sapling.pdf protocol.pdf cp -f sapling.pdf protocol.pdf
.PHONY: optimized .PHONY: optimized
optimized: optsprout optsapling optimized: optsapling optsprout

View File

@ -15,9 +15,10 @@ Building
Use: Use:
* ``make pdf`` to make the current protocol specification (``protocol.pdf``);
* ``make sapling`` to make the draft specification for the Overwinter and * ``make sapling`` to make the draft specification for the Overwinter and
Sapling upgrades (``sapling.pdf``). Sapling upgrades (``sapling.pdf``);
* ``make sprout`` to make a version of the specification that does not
include Overwinter or Sapling.
By default these use ``latexmk``, which does not work on all systems. By default these use ``latexmk``, which does not work on all systems.
Use ``make nolatexmk-pdf`` or ``make nolatexmk-sapling`` if you run into Use ``make nolatexmk-pdf`` or ``make nolatexmk-sapling`` if you run into
@ -26,7 +27,7 @@ because it may not run ``pdflatex`` enough times.
There is also support for using the incremental (``-pvc``) mode of There is also support for using the incremental (``-pvc``) mode of
``latexmk`` to automatically rebuild when changes in the source files ``latexmk`` to automatically rebuild when changes in the source files
are detected: ``make pvcpdf`` or ``make pvcsapling``. are detected: ``make pvcsapling`` or ``make pvcsprout``.
Manual intervention is still needed when there are LaTeX errors. Manual intervention is still needed when there are LaTeX errors.
@ -38,16 +39,15 @@ Optionally, you can use `Péter Szabó <https://github.com/pts>`_'s
Use: Use:
* ``make optpdf`` to make an optimized version of ``protocol.pdf``;
* ``make optsapling`` to make an optimized version of ``sapling.pdf``; * ``make optsapling`` to make an optimized version of ``sapling.pdf``;
* ``make optsprout`` to make an optimized version of ``sprout.pdf``;
* ``make optimized`` to make both. * ``make optimized`` to make both.
This will probably only work on Linux. The first time one of these This will probably only work on Linux. The first time one of these
targets is run, it will automatically clone and build the necessary targets is run, it will automatically clone and build the necessary
dependencies (pinned by ``git`` hash) from GitHub. dependencies (pinned by ``git`` hash) from GitHub.
This gives a size saving of about 50% for ``protocol.pdf``, and This gives a size saving of about 40-50%.
40% for ``sapling.pdf``.
Converting to HTML Converting to HTML
@ -61,8 +61,8 @@ To convert to HTML you will first need to install ``pdf2htmlEX``. On Debian:
Then use ``make html`` (or ``make optimized html``) to convert both PDFs. Then use ``make html`` (or ``make optimized html``) to convert both PDFs.
The results are placed in the ``html`` directory at ``html/protocol.html`` The results are placed in the ``html`` directory at ``html/sapling.html``
and ``html/sapling.html``. and ``html/sprout.html``.
See `<https://github.com/zcash/zips/issues/127>`_ for limitations of See `<https://github.com/zcash/zips/issues/127>`_ for limitations of
this conversion. this conversion.