From 66c1b59ea170032f54441fed39a3ed255070c400 Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Tue, 13 Nov 2018 16:58:13 +0000 Subject: Most library versions are now also checked All the libraries that define their version string as a macro in their headers are now also checked in `reproduce/src/make/initialize.mk'. Also, the CFITSIO tarball now follows the same versioning style as the rest of the tarballs: a script is added to convert the version string into what is included in the tarball. --- reproduce/src/make/initialize.mk | 72 ++++++++++++++++++++++++++++------------ 1 file changed, 50 insertions(+), 22 deletions(-) (limited to 'reproduce/src/make/initialize.mk') diff --git a/reproduce/src/make/initialize.mk b/reproduce/src/make/initialize.mk index b8d71c6..563462f 100644 --- a/reproduce/src/make/initialize.mk +++ b/reproduce/src/make/initialize.mk @@ -147,16 +147,28 @@ 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}" >> $@ +pvcheck = 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}" >> $@ + +lvcheck = idir=$(BDIR)/dependencies/installed/include; \ + f="$$idir/$(strip $(1))"; \ + ver="$(strip $(2))"; \ + name="$(strip $(3))"; \ + macro="$(strip $(4))"; \ + v=$$(awk '$$1=="\#define" && /'$$ver'/ {print "y"}' $$f); \ + if [ x$$v != xy ]; then \ + echo; echo "PIPELINE ERROR: Not linking with $$name $$ver"; \ + echo; exit 1; \ + fi; \ + echo "\newcommand{\\$$macro}{$$ver}" >> $@ @@ -175,17 +187,33 @@ $(mtexdir)/initialize.tex: | $(mtexdir) echo "\newcommand{\pipelineversion}{$$v}" > $@ @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, \ + # Versions of programs (same order as 'dependency-versions.mk'). + $(call pvcheck, bash, $(bash-version), GNU Bash, bashversion) + $(call pvcheck, cmake, $(cmake-version), CMake, cmakeversion) + $(call pvcheck, 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, \ + $(call pvcheck, awk, $(gawk-version), GNU AWK, gawkversion) + $(call pvcheck, gs, $(ghostscript-version), GPL Ghostscript, \ + ghostscriptversion) + $(call pvcheck, git, $(git-version), Git, gitversion) + $(call pvcheck, 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) + $(call pvcheck, grep, $(grep-version), GNU Grep, grepversion) + $(call pvcheck, libtool, $(libtool-version), GNU Libtool, \ + libtoolversion) + $(call pvcheck, make, $(make-version), GNU Make, makeversion) + $(call pvcheck, sed, $(sed-version), GNU SED, sedversion) + + # Versions of libraries. + $(call lvcheck, fitsio.h, $(cfitsio-version), CFITSIO, cfitsioversion) + ########## Curl library not yet checked. + $(call lvcheck, gsl/gsl_version.h, $(gsl-version), \ + GNU Scientific Library (GSL), gslversion) + ########## libjpeg not yet checked. + $(call lvcheck, git2/version.h, $(libgit2-version), Libgit2, \ + libgitwoversion) + $(call lvcheck, tiffvers.h, $(libtiff-version), Libtiff, \ + libtiffversion) + $(call lvcheck, wcslib/wcsconfig.h, $(wcslib-version), WCSLIB, \ + wcslibversion) + $(call lvcheck, zlib.h, $(zlib-version), zlib, zlibversion) -- cgit v1.2.1