From d10e7da9901af2aec78e7bcd33ad20e95ef097ab Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Thu, 15 Nov 2018 20:04:20 +0000 Subject: Binutils and other compressors also included in pipeline To have better control over the build, GNU Binutils, Bzip2, GNU Gzip, and XZ Utils have also been added to the pipeline. Some other minor cleanups and fixes were also implemented throughout the process. --- reproduce/src/make/initialize.mk | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'reproduce/src/make/initialize.mk') diff --git a/reproduce/src/make/initialize.mk b/reproduce/src/make/initialize.mk index 1acec9f..5c0aac5 100644 --- a/reproduce/src/make/initialize.mk +++ b/reproduce/src/make/initialize.mk @@ -152,7 +152,7 @@ pvcheck = prog="$(strip $(1))"; \ ver="$(strip $(2))"; \ name="$(strip $(3))"; \ macro="$(strip $(4))"; \ - v=$$($$prog --version | awk '/'$$ver'/{print "y"}'); \ + v=$$($$prog --version | awk '/'$$ver'/{print "y"; exit 0}'); \ if [ x$$v != xy ]; then \ echo; echo "PIPELINE ERROR: Not running $$name $$ver"; echo; \ exit 1; \ @@ -164,7 +164,7 @@ lvcheck = idir=$(BDIR)/dependencies/installed/include; \ ver="$(strip $(2))"; \ name="$(strip $(3))"; \ macro="$(strip $(4))"; \ - v=$$(awk '$$1=="\#define" && /'$$ver'/ {print "y"}' $$f); \ + v=$$(awk '$$1=="\#define" && /'$$ver'/{print "y";exit 0}' $$f);\ if [ x$$v != xy ]; then \ echo; echo "PIPELINE ERROR: Not linking with $$name $$ver"; \ echo; exit 1; \ @@ -190,6 +190,7 @@ $(mtexdir)/initialize.tex: | $(mtexdir) # Versions of programs (same order as 'dependency-versions.mk'). $(call pvcheck, bash, $(bash-version), GNU Bash, bashversion) + $(call pvcheck, nm, $(binutils-version), GNU Binutils, binutilsversion) $(call pvcheck, cmake, $(cmake-version), CMake, cmakeversion) $(call pvcheck, curl, $(curl-version), cURL, curlversion) $(call pvcheck, ls, $(coreutils-version), GNU Coreutils, \ @@ -207,6 +208,19 @@ $(mtexdir)/initialize.tex: | $(mtexdir) $(call pvcheck, make, $(make-version), GNU Make, makeversion) $(call pvcheck, sed, $(sed-version), GNU SED, sedversion) $(call pvcheck, tar, $(tar-version), GNU Tar, tarversion) + $(call pvcheck, xz, $(xz-version), XZ Utils, xzversion) + + # Bzip2 prints its version in standard error, not standard output! + echo "here0" + echo "" | bzip2 --version &> $@_bzip2_ver; + v=$$(awk 'NR==1 && /'$(bzip2-version)'/{print "y"; exit 0}' \ + $@_bzip2_ver); \ + if [ x$$v != xy ]; then \ + echo; echo "PIPELINE ERROR: Not running Bzip2 $(bzip2-version)"; \ + echo; exit 1; \ + fi; \ + echo "\newcommand{\\bziptwoversion}{$(bzip2-version)}" >> $@ + # Versions of libraries. $(call lvcheck, fitsio.h, $(cfitsio-version), CFITSIO, cfitsioversion) -- cgit v1.2.1