aboutsummaryrefslogtreecommitdiff
path: root/reproduce/src/make
diff options
context:
space:
mode:
authorMohammad Akhlaghi <mohammad@akhlaghi.org>2018-11-13 14:09:13 +0000
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2018-11-13 14:12:56 +0000
commit080d9176fa3fc281cf7974b8431a6c5f3be62dab (patch)
treee91234df95ad0136524eda8324b72b9fc6e9c0fd /reproduce/src/make
parent50139310e1ec4594da15651ecb8475ab33248cb5 (diff)
Version of programs checked on each run of pipeline
The version of all programs is now checked in `reproduce/make/src/initialize.mk' and the pipeline won't complete if any of the program versions change from those listed in `reproduce/config/pipeline/dependency-versions.mk'. Since the pipeline is systematically checking all program versions, we don't need Gnuastro's `--onlyversion' option any more. So it (and all references to it) have been removed.
Diffstat (limited to 'reproduce/src/make')
-rw-r--r--reproduce/src/make/initialize.mk41
1 files changed, 32 insertions, 9 deletions
diff --git a/reproduce/src/make/initialize.mk b/reproduce/src/make/initialize.mk
index c5f8620..b8d71c6 100644
--- a/reproduce/src/make/initialize.mk
+++ b/reproduce/src/make/initialize.mk
@@ -145,6 +145,22 @@ distclean: clean
+# Check the version of programs which write their version
+# -------------------------------------------------------
+vercheck = prog="$(strip $(1))"; \
+ ver="$(strip $(2))"; \
+ name="$(strip $(3))"; \
+ macro="$(strip $(4))"; \
+ v=$$($$prog --version | awk '/'$$ver'/{print "y"}'); \
+ if [ x$$v != xy ]; then \
+ echo; echo "PIPELINE ERROR: Not running $$name $$ver"; echo; \
+ exit 1; \
+ fi; \
+ echo "\newcommand{\\$$macro}{$$ver}" >> $@
+
+
+
+
# Pipeline initialization results
# -------------------------------
#
@@ -154,15 +170,22 @@ distclean: clean
# actually exists, it is also aded as a `.PHONY' target above.
$(mtexdir)/initialize.tex: | $(mtexdir)
- # Version of the pipeline.
+ # Version of the pipeline and build directory (for LaTeX inputs).
@v=$$(git describe --dirty --always);
echo "\newcommand{\pipelineversion}{$$v}" > $@
-
-# --------- Delete for no Gnuastro ---------
- # Version of Gnuastro.
- @v=$$(astnoisechisel --version | awk 'NR==1{print $$NF}');
- echo "\newcommand{\gnuastroversion}{$$v}" >> $@
-# ------------------------------------------
-
- # Location of the build directory (for LaTeX inputs).
@echo "\newcommand{\bdir}{$(BDIR)}" >> $@
+
+ # Versions of programs (same order as `dependency-versions.mk').
+ $(call vercheck, bash, $(bash-version), GNU Bash, bashversion)
+ $(call vercheck, cmake, $(cmake-version), CMake, cmakeversion)
+ $(call vercheck, ls, $(coreutils-version), GNU Coreutils, \
+ coreutilsversion)
+ $(call vercheck, awk, $(gawk-version), GNU AWK, gawkversion)
+ $(call vercheck, gs, $(ghostscript-version), GPL Ghostscript, \
+ ghostscriptversion)
+ $(call vercheck, git, $(git-version), Git, gitversion)
+ $(call vercheck, astnoisechisel, $(gnuastro-version), Gnuastro, \
+ gnuastroversion)
+ $(call vercheck, grep, $(grep-version), GNU Grep, grepversion)
+ $(call vercheck, make, $(make-version), GNU Make, makeversion)
+ $(call vercheck, sed, $(sed-version), GNU SED, sedversion)