aboutsummaryrefslogtreecommitdiff
path: root/reproduce/src/make/paper.mk
diff options
context:
space:
mode:
Diffstat (limited to 'reproduce/src/make/paper.mk')
-rw-r--r--reproduce/src/make/paper.mk17
1 files changed, 12 insertions, 5 deletions
diff --git a/reproduce/src/make/paper.mk b/reproduce/src/make/paper.mk
index 0725ec8..db20279 100644
--- a/reproduce/src/make/paper.mk
+++ b/reproduce/src/make/paper.mk
@@ -1,9 +1,9 @@
# Build the final PDF paper/report.
#
# Original author:
-# Your name <your@email.address>
+# Mohammad Akhlaghi <mohammad@akhlaghi.org>
# Contributing author(s):
-# Copyright (C) YYYY, Your Name.
+# Copyright (C) 2018, Mohammad Akhlaghi.
#
# This script is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
@@ -27,8 +27,15 @@
#
# The commands to build the final report. We want the pipeline version to
# be checked everytime the final PDF is to be built.
-paper.pdf: tex/pipeline.tex paper.tex
+texbdir=$(texdir)/build
+tikzdir=$(texbdir)/tikz
+$(texbdir): | $(texdir); mkdir $@
+$(tikzdir): | $(texbdir); mkdir $@
+paper.pdf: tex/pipeline.tex paper.tex | $(tikzdir) $(texbdir)
# Make the report.
- @pdflatex -shell-escape -halt-on-error paper.tex
- @rm -f *.auxlock *.aux *.out *.log
+ p=$$(pwd); \
+ export TEXINPUTS=$$p:$$TEXINPUTS; \
+ cd $(texbdir); \
+ pdflatex -shell-escape -halt-on-error $$p/paper.tex
+ cp $(texbdir)/$@ $@