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.mk56
1 files changed, 56 insertions, 0 deletions
diff --git a/reproduce/src/make/paper.mk b/reproduce/src/make/paper.mk
index d50c59a..8e024ee 100644
--- a/reproduce/src/make/paper.mk
+++ b/reproduce/src/make/paper.mk
@@ -22,6 +22,62 @@
+# LaTeX macros for paper
+# ----------------------
+#
+# To report the input settings and results, the final report's PDF
+# (final target of this reproduction pipeline) uses macros generated
+# from various steps of the pipeline. All these macros are defined in
+# `tex/pipeline.tex'.
+#
+# `tex/pipeline.tex' is actually just a combination of separate files
+# that keep the LaTeX macros related to each workhorse Makefile (in
+# `reproduce/src/make/*.mk'). Those individual macros are
+# pre-requisites to `tex/pipeline.tex'. The only workhorse Makefile
+# that doesn't need to produce LaTeX macros is this Makefile
+# (`reproduce/src/make/paper.mk').
+#
+# This file is thus the interface between the pipeline scripts and the
+# final PDF: when we get to this point, all the processing has been
+# completed.
+#
+# Note that if you don't want the final PDF and just want the
+# processing and file outputs, you can remove the value of
+# `pdf-build-final' in `reproduce/config/pipeline/pdf-build.mk'.
+tex/pipeline.tex: $(foreach s, $(subst paper,,$(makesrc)), $(mtexdir)/$(s).tex)
+
+ # If no PDF is requested, or if LaTeX isn't available, don't
+ # continue to building the final PDF. Otherwise, merge all the TeX
+ # macros into one for building the PDF.
+ @if [ -f .local/bin/pdflatex ] && [ x"$(pdf-build-final)" != x ]; then
+ cat $(mtexdir)/*.tex > $@
+ else
+ echo
+ echo "-----"
+ echo "The processing has COMPLETED SUCCESSFULLY! But the final "
+ echo "LaTeX-built PDF paper will not be built."
+ echo
+ if [ x$(more-on-building-pdf) = x1 ]; then
+ echo "To do so, make sure you have LaTeX within the pipeline (you"
+ echo "can check by running './.local/bin/latex --version'), _AND_"
+ echo "make sure that the 'pdf-build-final' variable has a value."
+ echo "'pdf-build-final' is defined in: "
+ echo "'reproduce/config/pipeline/pdf-build.mk'."
+ echo
+ echo "If you don't have LaTeX within the pipeline, please re-run"
+ echo "'./configure' when you have internet access. To speed it up,"
+ echo "you can keep the previous configuration files (answer 'n'"
+ echo "when it asks about re-writing previous configuration files)."
+ else
+ echo "For more, run './.local/bin/make more-on-building-pdf=1'"
+ fi
+ echo
+ echo "" > $@
+ fi
+
+
+
+
# The bibliography
# ----------------