diff options
author | Mohammad Akhlaghi <mohammad@akhlaghi.org> | 2018-11-25 22:57:29 +0000 |
---|---|---|
committer | Mohammad Akhlaghi <mohammad@akhlaghi.org> | 2018-11-25 22:57:29 +0000 |
commit | 22ac6cccba99109f23f5571f70ec660f6f37c76f (patch) | |
tree | ecced876206cfadd71c5c14064bb26da9d308694 /reproduce/src/make/paper.mk | |
parent | a60db913794a7e0563a5c3443311a955a98559f5 (diff) |
Rule of tex/pipeline.tex now defined in paper.mk not top Makefile
To avoid redundant steps in the the top-level Makefile and make it simpler
and easier to follow, we now define the base names of all the Makefiles in
the `makesrc' variable of the top-level Makefile. `makesrc' is then used to
define the Makefiles to include and the necessary TeX macros at the same
time. This is much more clear and obvious than the previous case were we
had to list the Makefiles and TeX macro files separately in the top level
Makefile.
Diffstat (limited to 'reproduce/src/make/paper.mk')
-rw-r--r-- | reproduce/src/make/paper.mk | 56 |
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 # ---------------- |