aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammad Akhlaghi <mohammad@akhlaghi.org>2020-07-05 16:18:45 +0100
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2020-07-05 16:18:45 +0100
commit5d97210eef4ba7804501c28b0ddeb9ffe1e23064 (patch)
tree67d32de68e17fbcde34e22f325efebd6fda7057c
parent1bc00c9e64bba6ebd4c90301cc2a22f25466f72f (diff)
Removing possibly existing paper.bbl before remaking it
Until now, when the bibliography file ('paper.bbl') had a LaTeX-related error (for example the journal name was a LaTeX macro that isn't defined), the first 'pdflatex' command that is run before 'biber' would crash, not allowing the project to reach 'biber'. So the user would have to manually remove 'paper.bbl' before running './project make'. With this commit, we remove any possibly existing 'paper.bbl' file before rebuilding it. Generally, this also helps in keeping things clean during the generation of the new bibliography. This bug was found by Mahdieh Nabavi.
-rw-r--r--reproduce/analysis/make/paper.mk6
1 files changed, 6 insertions, 0 deletions
diff --git a/reproduce/analysis/make/paper.mk b/reproduce/analysis/make/paper.mk
index 5227e55..e207337 100644
--- a/reproduce/analysis/make/paper.mk
+++ b/reproduce/analysis/make/paper.mk
@@ -101,6 +101,12 @@ $(texbdir)/paper.bbl: tex/src/references.tex $(mtexdir)/dependencies-bib.tex \
export TEXINPUTS=$$p:
cd $(texbdir);
+ # Delete any possibly existing target (a '.bbl' file) to avoid
+ # complications with LaTeX being run before the command that
+ # generates it. Otherwise users will have to manually delete
+ # it. It will be built anyway once this rule is done.
+ rm -f $@
+
# The pdflatex option '-shell-escape' is "normally disallowed for
# security reasons" according to the `info pdflatex' manual, but
# is enabled here in order to allow the use of PGFPlots. If you