From 5fd898adea6ec3f75954101bcf21c1c030d00bf7 Mon Sep 17 00:00:00 2001 From: Daira Hopwood Date: Sun, 2 Sep 2018 08:50:40 +0100 Subject: [PATCH] Makefile fixes and improvements. Signed-off-by: Daira Hopwood --- protocol/Makefile | 6 +++--- protocol/README.rst | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/protocol/Makefile b/protocol/Makefile index ba864673..84e1c82a 100644 --- a/protocol/Makefile +++ b/protocol/Makefile @@ -2,7 +2,7 @@ LATEXMK=latexmk --halt-on-error -bibtex -pdf LATEX=pdflatex --halt-on-error 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 $(MAKE) sapling @@ -69,7 +69,7 @@ nolatexmk-sapling: $(LATEX) -jobname=sapling protocol.tex || { touch incremental_merkle.pdf; exit 1; } .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. 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 @@ -110,4 +110,4 @@ optsapling: optimizer-installed.flag cp -f sapling.pdf protocol.pdf .PHONY: optimized -optimized: optsprout optsapling +optimized: optsapling optsprout diff --git a/protocol/README.rst b/protocol/README.rst index 466a3ce8..b2497ab5 100644 --- a/protocol/README.rst +++ b/protocol/README.rst @@ -15,9 +15,10 @@ Building Use: -* ``make pdf`` to make the current protocol specification (``protocol.pdf``); * ``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. 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 ``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. @@ -38,16 +39,15 @@ Optionally, you can use `Péter Szabó `_'s Use: -* ``make optpdf`` to make an optimized version of ``protocol.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. This will probably only work on Linux. The first time one of these targets is run, it will automatically clone and build the necessary dependencies (pinned by ``git`` hash) from GitHub. -This gives a size saving of about 50% for ``protocol.pdf``, and -40% for ``sapling.pdf``. +This gives a size saving of about 40-50%. 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. -The results are placed in the ``html`` directory at ``html/protocol.html`` -and ``html/sapling.html``. +The results are placed in the ``html`` directory at ``html/sapling.html`` +and ``html/sprout.html``. See ``_ for limitations of this conversion.