aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure51
-rw-r--r--paper.tex9
-rw-r--r--reproduce/config/pipeline/dependency-versions.mk2
-rw-r--r--reproduce/src/make/dependencies-basic.mk88
-rw-r--r--reproduce/src/make/dependencies-build-rules.mk2
-rw-r--r--reproduce/src/make/dependencies.mk66
-rw-r--r--reproduce/src/make/initialize.mk6
7 files changed, 125 insertions, 99 deletions
diff --git a/configure b/configure
index 8e15000..4810656 100755
--- a/configure
+++ b/configure
@@ -110,17 +110,19 @@ function absolute_dir() {
#
# Print some basic information so the user gets a feeling of what is going
# on and is prepared on what will happen next.
-echo
-echo "-----------------------------------------"
-echo "Reproduction pipeline local configuration"
-echo "-----------------------------------------"
-echo
-echo "Local configuration includes things like top-level directories,"
-echo "or processing steps."
-echo
-echo "It is STRONGLY recommended to read the comments, and set the best "
-echo "values for your system (where necessary)."
-echo
+cat <<EOF
+
+-----------------------------------------
+Reproduction pipeline local configuration
+-----------------------------------------
+
+Local configuration includes things like top-level directories, or
+processing steps.
+
+It is STRONGLY recommended to read the comments, and set the best values
+for your system (where necessary).
+
+EOF
@@ -172,18 +174,25 @@ fi
# calling `DOWNLOADER' within the Makefiles, and finish the command with
# the web address.
if [ $rewritepconfig = yes ]; then
- if type wget > /dev/null; then
+ if type wget > /dev/null 2>/dev/null; then
downloader="wget -O";
else
- echo "======="
- echo "Warning"
- echo "======="
- echo "Couldn't find GNU Wget. It is used for downloading necessary "
- echo "programs and data if they aren't already present in the specified "
- echo "directories. Therefore the pipeline will crash if the necessary "
- echo "files are not already present on the system."
- echo "======="
- echo
+ cat <<EOF
+
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!!!!!!!!!!!!!!!!!!!!!! Warning !!!!!!!!!!!!!!!!!!!!!!
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+Couldn't find GNU Wget. It is used for downloading necessary programs and
+data if they aren't already present in the specified directories. Therefore
+the pipeline will crash if the necessary files are not already present on
+the system.
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+
+EOF
downloader="no-downloader-found"
fi;
fi
diff --git a/paper.tex b/paper.tex
index 0e50b1d..04d6a7e 100644
--- a/paper.tex
+++ b/paper.tex
@@ -178,10 +178,11 @@ SUNDIAL ITN, and from the Spanish Ministry of Economy and Competitiveness
The following free software tools were also critical component of this
research (in alphabetical order): {\small CFITSIO} \cfitsioversion, CMake
-\cmakeversion, Git \gitversion, \gnu{Bash} \bashversion, \gnu{Coreutils}
-\coreutilsversion, \gnu{{\small AWK}} \gawkversion, \gnu{Grep}
-\grepversion, \gnu{Libtool} \libtoolversion, \gnu{Make} \makeversion,
-\gnu{Sed} \sedversion, \gnu{Scientific Library} ({\small GSL}) \gslversion,
+\cmakeversion, c{\small URL} \curlversion, Git \gitversion, \gnu{Bash}
+\bashversion, \gnu{Coreutils} \coreutilsversion, \gnu{{\small AWK}}
+\gawkversion, \gnu{Grep} \grepversion, \gnu{Libtool} \libtoolversion,
+\gnu{Make} \makeversion, \gnu{Sed} \sedversion, \gnu{Scientific Library}
+({\small GSL}) \gslversion, \gnu{Tar} \tarversion, Lzip \lzipversion,
{\small GPL} Ghostscript \ghostscriptversion, Libgit2 \libgitwoversion,
Libtiff \libtiffversion, {{\small WCSLIB}} \wcslibversion, and ZLib
\zlibversion. We are very grateful to all their creators for freely
diff --git a/reproduce/config/pipeline/dependency-versions.mk b/reproduce/config/pipeline/dependency-versions.mk
index ad8dd2c..6d305cb 100644
--- a/reproduce/config/pipeline/dependency-versions.mk
+++ b/reproduce/config/pipeline/dependency-versions.mk
@@ -10,8 +10,10 @@ git-version = 2.19.1
gnuastro-version = 0.7.60-4c9eb
grep-version = 3.1
libtool-version = 2.4.6
+lzip-version = 1.20
make-version = 4.2.90
sed-version = 4.5
+tar-version = 1.30
# Libraries
cfitsio-version = 3.45
diff --git a/reproduce/src/make/dependencies-basic.mk b/reproduce/src/make/dependencies-basic.mk
index 33b682b..ed6e971 100644
--- a/reproduce/src/make/dependencies-basic.mk
+++ b/reproduce/src/make/dependencies-basic.mk
@@ -47,7 +47,11 @@ idir = $(BDIR)/dependencies/installed
ibdir = $(BDIR)/dependencies/installed/bin
ildir = $(BDIR)/dependencies/installed/lib
-top-level-programs = bash make
+# As we build more programs, we want to use our own pipeline's built
+# programs, not the systems.
+PATH := $(ibdir):$(PATH)
+
+top-level-programs = bash
all: $(foreach p, $(top-level-programs), $(ibdir)/$(p))
@@ -61,56 +65,62 @@ all: $(foreach p, $(top-level-programs), $(ibdir)/$(p))
# is not recognized by some versions of Make (even older GNU Makes). So
# we'll have to make sure the recipe doesn't break into multiple shell
# calls (so we can preserve the variables).
-tarballs = $(foreach t, bash-$(bash-version).tar.gz \
- make-$(make-version).tar.gz \
+tarballs = $(foreach t, bash-$(bash-version).tar.gz \
+ lzip-$(lzip-version).tar.gz \
+ make-$(make-version).tar.gz \
+ tar-$(tar-version).tar.gz \
, $(tdir)/$(t) )
$(tarballs): $(tdir)/%:
- if [ -f $(DEPENDENCIES-DIR)/$* ]; then \
- cp $(DEPENDENCIES-DIR)/$* $@; \
- else \
- n=$$(echo $* | sed -e's/[0-9\-]/ /g' \
- -e's/\./ /g' \
- | awk '{print $$1}' ); \
- \
- mergenames=1; \
- if [ $$n = bash ]; then w=http://ftp.gnu.org/gnu/bash; \
- elif [ $$n = make ]; then w=http://akhlaghi.org/src; \
- else \
- echo; echo; echo; \
- echo "'$$n' not recognized as a dependency name to download." \
- echo; echo; echo; \
- exit 1; \
- fi; \
- \
- if [ $$mergenames = 1 ]; then tarballurl=$$w/"$*"; \
- else tarballurl=$$w; \
- fi; \
- echo "Downloading $$tarballurl"; \
- $(DOWNLOADER) $@ $$tarballurl; \
+ if [ -f $(DEPENDENCIES-DIR)/$* ]; then \
+ cp $(DEPENDENCIES-DIR)/$* $@; \
+ else \
+ n=$$(echo $* | sed -e's/[0-9\-]/ /g' \
+ -e's/\./ /g' \
+ | awk '{print $$1}' ); \
+ \
+ mergenames=1; \
+ if [ $$n = bash ]; then w=http://ftp.gnu.org/gnu/bash; \
+ elif [ $$n = lzip ]; then w=http://download.savannah.gnu.org/releases/lzip; \
+ elif [ $$n = make ]; then w=http://akhlaghi.org/src; \
+ elif [ $$n = tar ]; then w=http://ftp.gnu.org/gnu/tar; \
+ else \
+ echo; echo; echo; \
+ echo "'$$n' not a dependency name (for downloading)." \
+ echo; echo; echo; \
+ exit 1; \
+ fi; \
+ \
+ if [ $$mergenames = 1 ]; then tarballurl=$$w/"$*"; \
+ else tarballurl=$$w; \
+ fi; \
+ echo "Downloading $$tarballurl"; \
+ $(DOWNLOADER) $@ $$tarballurl; \
fi
-# GNU Bash
-# --------
-#
-# Everything is standard and we can make it statically.
-$(ibdir)/bash: $(tdir)/bash-$(bash-version).tar.gz
- $(call gbuild,$(subst $(tdir),,$<), bash-$(bash-version), static)
-
-
-
+# Basic programs (sorted alphabetically), see prerequisites for which one
+# will be built first.
+$(ibdir)/bash: $(tdir)/bash-$(bash-version).tar.gz \
+ $(ibdir)/make
+ $(call gbuild,$(subst $(tdir)/,,$<), bash-$(bash-version), static)
+$(ibdir)/lzip: $(tdir)/lzip-$(lzip-version).tar.gz
+ $(call gbuild,$(subst $(tdir)/,,$<), lzip-$(lzip-version), static)
-# GNU Make
-# --------
-#
# Unfortunately GNU Make needs dynamic linking in two instances: when
# loading objects (dynamically linked libraries), or when using the
# `getpwnam' function (for tilde expansion). The first can be disabled with
# `--disable-load', but unfortunately I don't know any way to fix the
# second. So, we'll have to build it dynamically for now.
-$(ibdir)/make: $(tdir)/make-$(make-version).tar.gz
- $(call gbuild,$(subst $(tdir),,$<), make-$(make-version), , , ,)
+$(ibdir)/make: $(tdir)/make-$(make-version).tar.gz \
+ $(ibdir)/tar
+ $(call gbuild,$(subst $(tdir)/,,$<), make-$(make-version), , , ,)
+
+# When built statically, tar gives a segmentation fault on unpacking
+# Bash. So we'll build it dynamically.
+$(ibdir)/tar: $(tdir)/tar-$(tar-version).tar.gz \
+ $(ibdir)/lzip
+ $(call gbuild,$(subst $(tdir)/,,$<), tar-$(tar-version))
diff --git a/reproduce/src/make/dependencies-build-rules.mk b/reproduce/src/make/dependencies-build-rules.mk
index a4d25aa..b53bc52 100644
--- a/reproduce/src/make/dependencies-build-rules.mk
+++ b/reproduce/src/make/dependencies-build-rules.mk
@@ -71,7 +71,7 @@ cbuild = if [ $(3)x = staticx ]; then \
opts="-DBUILD_SHARED_LIBS=OFF"; \
fi; \
cd $(ddir) && rm -rf $(2) && tar xf $(tdir)/$(1) && cd $(2) && \
- rm -rf my-build && mkdir my-build && cd my-build && opts="" && \
+ rm -rf my-build && mkdir my-build && cd my-build && \
cmake .. $$opts $(4) && \
cmake --build . && \
cmake .. -DCMAKE_INSTALL_PREFIX=$(idir) && \
diff --git a/reproduce/src/make/dependencies.mk b/reproduce/src/make/dependencies.mk
index 6da554c..45ceadc 100644
--- a/reproduce/src/make/dependencies.mk
+++ b/reproduce/src/make/dependencies.mk
@@ -151,46 +151,42 @@ $(tarballs): $(tdir)/%:
# Libraries
# ---------
-$(ildir)/libcfitsio.a: $(tdir)/cfitsio-$(cfitsio-version).tar.gz \
- $(ildir)/libcurl.a \
+$(ildir)/libcfitsio.a: $(tdir)/cfitsio-$(cfitsio-version).tar.gz \
+ $(ildir)/libcurl.a \
$(ibdir)/ls
- $(call gbuild,$(subst $(tdir),,$<), cfitsio, static, \
+ $(call gbuild,$(subst $(tdir)/,,$<), cfitsio, static, \
--enable-sse2 --enable-reentrant)
-$(ildir)/libcurl.a: $(tdir)/curl-$(curl-version).tar.gz \
- $(ildir)/libz.a \
- $(ibdir)/ls
- $(call gbuild,$(subst $(tdir),,$<), curl-$(curl-version), static, \
- --without-brotli)
-$(ildir)/libgit2.a: $(tdir)/libgit2-$(libgit2-version).tar.gz \
- $(ildir)/libcurl.a \
+$(ildir)/libgit2.a: $(tdir)/libgit2-$(libgit2-version).tar.gz \
+ $(ildir)/libcurl.a \
$(ibdir)/cmake
- $(call cbuild,$(subst $(tdir),,$<), libgit2-$(libgit2-version), \
- static, -DUSE_SSH=OFF -DUSE_OPENSSL=OFF \
- -DBUILD_CLAR=OFF -DTHREADSAFE=ON, )
+ $(call cbuild,$(subst $(tdir)/,,$<), libgit2-$(libgit2-version), \
+ static, -DUSE_SSH=OFF -DUSE_OPENSSL=OFF \
+ -DBUILD_CLAR=OFF -DTHREADSAFE=ON)
-$(ildir)/libgsl.a: $(tdir)/gsl-$(gsl-version).tar.gz \
+$(ildir)/libgsl.a: $(tdir)/gsl-$(gsl-version).tar.gz \
$(ibdir)/ls
- $(call gbuild,$(subst $(tdir),,$<), gsl-$(gsl-version), static)
+ $(call gbuild,$(subst $(tdir)/,,$<), gsl-$(gsl-version), static)
$(ildir)/libjpeg.a: $(tdir)/jpegsrc.$(libjpeg-version).tar.gz
- $(call gbuild,$(subst $(tdir),,$<), jpeg-9b, static)
+ $(call gbuild,$(subst $(tdir)/,,$<), jpeg-9b, static)
-$(ildir)/libtiff.a: $(tdir)/tiff-$(libtiff-version).tar.gz \
+$(ildir)/libtiff.a: $(tdir)/tiff-$(libtiff-version).tar.gz \
$(ibdir)/ls
- $(call gbuild,$(subst $(tdir),,$<), tiff-$(libtiff-version), static)
+ $(call gbuild,$(subst $(tdir)/,,$<), tiff-$(libtiff-version), \
+ static)
-$(ildir)/libwcs.a: $(tdir)/wcslib-$(wcslib-version).tar.bz2 \
+$(ildir)/libwcs.a: $(tdir)/wcslib-$(wcslib-version).tar.bz2 \
$(ildir)/libcfitsio.a
- $(call gbuild,$(subst $(tdir),,$<), wcslib-$(wcslib-version), \
- static, LIBS="-pthread -lcurl -lm" --without-pgplot \
+ $(call gbuild,$(subst $(tdir)/,,$<), wcslib-$(wcslib-version), \
+ static, LIBS="-pthread -lcurl -lm" --without-pgplot \
--disable-fortran)
# Zlib's `./configure' doesn't use Autoconf's configure script, it just
# accepts a direct `--static' option.
$(ildir)/libz.a: $(tdir)/zlib-$(zlib-version).tar.gz
- $(call gbuild,$(subst $(tdir),,$<), zlib-$(zlib-version), , \
+ $(call gbuild,$(subst $(tdir)/,,$<), zlib-$(zlib-version), , \
--static)
@@ -199,37 +195,43 @@ $(ildir)/libz.a: $(tdir)/zlib-$(zlib-version).tar.gz
# Programs
# --------
-$(ibdir)/cmake: $(tdir)/cmake-$(cmake-version).tar.gz \
+$(ibdir)/cmake: $(tdir)/cmake-$(cmake-version).tar.gz \
$(ibdir)/ls
- $(call cbuild,$(subst $(tdir),,$<), cmake-$(cmake-version))
+ $(call cbuild,$(subst $(tdir)/,,$<), cmake-$(cmake-version))
+
+$(ibdir)/curl: $(tdir)/curl-$(curl-version).tar.gz \
+ $(ildir)/libz.a \
+ $(ibdir)/ls
+ $(call gbuild,$(subst $(tdir)/,,$<), curl-$(curl-version), static, \
+ --without-brotli)
$(ibdir)/ls: $(tdir)/coreutils-$(coreutils-version).tar.xz
- $(call gbuild,$(subst $(tdir),,$<), coreutils-$(coreutils-version), \
+ $(call gbuild,$(subst $(tdir)/,,$<), coreutils-$(coreutils-version), \
static)
$(ibdir)/gawk: $(tdir)/gawk-$(gawk-version).tar.gz \
$(ibdir)/ls
- $(call gbuild,$(subst $(tdir),,$<), gawk-$(gawk-version), static)
+ $(call gbuild,$(subst $(tdir)/,,$<), gawk-$(gawk-version), static)
$(ibdir)/sed: $(tdir)/sed-$(sed-version).tar.xz \
$(ibdir)/ls
- $(call gbuild,$(subst $(tdir),,$<), sed-$(sed-version), static)
+ $(call gbuild,$(subst $(tdir)/,,$<), sed-$(sed-version), static)
$(ibdir)/grep: $(tdir)/grep-$(grep-version).tar.xz \
$(ibdir)/ls
- $(call gbuild,$(subst $(tdir),,$<), grep-$(grep-version), static)
+ $(call gbuild,$(subst $(tdir)/,,$<), grep-$(grep-version), static)
$(ibdir)/libtool: $(tdir)/libtool-$(libtool-version).tar.gz \
$(ibdir)/ls
- $(call gbuild,$(subst $(tdir),,$<), libtool-$(libtool-version), static)
+ $(call gbuild,$(subst $(tdir)/,,$<), libtool-$(libtool-version), static)
$(ibdir)/gs: $(tdir)/ghostscript-$(ghostscript-version).tar.gz \
$(ibdir)/ls
- $(call gbuild,$(subst $(tdir),,$<), ghostscript-$(ghostscript-version))
+ $(call gbuild,$(subst $(tdir)/,,$<), ghostscript-$(ghostscript-version))
$(ibdir)/git: $(tdir)/git-$(git-version).tar.xz \
$(ibdir)/ls
- $(call gbuild,$(subst $(tdir),,$<), git-$(git-version), static)
+ $(call gbuild,$(subst $(tdir)/,,$<), git-$(git-version), static)
$(ibdir)/astnoisechisel: $(tdir)/gnuastro-$(gnuastro-version).tar.lz \
$(ildir)/libgsl.a \
@@ -240,5 +242,5 @@ $(ibdir)/astnoisechisel: $(tdir)/gnuastro-$(gnuastro-version).tar.lz \
$(ildir)/libtiff.a \
$(ildir)/libgit2.a \
- $(call gbuild,$(subst $(tdir),,$<), gnuastro-$(gnuastro-version), \
+ $(call gbuild,$(subst $(tdir)/,,$<), gnuastro-$(gnuastro-version), \
static, , -j8, make check -j8)
diff --git a/reproduce/src/make/initialize.mk b/reproduce/src/make/initialize.mk
index d0f69a3..1acec9f 100644
--- a/reproduce/src/make/initialize.mk
+++ b/reproduce/src/make/initialize.mk
@@ -191,8 +191,9 @@ $(mtexdir)/initialize.tex: | $(mtexdir)
# 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, curl, $(curl-version), cURL, curlversion)
$(call pvcheck, ls, $(coreutils-version), GNU Coreutils, \
- coreutilsversion)
+ coreutilsversion)
$(call pvcheck, awk, $(gawk-version), GNU AWK, gawkversion)
$(call pvcheck, gs, $(ghostscript-version), GPL Ghostscript, \
ghostscriptversion)
@@ -202,12 +203,13 @@ $(mtexdir)/initialize.tex: | $(mtexdir)
$(call pvcheck, grep, $(grep-version), GNU Grep, grepversion)
$(call pvcheck, libtool, $(libtool-version), GNU Libtool, \
libtoolversion)
+ $(call pvcheck, lzip, $(lzip-version), Lzip, lzipversion)
$(call pvcheck, make, $(make-version), GNU Make, makeversion)
$(call pvcheck, sed, $(sed-version), GNU SED, sedversion)
+ $(call pvcheck, tar, $(tar-version), GNU Tar, tarversion)
# 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.