From 11d5e76a7f89abe6da0b7c2b948f97f5c1cdc508 Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Tue, 20 Nov 2018 19:31:12 +0000 Subject: 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. --- reproduce/src/make/Top-Makefile | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) (limited to 'reproduce/src/make/Top-Makefile') diff --git a/reproduce/src/make/Top-Makefile b/reproduce/src/make/Top-Makefile index abd0f45..4c547be 100644 --- a/reproduce/src/make/Top-Makefile +++ b/reproduce/src/make/Top-Makefile @@ -93,19 +93,30 @@ tex/pipeline.tex: $(foreach f, initialize \ , $(mtexdir)/$(f).tex) # If no PDF is requested, or if LaTeX isn't available, don't - # continue to building LaTeX. - @if ! latex --version &> /dev/null || [ x$(pdf-build-final) = x ]; then + # 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 we won't be" - echo "building the final LaTeX-built PDF." + echo "The processing has COMPLETED SUCCESSFULLY! But the final " + echo "LaTeX-built PDF paper will not be built." echo - echo "To do so, make sure you have LaTeX within the pipeline and" - echo "give a value to the 'pdf-build-final' variable. It is defined" - echo "in 'reproduce/config/pipeline/pdf-build.mk'." + 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 - exit 1 + echo "" > $@ fi - - # Merge all the TeX macros that are prepared for building the PDF. - @cat $(mtexdir)/*.tex > $@ -- cgit v1.2.1