aboutsummaryrefslogtreecommitdiff
path: root/reproduce/src/make/paper.mk
diff options
context:
space:
mode:
authorMohammad Akhlaghi <mohammad@akhlaghi.org>2018-11-20 19:31:12 +0000
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2018-11-20 20:16:29 +0000
commit11d5e76a7f89abe6da0b7c2b948f97f5c1cdc508 (patch)
tree36675b4cfe15d8ae36ac3e715b3090e7c2298b8a /reproduce/src/make/paper.mk
parent1edf44917b4d28eba7d7344616b2ed3b43e29168 (diff)
Configure script passes if TeX Live was not finalized
When there is a problem in creating the final TeX Live installation, the previous version of the pipeline would not understand and just finish! We would later have problems in building the paper. So the following series of steps were taken: to keep the recipes in a shorter and easier to understand way, the steps to install TeX Live are now one rule (that produce `.local/bin/texlive-ready-tlmgr' when its successful), and the steps to install the necessary packages are in another rule (that produce `.local/bin/texlive-ready' when its successful). When control comes back inside configure, if `.local/bin/texlive-ready' isn't there (something failed during the TeX Live installation, or building packages), then the whole TeX Live installation directory (`.local/texlive') will be deleted along with the two output files. This will help ensure that future steps can check the availablility of a working TeX Live in the pipeline.
Diffstat (limited to 'reproduce/src/make/paper.mk')
-rw-r--r--reproduce/src/make/paper.mk43
1 files changed, 27 insertions, 16 deletions
diff --git a/reproduce/src/make/paper.mk b/reproduce/src/make/paper.mk
index 79d7722..d50c59a 100644
--- a/reproduce/src/make/paper.mk
+++ b/reproduce/src/make/paper.mk
@@ -37,14 +37,19 @@
# PDF.
$(texbdir)/paper.bbl: tex/references.tex \
| $(tikzdir) $(texbdir) tex/pipeline.tex
+ # If `tex/pipeline.tex' is empty, then the PDF must not be built.
+ @macros=$$(cat tex/pipeline.tex)
+ if [ x"$$macros" != x ]; then
- # We'll run LaTeX first to generate the `.bcf' file (necessary for
- # `biber') and then run `biber' to generate the `.bbl' file.
- p=$$(pwd);
- export TEXINPUTS=$$p:$$TEXINPUTS;
- cd $(texbdir);
- pdflatex -shell-escape -halt-on-error $$p/paper.tex;
- biber paper
+ # We'll run LaTeX first to generate the `.bcf' file (necessary
+ # for `biber') and then run `biber' to generate the `.bbl' file.
+ p=$$(pwd);
+ export TEXINPUTS=$$p:$$TEXINPUTS;
+ cd $(texbdir);
+ pdflatex -shell-escape -halt-on-error $$p/paper.tex;
+ biber paper
+
+ fi
@@ -61,13 +66,19 @@ $(texbdir)/paper.bbl: tex/references.tex \
paper.pdf: tex/pipeline.tex paper.tex $(texbdir)/paper.bbl \
| $(tikzdir) $(texbdir)
- # Go into the top TeX build directory and make the paper.
- p=$$(pwd)
- export TEXINPUTS=$$p:$$TEXINPUTS
- cd $(texbdir)
- pdflatex -shell-escape -halt-on-error $$p/paper.tex
+ # If `tex/pipeline.tex' is empty, then the PDF must not be built.
+ @macros=$$(cat tex/pipeline.tex)
+ if [ x"$$macros" != x ]; then
+
+ # Go into the top TeX build directory and make the paper.
+ p=$$(pwd)
+ export TEXINPUTS=$$p:$$TEXINPUTS
+ cd $(texbdir)
+ pdflatex -shell-escape -halt-on-error $$p/paper.tex
+
+ # Come back to the top pipeline directory and copy the built PDF
+ # file here.
+ cd $$p
+ cp $(texbdir)/$@ $@
- # Come back to the top pipeline directory and copy the built PDF
- # file here.
- cd $$p
- cp $(texbdir)/$@ $@
+ fi