aboutsummaryrefslogtreecommitdiff
path: root/reproduce/software/make
diff options
context:
space:
mode:
Diffstat (limited to 'reproduce/software/make')
-rw-r--r--reproduce/software/make/README.md33
-rw-r--r--reproduce/software/make/basic.mk270
-rw-r--r--reproduce/software/make/build-rules.mk60
-rw-r--r--reproduce/software/make/high-level.mk300
-rw-r--r--reproduce/software/make/python.mk133
5 files changed, 426 insertions, 370 deletions
diff --git a/reproduce/software/make/README.md b/reproduce/software/make/README.md
new file mode 100644
index 0000000..4eaefce
--- /dev/null
+++ b/reproduce/software/make/README.md
@@ -0,0 +1,33 @@
+Software building instructions
+==============================
+
+This directory contains Makefiles that are called by the high-level
+`reproduce/software/bash/configure.sh' script. The main target for the
+installation of each software is a simple plain text file that contains the
+name of the software and its version (which is put in the paper in the
+end). Once built, these plain-text files are all put in the proper
+sub-directory under `$(BDIR)/software/installed/version-info' (where
+`$(BDIR)' is the top-level build-directory specified by the user).
+
+Besides being directly used in the paper, these simple plain text files
+also act as prerequisites for higher-level software that depend on
+lower-level ones.
+
+Note on prerequisites
+---------------------
+
+Tarballs are order-only prerequsites (after a `|') because we already
+check their contents with the checksums, so their date is irrelevant: a
+tarball with a different content must have a new/different name, thus it
+will not exist, so it will be created, even when its order-only.q
+
+Binary programs (that don't install any libraries to be linked/used at
+compile time can also be order-only prerequisites, because usually they
+don't affect the compilation of the programs that depend on them, they
+are only used at run-time or by the low-level build instructions of the
+software. Ofcourse, if a program's version affects the build of a
+higher-level program, then it shouldn't be order-only.
+
+Libraries or Python modules that are used at compile time must be normal
+prerequisites (not order-only), because they are used during the building
+of the program. \ No newline at end of file
diff --git a/reproduce/software/make/basic.mk b/reproduce/software/make/basic.mk
index 65bdf1e..64c10c0 100644
--- a/reproduce/software/make/basic.mk
+++ b/reproduce/software/make/basic.mk
@@ -324,8 +324,8 @@ $(ibidir)/low-level-links: | $(ibdir) $(ildir)
# The first set of programs to be built are those that we need to unpack
# the source code tarballs of each program. First, we'll build the
# necessary programs, then we'll build GNU Tar.
-$(ibidir)/gzip: $(tdir)/gzip-$(gzip-version).tar.gz
- $(call gbuild, $<, gzip-$(gzip-version), static, , V=1) \
+$(ibidir)/gzip: | $(tdir)/gzip-$(gzip-version).tar.gz
+ $(call gbuild, gzip-$(gzip-version), static, , V=1) \
&& echo "GNU Gzip $(gzip-version)" > $@
# GNU Lzip: For a static build, the `-static' flag should be given to
@@ -335,15 +335,15 @@ lzipconf="LDFLAGS=-static"
else
lzipconf=
endif
-$(ibidir)/lzip: $(tdir)/lzip-$(lzip-version).tar.gz
- $(call gbuild, $<, lzip-$(lzip-version), , $(lzipconf)) \
+$(ibidir)/lzip: | $(tdir)/lzip-$(lzip-version).tar.gz
+ $(call gbuild, lzip-$(lzip-version), , $(lzipconf)) \
&& echo "Lzip $(lzip-version)" > $@
-$(ibidir)/xz: $(tdir)/xz-$(xz-version).tar.gz
- $(call gbuild, $<, xz-$(xz-version), static) \
+$(ibidir)/xz: | $(tdir)/xz-$(xz-version).tar.gz
+ $(call gbuild, xz-$(xz-version), static) \
&& echo "XZ Utils $(xz-version)" > $@
-$(ibidir)/bzip2: $(tdir)/bzip2-$(bzip2-version).tar.gz
+$(ibidir)/bzip2: | $(tdir)/bzip2-$(bzip2-version).tar.gz
# Bzip2 doesn't have a `./configure' script, and its Makefile
# doesn't build a shared library. So we can't use the `gbuild'
# function here and we need to take some extra steps (inspired
@@ -365,7 +365,9 @@ $(ibidir)/bzip2: $(tdir)/bzip2-$(bzip2-version).tar.gz
makeshared="make -f Makefile-libbz2_so"; \
fi; \
fi; \
- cd $(ddir) && rm -rf $$tdir && tar xf $< && cd $$tdir \
+ cd $(ddir) && rm -rf $$tdir \
+ && tar xf $(word 1,$(filter $(tdir)/%,$|)) \
+ && cd $$tdir \
&& sed -e 's@\(ln -s -f \)$$(PREFIX)/bin/@\1@' Makefile \
> Makefile.sed \
&& mv Makefile.sed Makefile \
@@ -380,18 +382,18 @@ $(ibidir)/bzip2: $(tdir)/bzip2-$(bzip2-version).tar.gz
&& ln -fs libbz2.so.1.0 libbz2.so \
&& echo "Bzip2 $(bzip2-version)" > $@
-$(ibidir)/unzip: $(tdir)/unzip-$(unzip-version).tar.gz
+$(ibidir)/unzip: | $(tdir)/unzip-$(unzip-version).tar.gz
v=$$(echo $(unzip-version) | sed -e's/\.//'); \
- $(call gbuild, $<, unzip$$v, static,, \
+ $(call gbuild, unzip$$v, static,, \
-f unix/Makefile generic_gcc \
CFLAGS="-DBIG_MEM -DMMAP",,pwd, \
-f unix/Makefile \
BINDIR=$(ibdir) MANDIR=$(idir)/man/man1 ) \
&& echo "Unzip $(unzip-version)" > $@
-$(ibidir)/zip: $(tdir)/zip-$(zip-version).tar.gz
+$(ibidir)/zip: | $(tdir)/zip-$(zip-version).tar.gz
v=$$(echo $(zip-version) | sed -e's/\.//'); \
- $(call gbuild, $<, zip$$v, static,, \
+ $(call gbuild, zip$$v, static,, \
-f unix/Makefile generic_gcc \
CFLAGS="-DBIG_MEM -DMMAP",,pwd, \
-f unix/Makefile \
@@ -403,8 +405,8 @@ $(ibidir)/zip: $(tdir)/zip-$(zip-version).tar.gz
#
# Note for a static-only build: Zlib's `./configure' doesn't use Autoconf's
# configure script, it just accepts a direct `--static' option.
-$(ibidir)/zlib: $(tdir)/zlib-$(zlib-version).tar.gz
- $(call gbuild, $<, zlib-$(zlib-version)) \
+$(ibidir)/zlib: | $(tdir)/zlib-$(zlib-version).tar.gz
+ $(call gbuild, zlib-$(zlib-version)) \
&& echo "Zlib $(zlib-version)" > $@
# GNU Tar: When built statically, tar gives a segmentation fault on
@@ -412,19 +414,19 @@ $(ibidir)/zlib: $(tdir)/zlib-$(zlib-version).tar.gz
# and unzip aren't dependencies of Tar, but for a clean build, we'll set
# Tar to be the last compression-related software (the first-set of
# software to be built).
-$(ibidir)/tar: $(tdir)/tar-$(tar-version).tar.gz \
- $(ibidir)/bzip2 \
- $(ibidir)/unzip \
+$(ibidir)/tar: $(ibidir)/xz \
+ $(ibidir)/zip \
$(ibidir)/gzip \
$(ibidir)/lzip \
$(ibidir)/zlib \
- $(ibidir)/zip \
- $(ibidir)/xz
+ $(ibidir)/bzip2 \
+ $(ibidir)/unzip \
+ | $(tdir)/tar-$(tar-version).tar.gz
# Since all later programs depend on Tar, the configuration will be
# stuck here, only making Tar. So its more efficient to built it on
# multiple threads (when the user's Make doesn't pass down the
# number of threads).
- $(call gbuild, $<, tar-$(tar-version), , , -j$(numthreads) V=1) \
+ $(call gbuild, tar-$(tar-version), , , -j$(numthreads) V=1) \
&& echo "GNU Tar $(tar-version)" > $@
@@ -447,14 +449,14 @@ $(ibidir)/tar: $(tdir)/tar-$(tar-version).tar.gz \
# 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.
-$(ibidir)/make: $(tdir)/make-$(make-version).tar.gz \
- $(ibidir)/tar
+$(ibidir)/make: | $(ibidir)/tar \
+ $(tdir)/make-$(make-version).tar.gz
# See Tar's comments for the `-j' option.
- $(call gbuild, $<, make-$(make-version), , , -j$(numthreads)) \
+ $(call gbuild, make-$(make-version), , , -j$(numthreads)) \
&& echo "GNU Make $(make-version)" > $@
-$(ibidir)/ncurses: $(tdir)/ncurses-$(ncurses-version).tar.gz \
- | $(ibidir)/make
+$(ibidir)/ncurses: | $(ibidir)/make \
+ $(tdir)/ncurses-$(ncurses-version).tar.gz
# Delete the library that will be installed (so we can make sure
# the build process completed afterwards and reset the links).
@@ -468,7 +470,7 @@ $(ibidir)/ncurses: $(tdir)/ncurses-$(ncurses-version).tar.gz \
rm -f $(ibdir)/bash* $(ibdir)/awk* $(ibdir)/gawk*
# Standard build process.
- $(call gbuild, $<, ncurses-$(ncurses-version), static, \
+ $(call gbuild, ncurses-$(ncurses-version), static, \
--with-shared --enable-rpath --without-normal \
--without-debug --with-cxx-binding \
--with-cxx-shared --enable-widec --enable-pc-files \
@@ -539,11 +541,11 @@ $(ibidir)/ncurses: $(tdir)/ncurses-$(ncurses-version).tar.gz \
exit 1; \
fi
-$(ibidir)/readline: $(tdir)/readline-$(readline-version).tar.gz \
- $(ibidir)/ncurses
- $(call gbuild, $<, readline-$(readline-version), static, \
- --with-curses --disable-install-examples, \
- SHLIB_LIBS="-lncursesw" -j$(numthreads)) \
+$(ibidir)/readline: $(ibidir)/ncurses \
+ | $(tdir)/readline-$(readline-version).tar.gz
+ $(call gbuild, readline-$(readline-version), static, \
+ --with-curses --disable-install-examples, \
+ SHLIB_LIBS="-lncursesw" -j$(numthreads)) \
&& echo "GNU Readline $(readline-version)" > $@
# When we have a static C library, PatchELF will be built statically. This
@@ -552,12 +554,12 @@ $(ibidir)/readline: $(tdir)/readline-$(readline-version).tar.gz \
# crash, so when PatchELF can't be built statically, we won't build GCC
# either, see the `configure.sh' script where we define `good_static_libc'
# for more.
-$(ibidir)/patchelf: $(tdir)/patchelf-$(patchelf-version).tar.gz \
- | $(ibidir)/make
+$(ibidir)/patchelf: | $(ibidir)/make \
+ $(tdir)/patchelf-$(patchelf-version).tar.gz
if [ $(good_static_libc) = 1 ]; then \
export LDFLAGS="$$LDFLAGS -static"; \
fi; \
- $(call gbuild, $<, patchelf-$(patchelf-version), static) \
+ $(call gbuild, patchelf-$(patchelf-version), static) \
&& echo "PatchELF $(patchelf-version)" > $@
@@ -596,9 +598,9 @@ needpatchelf =
else
needpatchelf = $(ibidir)/patchelf
endif
-$(ibidir)/bash: $(tdir)/bash-$(bash-version).tar.lz \
- $(ibidir)/readline \
- | $(needpatchelf)
+$(ibidir)/bash: $(ibidir)/readline \
+ | $(needpatchelf) \
+ $(tdir)/bash-$(bash-version).tar.lz
# Delete the (possibly) existing Bash executable.
rm -f $(ibdir)/bash
@@ -622,9 +624,9 @@ $(ibidir)/bash: $(tdir)/bash-$(bash-version).tar.lz \
if [ "x$(static_build)" = xyes ]; then stopt="--enable-static-link";\
else stopt=""; \
fi; \
- $(call gbuild, $<, bash-$(bash-version),, \
- --with-installed-readline=$(ildir) $$stopt, \
- -j$(numthreads))
+ $(call gbuild, bash-$(bash-version),, \
+ --with-installed-readline=$(ildir) $$stopt, \
+ -j$(numthreads))
# Atleast on GNU/Linux systems, Bash doesn't include RPATH by
# default. So, we have to manually include it, currently we are
@@ -672,12 +674,14 @@ $(ibidir)/bash: $(tdir)/bash-$(bash-version).tar.lz \
# The echo after the PatchELF loop is to avoid a crash if the last
# file that PatchELF encounters is not usable (and it returns with
# an error).
-$(ibidir)/coreutils: $(tdir)/coreutils-$(coreutils-version).tar.xz \
- $(ibidir)/openssl \
- | $(ibidir)/bash
+$(ibidir)/coreutils: $(ibidir)/openssl \
+ | $(ibidir)/bash \
+ $(tdir)/coreutils-$(coreutils-version).tar.xz
cd $(ddir) \
&& rm -rf coreutils-$(coreutils-version) \
- && if ! tar xf $<; then echo; echo "Tar error"; exit 1; fi \
+ && if ! tar xf $(word 1,$(filter $(tdir)/%,$|)); then \
+ echo; echo "Tar error"; exit 1; \
+ fi \
&& cd coreutils-$(coreutils-version) \
&& sed -e's|\#\! /bin/sh|\#\! $(ibdir)/bash|' \
-e's|\#\!/bin/sh|\#\! $(ibdir)/bash|' \
@@ -717,10 +721,10 @@ $(ibidir)/coreutils: $(tdir)/coreutils-$(coreutils-version).tar.xz \
#openssl-static = no-dso no-dynamic-engine no-shared
#endif
$(idir)/etc:; mkdir $@
-$(ibidir)/openssl: $(tdir)/openssl-$(openssl-version).tar.gz \
- $(tdir)/cert.pem \
+$(ibidir)/openssl: $(tdir)/cert.pem \
| $(idir)/etc \
- $(ibidir)/make
+ $(ibidir)/make \
+ $(tdir)/openssl-$(openssl-version).tar.gz
# According to OpenSSL's Wiki (link bellow), it can't automatically
# detect Mac OS's structure. It will need some help. So we'll use
# the `on_mac_os' Make variable that we defined in the configure
@@ -732,7 +736,7 @@ $(ibidir)/openssl: $(tdir)/openssl-$(openssl-version).tar.gz \
export KERNEL_BITS=64; \
copt="shared no-ssl2 no-ssl3 enable-ec_nistp_64_gcc_128"; \
fi; \
- $(call gbuild, $<, openssl-$(openssl-version), , \
+ $(call gbuild, openssl-$(openssl-version), , \
zlib \
$$copt \
$(rpath_command) \
@@ -765,9 +769,9 @@ $(ibidir)/openssl: $(tdir)/openssl-$(openssl-version).tar.gz \
# them. Note that if it does link with them, the configuration will crash
# when the library is updated/changed by the host, and the whole purpose of
# this project is avoid dependency on the host as much as possible.
-$(ibidir)/curl: $(tdir)/curl-$(curl-version).tar.gz \
- | $(ibidir)/coreutils
- $(call gbuild, $<, curl-$(curl-version), , \
+$(ibidir)/curl: | $(ibidir)/coreutils \
+ $(tdir)/curl-$(curl-version).tar.gz
+ $(call gbuild, curl-$(curl-version), , \
LIBS="-pthread" \
--with-zlib=$(ildir) \
--with-ssl=$(idir) \
@@ -803,15 +807,14 @@ $(ibidir)/curl: $(tdir)/curl-$(curl-version).tar.gz \
# building as part of this project. So to avoid too much dependency on the
# host system (especially a crash when these libraries are updated on the
# host), they are disabled here.
-$(ibidir)/wget: $(tdir)/wget-$(wget-version).tar.lz \
- $(ibidir)/libiconv \
- | $(ibidir)/coreutils
-
+$(ibidir)/wget: $(ibidir)/libiconv \
+ | $(ibidir)/coreutils \
+ $(tdir)/wget-$(wget-version).tar.lz
# We need to explicitly disable `libiconv', because of the
# `pkg-config' and `libiconv' problem.
libs="-pthread"; \
if [ x$(needs_ldl) = xyes ]; then libs="$$libs -ldl"; fi; \
- $(call gbuild, $<, wget-$(wget-version), , \
+ $(call gbuild, wget-$(wget-version), , \
LIBS="$$LIBS $$libs" \
--with-libssl-prefix=$(idir) \
--without-libiconv-prefix \
@@ -839,31 +842,31 @@ $(ibidir)/wget: $(tdir)/wget-$(wget-version).tar.lz \
# process of the higher-level programs and libraries. Note that during the
# building of those higher-level programs (after this Makefile finishes),
# there is no access to the system's PATH.
-$(ibidir)/diffutils: $(tdir)/diffutils-$(diffutils-version).tar.xz \
- | $(ibidir)/coreutils
- $(call gbuild, $<, diffutils-$(diffutils-version), static, , V=1) \
+$(ibidir)/diffutils: | $(ibidir)/coreutils \
+ $(tdir)/diffutils-$(diffutils-version).tar.xz
+ $(call gbuild, diffutils-$(diffutils-version), static, , V=1) \
&& echo "GNU Diffutils $(diffutils-version)" > $@
-$(ibidir)/file: $(tdir)/file-$(file-version).tar.gz \
- | $(ibidir)/coreutils
- $(call gbuild, $<, file-$(file-version), static) \
+$(ibidir)/file: | $(ibidir)/coreutils \
+ $(tdir)/file-$(file-version).tar.gz
+ $(call gbuild, file-$(file-version), static) \
&& echo "File $(file-version)" > $@
-$(ibidir)/findutils: $(tdir)/findutils-$(findutils-version).tar.xz \
- | $(ibidir)/coreutils
- $(call gbuild, $<, findutils-$(findutils-version), static, , V=1) \
+$(ibidir)/findutils: | $(ibidir)/coreutils \
+ $(tdir)/findutils-$(findutils-version).tar.xz
+ $(call gbuild, findutils-$(findutils-version), static, , V=1) \
&& echo "GNU Findutils $(findutils-version)" > $@
-$(ibidir)/gawk: $(tdir)/gawk-$(gawk-version).tar.lz \
- | $(ibidir)/coreutils \
+$(ibidir)/gawk: $(ibidir)/gmp \
$(ibidir)/mpfr \
- $(ibidir)/gmp
+ | $(ibidir)/coreutils \
+ $(tdir)/gawk-$(gawk-version).tar.lz
# AWK doesn't include RPATH by default, so we'll have to manually
# include it using the `patchelf' program (which was a dependency
# of Bash). Just note that AWK produces two executables (for
# example `gawk-4.2.1' and `gawk') and a symbolic link `awk' to one
# of those executables.
- $(call gbuild, $<, gawk-$(gawk-version), static, \
+ $(call gbuild, gawk-$(gawk-version), static, \
--with-readline=$(idir)) \
&& if [ "x$(needpatchelf)" != x ]; then \
if [ -f $(ibdir)/gawk ]; then \
@@ -876,51 +879,51 @@ $(ibidir)/gawk: $(tdir)/gawk-$(gawk-version).tar.lz \
fi \
&& echo "GNU AWK $(gawk-version)" > $@
-$(ibidir)/libiconv: $(tdir)/libiconv-$(libiconv-version).tar.gz \
- $(ibidir)/pkg-config
- $(call gbuild, $<, libiconv-$(libiconv-version), static) \
+$(ibidir)/libiconv: | $(ibidir)/pkg-config \
+ $(tdir)/libiconv-$(libiconv-version).tar.gz
+ $(call gbuild, libiconv-$(libiconv-version), static) \
&& echo "GNU libiconv $(libiconv-version)" > $@
-$(ibidir)/git: $(tdir)/git-$(git-version).tar.xz \
- $(ibidir)/libiconv \
- $(ibidir)/curl # Coreutils, so Git is built after it.
+$(ibidir)/git: $(ibidir)/curl \
+ $(ibidir)/libiconv \
+ | $(tdir)/git-$(git-version).tar.xz
if [ x$(on_mac_os) = xyes ]; then \
export LDFLAGS="$$LDFLAGS -lcharset"; \
fi; \
- $(call gbuild, $<, git-$(git-version), static, \
+ $(call gbuild, git-$(git-version), static, \
--without-tcltk --with-shell=$(ibdir)/bash \
--with-iconv=$(idir), V=1) \
&& echo "Git $(git-version)" > $@
-$(ibidir)/gmp: $(tdir)/gmp-$(gmp-version).tar.lz \
- | $(ibidir)/coreutils \
- $(ibidir)/m4
- $(call gbuild, $<, gmp-$(gmp-version), static, , , make check) \
+$(ibidir)/gmp: | $(ibidir)/m4 \
+ $(ibidir)/coreutils \
+ $(tdir)/gmp-$(gmp-version).tar.lz
+ $(call gbuild, gmp-$(gmp-version), static, , , make check) \
&& echo "GNU Multiple Precision Arithmetic Library $(gmp-version)" > $@
# On Mac OS, libtool does different things, so to avoid confusion, we'll
# prefix GNU's libtool executables with `glibtool'.
-$(ibidir)/glibtool: $(tdir)/libtool-$(libtool-version).tar.xz \
- | $(ibidir)/m4
- $(call gbuild, $<, libtool-$(libtool-version), static, \
+$(ibidir)/glibtool: | $(ibidir)/m4 \
+ $(tdir)/libtool-$(libtool-version).tar.xz
+ $(call gbuild, libtool-$(libtool-version), static, \
--program-prefix=g) \
&& ln -s $(ibdir)/glibtoolize $(ibdir)/libtoolize \
&& echo "GNU Libtool $(libtool-version)" > $@
-$(ibidir)/grep: $(tdir)/grep-$(grep-version).tar.xz \
- | $(ibidir)/coreutils
- $(call gbuild, $<, grep-$(grep-version), static) \
+$(ibidir)/grep: | $(ibidir)/coreutils \
+ $(tdir)/grep-$(grep-version).tar.xz
+ $(call gbuild, grep-$(grep-version), static) \
&& echo "GNU Grep $(grep-version)" > $@
-$(ibidir)/libbsd: $(tdir)/libbsd-$(libbsd-version).tar.xz \
- | $(ibidir)/coreutils
- $(call gbuild, $<, libbsd-$(libbsd-version), static,,V=1) \
+$(ibidir)/libbsd: | $(ibidir)/coreutils \
+ $(tdir)/libbsd-$(libbsd-version).tar.xz
+ $(call gbuild, libbsd-$(libbsd-version), static,,V=1) \
&& echo "Libbsd $(libbsd-version)" > $@
-$(ibidir)/m4: $(tdir)/m4-$(m4-version).tar.gz \
- | $(ibidir)/coreutils \
- $(ibidir)/texinfo
- $(call gbuild, $<, m4-$(m4-version), static) \
+$(ibidir)/m4: | $(ibidir)/coreutils \
+ $(ibidir)/texinfo \
+ $(tdir)/m4-$(m4-version).tar.gz
+ $(call gbuild, m4-$(m4-version), static) \
&& echo "GNU M4 $(m4-version)" > $@
# Metastore is used (through a Git hook) to restore the source modification
@@ -945,12 +948,12 @@ needlibbsd =
else
needlibbsd = $(ibidir)/libbsd
endif
-$(ibidir)/metastore: $(tdir)/metastore-$(metastore-version).tar.gz \
- $(needlibbsd) \
- | $(ibidir)/coreutils \
- $(ibidir)/gawk \
+$(ibidir)/metastore: $(needlibbsd) \
+ | $(ibidir)/sed \
$(ibidir)/git \
- $(ibidir)/sed
+ $(ibidir)/gawk \
+ $(ibidir)/coreutils \
+ $(tdir)/metastore-$(metastore-version).tar.gz
# Metastore doesn't have any `./configure' script. So we'll just
# call `pwd' as a place-holder for the `./configure' command.
@@ -975,7 +978,7 @@ $(ibidir)/metastore: $(tdir)/metastore-$(metastore-version).tar.gz \
# is no `.git' directory to work with. So until we find a better
# solution, avoid the step to to add the Git hooks.
current_dir=$$(pwd); \
- $(call gbuild, $<, metastore-$(metastore-version), static,, \
+ $(call gbuild, metastore-$(metastore-version), static,, \
NO_XATTR=1 V=1,,pwd,PREFIX=$(idir)); \
if [ -f $(ibdir)/metastore ]; then \
if [ "x$(needpatchelf)" != x ]; then \
@@ -1008,13 +1011,13 @@ $(ibidir)/metastore: $(tdir)/metastore-$(metastore-version).tar.gz \
fi
-$(ibidir)/mpfr: $(tdir)/mpfr-$(mpfr-version).tar.xz \
- $(ibidir)/gmp
- $(call gbuild, $<, mpfr-$(mpfr-version), static, , , make check) \
+$(ibidir)/mpfr: $(ibidir)/gmp \
+ | $(tdir)/mpfr-$(mpfr-version).tar.xz
+ $(call gbuild, mpfr-$(mpfr-version), static, , , make check) \
&& echo "GNU Multiple Precision Floating-Point Reliably $(mpfr-version)" > $@
-$(ibidir)/pkg-config: $(tdir)/pkg-config-$(pkgconfig-version).tar.gz \
- | $(ibidir)/coreutils
+$(ibidir)/pkg-config: | $(ibidir)/coreutils \
+ $(tdir)/pkg-config-$(pkgconfig-version).tar.gz
# An existing `libiconv' can cause a conflict with `pkg-config',
# this is why `libiconv' depends on `pkg-config'. On a clean build,
# `pkg-config' is built first. But when we don't have a clean build
@@ -1030,28 +1033,28 @@ $(ibidir)/pkg-config: $(tdir)/pkg-config-$(pkgconfig-version).tar.gz \
if [ x$(on_mac_os) = xyes ]; then export compiler="CC=clang"; \
else export compiler=""; \
fi; \
- $(call gbuild, $<, pkg-config-$(pkgconfig-version), static, \
+ $(call gbuild, pkg-config-$(pkgconfig-version), static, \
$$compiler --with-internal-glib \
--with-pc-path=$(ildir)/pkgconfig, V=1) \
&& echo "pkg-config $(pkgconfig-version)" > $@
-$(ibidir)/sed: $(tdir)/sed-$(sed-version).tar.xz \
- | $(ibidir)/coreutils
- $(call gbuild, $<, sed-$(sed-version), static) \
+$(ibidir)/sed: | $(ibidir)/coreutils \
+ $(tdir)/sed-$(sed-version).tar.xz
+ $(call gbuild, sed-$(sed-version), static) \
&& echo "GNU Sed $(sed-version)" > $@
-$(ibidir)/texinfo: $(tdir)/texinfo-$(texinfo-version).tar.xz \
- | $(ibidir)/bash
- $(call gbuild, $<, texinfo-$(texinfo-version), static) \
+$(ibidir)/texinfo: | $(ibidir)/bash \
+ $(tdir)/texinfo-$(texinfo-version).tar.xz
+ $(call gbuild, texinfo-$(texinfo-version), static) \
&& if [ "x$(needpatchelf)" != x ]; then \
$(ibdir)/patchelf --set-rpath $(ildir) $(ibdir)/info; \
$(ibdir)/patchelf --set-rpath $(ildir) $(ibdir)/install-info; \
fi \
&& echo "GNU Texinfo $(sed-version)" > $@
-$(ibidir)/which: $(tdir)/which-$(which-version).tar.gz \
- | $(ibidir)/coreutils
- $(call gbuild, $<, which-$(which-version), static) \
+$(ibidir)/which: | $(ibidir)/coreutils \
+ $(tdir)/which-$(which-version).tar.gz
+ $(call gbuild, which-$(which-version), static) \
&& echo "GNU Which $(which-version)" > $@
@@ -1066,14 +1069,14 @@ $(ibidir)/which: $(tdir)/which-$(which-version).tar.gz \
# GCC and its prerequisites
# -------------------------
-$(ibidir)/isl: $(tdir)/isl-$(isl-version).tar.bz2 \
- $(ibidir)/gmp
- $(call gbuild, $<, isl-$(isl-version), static, , V=1) \
+$(ibidir)/isl: $(ibidir)/gmp \
+ | $(tdir)/isl-$(isl-version).tar.bz2
+ $(call gbuild, isl-$(isl-version), static, , V=1) \
&& echo "GNU Integer Set Library $(isl-version)" > $@
-$(ibidir)/mpc: $(tdir)/mpc-$(mpc-version).tar.gz \
- $(ibidir)/mpfr
- $(call gbuild, $<, mpc-$(mpc-version), static, , , make check) \
+$(ibidir)/mpc: $(ibidir)/mpfr \
+ | $(tdir)/mpc-$(mpc-version).tar.gz
+ $(call gbuild, mpc-$(mpc-version), static, , , make check) \
&& echo "GNU Multiple Precision Complex library" > $@
# Binutils' assembler (`as') and linker (`ld') will conflict with other
@@ -1097,20 +1100,19 @@ endif
# programs (http://savannah.nongnu.org/bugs/?56294). Therefore, we'll set
# all other basic programs as Binutils prerequisite and GCC (the final
# basic target) ultimately just depends on Binutils.
-$(ibidir)/binutils: $(binutils-tarball) \
- | $(gcc-prerequisites) \
- $(ibidir)/metastore \
- $(ibidir)/findutils \
- $(ibidir)/diffutils \
- $(ibidir)/coreutils \
- $(ibidir)/glibtool \
- $(ibidir)/which \
+$(ibidir)/binutils: | $(ibidir)/sed \
$(ibidir)/wget \
$(ibidir)/grep \
$(ibidir)/file \
$(ibidir)/gawk \
- $(ibidir)/sed
-
+ $(ibidir)/which \
+ $(ibidir)/glibtool \
+ $(binutils-tarball) \
+ $(ibidir)/metastore \
+ $(ibidir)/findutils \
+ $(ibidir)/diffutils \
+ $(ibidir)/coreutils \
+ $(gcc-prerequisites)
if [ x$(on_mac_os) = xyes ]; then \
$(call makelink,as); \
$(call makelink,ar); \
@@ -1120,7 +1122,7 @@ $(ibidir)/binutils: $(binutils-tarball) \
$(call makelink,ranlib); \
echo "" > $@; \
else \
- $(call gbuild, $<, binutils-$(binutils-version), static) \
+ $(call gbuild, binutils-$(binutils-version), static) \
&& echo "GNU Binutils $(binutils-version)" > $@; \
fi
@@ -1142,8 +1144,8 @@ gcc-tarball =
else
gcc-tarball = $(tdir)/gcc-$(gcc-version).tar.xz
endif
-$(ibidir)/gcc: $(gcc-tarball) \
- $(ibidir)/binutils
+$(ibidir)/gcc: | $(ibidir)/binutils \
+ $(gcc-tarball)
# GCC builds is own libraries in '$(idir)/lib64'. But all other
# libraries are in '$(idir)/lib'. Since this project is only for a
@@ -1167,7 +1169,7 @@ $(ibidir)/gcc: $(gcc-tarball) \
\
cd $(ddir); \
rm -rf gcc-$(gcc-version); \
- tar xf $< \
+ tar xf $(word 1,$(filter $(tdir)/%,$|)) \
&& cd gcc-$(gcc-version) \
&& mkdir build \
&& cd build \
diff --git a/reproduce/software/make/build-rules.mk b/reproduce/software/make/build-rules.mk
index b82ccc0..a2d1c17 100644
--- a/reproduce/software/make/build-rules.mk
+++ b/reproduce/software/make/build-rules.mk
@@ -38,14 +38,13 @@
# ----------------
#
# Arguments:
-# 1: Tarball full address.
-# 2: Directory name after unpacking.
-# 3: Set to `static' for a static build.
-# 4: Extra configuration options.
-# 5: Extra options/arguments to pass to Make.
-# 6: Step to run between `make' and `make install': usually `make check'.
-# 7: The configuration script (`configure' by default).
-# 8: Arguments for `make install'.
+# 1: Directory name after unpacking.
+# 2: Set to `static' for a static build.
+# 3: Extra configuration options.
+# 4: Extra options/arguments to pass to Make.
+# 5: Step to run between `make' and `make install': usually `make check'.
+# 6: The configuration script (`configure' by default).
+# 7: Arguments for `make install'.
#
# NOTE: Unfortunately the configure script of `zlib' doesn't recognize
# `SHELL'. So we'll have to remove it from the call to the configure
@@ -54,17 +53,22 @@
# NOTE: A program might not contain any configure script. In this case,
# we'll just pass a non-relevant function like `pwd'. So SED should be used
# to modify `confscript' or to set `configop'.
-gbuild = if [ x$(static_build) = xyes ] && [ "x$(3)" = xstatic ]; then \
+gbuild = if [ x$(static_build) = xyes ] && [ "x$(2)" = xstatic ]; then \
export LDFLAGS="$$LDFLAGS -static"; \
fi; \
- check="$(6)"; \
+ check="$(5)"; \
if [ x"$$check" = x ]; then check="echo Skipping-check"; fi; \
- cd $(ddir); rm -rf $(2); \
- if ! tar xf $(1); then echo; echo "Tar error"; exit 1; fi; \
- cd $(2); \
+ cd $(ddir); rm -rf $(1); \
+ if [ x"$$gbuild_tar" = x ]; then \
+ tarball=$(word 1,$(filter $(tdir)/%,$|)); \
+ else tarball=$$gbuild_tar; \
+ fi; \
+ if ! tar xf $$tarball; then \
+ echo; echo "Tar error"; exit 1; fi; \
+ cd $(1); \
\
- if [ x"$(strip $(7))" = x ]; then confscript=./configure; \
- else confscript="$(strip $(7))"; \
+ if [ x"$(strip $(6))" = x ]; then confscript=./configure; \
+ else confscript="$(strip $(6))"; \
fi; \
\
if [ -f $(ibdir)/bash ]; then \
@@ -81,20 +85,20 @@ gbuild = if [ x$(static_build) = xyes ] && [ "x$(3)" = xstatic ]; then \
fi; \
\
if [ -f $$confscript ]; then \
- if [ x"$(strip $(2))" = x"zlib-$(zlib-version)" ]; then \
+ if [ x"$(strip $(1))" = x"zlib-$(zlib-version)" ]; then \
configop="--prefix=$(idir)"; \
else configop="$$shellop --prefix=$(idir)"; \
fi; \
fi; \
\
echo; echo "Using '$$confscript' to configure:"; echo; \
- echo "$$confscript $(4) $$configop"; echo; \
- $$confscript $(4) $$configop \
- && make "$$shellop" $(5) \
+ echo "$$confscript $(3) $$configop"; echo; \
+ $$confscript $(3) $$configop \
+ && make "$$shellop" $(4) \
&& $$check \
- && make "$$shellop" install $(8) \
+ && make "$$shellop" install $(7) \
&& cd .. \
- && rm -rf $(2)
+ && rm -rf $(1)
@@ -103,23 +107,23 @@ gbuild = if [ x$(static_build) = xyes ] && [ "x$(3)" = xstatic ]; then \
# -----
#
# According to the link below, in CMake `/bin/sh' is hardcoded, so there is
-# no way to change it.
+# no way to change it unfortunately!
#
# https://stackoverflow.com/questions/21167014/how-to-set-shell-variable-in-makefiles-generated-by-cmake
-cbuild = if [ x$(static_build) = xyes ] && [ $(3)x = staticx ]; then \
+cbuild = if [ x$(static_build) = xyes ] && [ $(2)x = staticx ]; then \
export LDFLAGS="$$LDFLAGS -static"; \
opts="-DBUILD_SHARED_LIBS=OFF"; \
fi; \
cd $(ddir) \
- && rm -rf $(2) \
- && tar xf $(1) \
- && cd $(2) \
+ && rm -rf $(1) \
+ && tar xf $(word 1,$(filter $(tdir)/%,$|)) \
+ && cd $(1) \
&& rm -rf project-build \
&& mkdir project-build \
&& cd project-build \
&& cmake .. -DCMAKE_LIBRARY_PATH=$(ildir) \
-DCMAKE_INSTALL_PREFIX=$(idir) \
- -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON $$opts $(4) \
+ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON $$opts $(3) \
&& make && make install \
&& cd ../.. \
- && rm -rf $(2)
+ && rm -rf $(1)
diff --git a/reproduce/software/make/high-level.mk b/reproduce/software/make/high-level.mk
index 7ee7062..e164ef0 100644
--- a/reproduce/software/make/high-level.mk
+++ b/reproduce/software/make/high-level.mk
@@ -184,7 +184,7 @@ $(tarballs): $(tdir)/%: | $(lockdir)
# Remove all numbers, `-' and `.' from the tarball name so we can
# search more easily only with the program name.
- n=$$(echo $* | sed -e's/[0-9\-]/ /g' -e's/\./ /g' \
+ @n=$$(echo $* | sed -e's/[0-9\-]/ /g' -e's/\./ /g' \
| awk '{print $$1}' )
# Set the top download link of the requested tarball.
@@ -312,8 +312,10 @@ $(tarballs): $(tdir)/%: | $(lockdir)
mv "$@.unchecked" "$@"
else
checksum=$$(sha512sum "$@.unchecked" | awk '{print $$1}')
- if [ x"$$checksum" = x"$$c" ]; then mv "$@.unchecked" "$@"
- else echo "ERROR: Non-matching checksum for '$*'."
+ if [ x"$$checksum" = x"$$c" ]; then
+ mv "$@.unchecked" "$@"
+ else
+ echo "ERROR: Non-matching checksum for '$*'."
echo "Checksum should be: $$c"
echo "Checksum is: $$checksum"
exit 1
@@ -337,21 +339,21 @@ $(tarballs): $(tdir)/%: | $(lockdir)
# libraries. Therefore, we can't use the easy `.a' suffix for static
# libraries as targets and there are different conventions for shared
# library names.
-$(ibidir)/apr: $(tdir)/apr-$(apr-version).tar.gz
- $(call gbuild, $<, apr-$(apr-version), ,--disable-static) \
+$(ibidir)/apr: | $(tdir)/apr-$(apr-version).tar.gz
+ $(call gbuild, apr-$(apr-version), ,--disable-static) \
&& echo "Apache Portable Runtime $(apr-version)" > $@
-$(ibidir)/apr-util: $(tdir)/apr-util-$(apr-util-version).tar.gz \
- $(ibidir)/apr
- $(call gbuild, $<, apr-util-$(apr-util-version), , \
+$(ibidir)/apr-util: $(ibidir)/apr \
+ | $(tdir)/apr-util-$(apr-util-version).tar.gz
+ $(call gbuild, apr-util-$(apr-util-version), , \
--disable-static \
--with-apr=$(idir) \
--with-openssl=$(idir) \
--with-crypto ) \
&& echo "Apache Portable Runtime Utility $(apr-util-version)" > $@
-$(ibidir)/atlas: $(tdir)/atlas-$(atlas-version).tar.bz2 \
- $(tdir)/lapack-$(lapack-version).tar.gz
+$(ibidir)/atlas: | $(tdir)/atlas-$(atlas-version).tar.bz2 \
+ $(tdir)/lapack-$(lapack-version).tar.gz
# Get the operating system specific features (how to get
# CPU frequency and the library suffixes). To make the steps
@@ -391,13 +393,13 @@ $(ibidir)/atlas: $(tdir)/atlas-$(atlas-version).tar.bz2 \
# `rpath_command'.
export LDFLAGS=-L$(ildir)
cd $(ddir) \
- && tar xf $< \
+ && tar xf $(tdir)/atlas-$(atlas-version).tar.bz2 \
&& cd ATLAS \
&& rm -rf build \
&& mkdir build \
&& cd build \
&& ../configure -b 64 -D c -DPentiumCPS=$$core \
- --with-netlib-lapack-tarfile=$(word 2, $^) \
+ --with-netlib-lapack-tarfile=$(tdir)/lapack-$(lapack-version).tar.gz \
--cripple-atlas-performance \
-Fa alg -fPIC --shared $$clangflag \
--prefix=$(idir) \
@@ -431,15 +433,16 @@ $(ibidir)/atlas: $(tdir)/atlas-$(atlas-version).tar.bz2 \
fi
# Boost doesn't use the standard GNU Build System.
-$(ibidir)/boost: $(tdir)/boost-$(boost-version).tar.gz \
- $(ibidir)/openmpi \
- $(ibidir)/python
+$(ibidir)/boost: $(ibidir)/openmpi \
+ | $(ibidir)/python \
+ $(tdir)/boost-$(boost-version).tar.gz
vstr=$$(echo $(boost-version) | sed -e's/\./_/g')
rm -rf $(ddir)/boost_$$vstr
- topdir=$(pwd); cd $(ddir); tar xf $<
- cd boost_$$vstr
- ./bootstrap.sh --prefix=$(idir) --with-libraries=all \
- --with-python=python3 \
+ topdir=$(pwd); cd $(ddir);
+ tar xf $(word 1,$(filter $(tdir)/%,$|))
+ && cd boost_$$vstr
+ && ./bootstrap.sh --prefix=$(idir) --with-libraries=all \
+ --with-python=python3 \
&& echo "using mpi ;" > project-config.jam \
&& ./b2 stage threading=multi link=shared --prefix=$(idir) -j$(numthreads) \
&& ./b2 install threading=multi link=shared --prefix=$(idir) -j$(numthreads) \
@@ -447,14 +450,14 @@ $(ibidir)/boost: $(tdir)/boost-$(boost-version).tar.gz \
&& rm -rf $(ddir)/boost_$$vstr \
&& echo "Boost $(boost-version)" > $@
-$(ibidir)/cfitsio: $(tdir)/cfitsio-$(cfitsio-version).tar.gz \
- $(ibidir)/curl
+$(ibidir)/cfitsio: $(ibidir)/curl \
+ | $(tdir)/cfitsio-$(cfitsio-version).tar.gz
# CFITSIO hard-codes '@rpath' inside the shared library on
# Mac systems. So we need to change it to our library
# installation path. It doesn't affect GNU/Linux, so we'll
# just do it in any case to keep things clean.
- topdir=$(pwd); cd $(ddir); tar xf $<
+ topdir=$(pwd); cd $(ddir); tar xf $(word 1,$(filter $(tdir)/%,$|))
customtar=cfitsio-$(cfitsio-version)-custom.tar.gz
cd cfitsio-$(cfitsio-version)
sed configure -e's|@rpath|$(ildir)|g' > configure_tmp
@@ -467,60 +470,61 @@ $(ibidir)/cfitsio: $(tdir)/cfitsio-$(cfitsio-version).tar.gz \
# Continue the standard build on the customized tarball. Note that
# with the installation of CFITSIO, `fpack' and `funpack' are not
# installed by default. Because of that, they are added explicity.
- $(call gbuild, $$customtar, cfitsio-$(cfitsio-version), , \
+ export gbuild_tar=$$customtar
+ $(call gbuild, cfitsio-$(cfitsio-version), , \
--enable-sse2 --enable-reentrant \
--with-bzip2=$(idir), , make shared fpack funpack) \
&& rm $$customtar \
&& echo "CFITSIO $(cfitsio-version)" > $@
-$(ibidir)/cairo: $(tdir)/cairo-$(cairo-version).tar.xz \
- $(ibidir)/freetype \
+$(ibidir)/cairo: $(ibidir)/freetype \
$(ibidir)/libpng \
- $(ibidir)/pixman
- $(call gbuild, $<, cairo-$(cairo-version), static, \
+ $(ibidir)/pixman \
+ | $(tdir)/cairo-$(cairo-version).tar.xz
+ $(call gbuild, cairo-$(cairo-version), static, \
--with-x=no, -j$(numthreads) V=1) \
&& echo "Cairo $(cairo-version)" > $@
# Eigen is just headers! So it doesn't need to be compiled. Once unpacked
# it has a checksum after `eigen-eigen', so we'll just use a `*' to choose
# the unpacked directory.
-$(ibidir)/eigen: $(tdir)/eigen-$(eigen-version).tar.gz
+$(ibidir)/eigen: | $(tdir)/eigen-$(eigen-version).tar.gz
rm -rf $(ddir)/eigen-eigen-*
- topdir=$(pwd); cd $(ddir); tar xf $<
+ topdir=$(pwd); cd $(ddir); tar xf $(word 1,$(filter $(tdir)/%,$|))
cd eigen-eigen-*
cp -r Eigen $(iidir)/eigen3 \
&& cd $$topdir \
&& rm -rf $(ddir)/eigen-eigen-* \
&& echo "Eigen $(eigen-version)" > $@
-$(ibidir)/fftw: $(tdir)/fftw-$(fftw-version).tar.gz
+$(ibidir)/fftw: | $(tdir)/fftw-$(fftw-version).tar.gz
# FFTW's single and double precission libraries must be built
# independently: for the the single-precision library, we need to
# add the `--enable-float' option. We will build this first, then
# the default double-precision library.
confop="--enable-shared --enable-threads --enable-avx --enable-sse2"
- $(call gbuild, $<, fftw-$(fftw-version), static, \
+ $(call gbuild, fftw-$(fftw-version), static, \
$$confop --enable-float) \
- && $(call gbuild, $<, fftw-$(fftw-version), static, \
+ && $(call gbuild, fftw-$(fftw-version), static, \
$$confop) \
&& cp $(dtexdir)/fftw.tex $(ictdir)/ \
&& echo "FFTW $(fftw-version) \citep{fftw}" > $@
# Freetype is necessary to install matplotlib
-$(ibidir)/freetype: $(tdir)/freetype-$(freetype-version).tar.gz \
- $(ibidir)/libpng
- $(call gbuild, $<, freetype-$(freetype-version), static) \
+$(ibidir)/freetype: $(ibidir)/libpng \
+ | $(tdir)/freetype-$(freetype-version).tar.gz
+ $(call gbuild, freetype-$(freetype-version), static) \
&& echo "FreeType $(freetype-version)" > $@
-$(ibidir)/gsl: $(tdir)/gsl-$(gsl-version).tar.gz
- $(call gbuild, $<, gsl-$(gsl-version), static) \
+$(ibidir)/gsl: | $(tdir)/gsl-$(gsl-version).tar.gz
+ $(call gbuild, gsl-$(gsl-version), static) \
&& echo "GNU Scientific Library $(gsl-version)" > $@
-$(ibidir)/hdf5: $(tdir)/hdf5-$(hdf5-version).tar.gz \
- $(ibidir)/openmpi
+$(ibidir)/hdf5: $(ibidir)/openmpi \
+ | $(tdir)/hdf5-$(hdf5-version).tar.gz
export CC=mpicc; \
export FC=mpif90; \
- $(call gbuild, $<, hdf5-$(hdf5-version), static, \
+ $(call gbuild, hdf5-$(hdf5-version), static, \
--enable-parallel \
--enable-fortran, -j$(numthreads) V=1) \
&& echo "HDF5 library $(hdf5-version)" > $@
@@ -540,11 +544,11 @@ healpix-python-dep =
else
healpix-python-dep = $(ipydir)/matplotlib $(ipydir)/astropy
endif
-$(ibidir)/healpix: $(tdir)/healpix-$(healpix-version).tar.gz \
+$(ibidir)/healpix: $(ibidir)/cfitsio \
$(healpix-python-dep) \
- $(ibidir)/autoconf \
- $(ibidir)/automake \
- $(ibidir)/cfitsio
+ | $(ibidir)/autoconf \
+ $(ibidir)/automake \
+ $(tdir)/healpix-$(healpix-version).tar.gz
if [ x"$(healpix-python-dep)" = x ]; then
pycommand1="echo no-healpy-because-no-other-python"
pycommand2="echo no-healpy-because-no-other-python"
@@ -553,8 +557,9 @@ $(ibidir)/healpix: $(tdir)/healpix-$(healpix-version).tar.gz \
pycommand2="python setup.py install"
fi
rm -rf $(ddir)/Healpix_$(healpix-version)
- topdir=$(pwd); cd $(ddir); tar xf $<
- cd Healpix_$(healpix-version)/src/C/autotools/ \
+ topdir=$(pwd); cd $(ddir);
+ tar xf $(word 1,$(filter $(tdir)/%,$|))
+ && cd Healpix_$(healpix-version)/src/C/autotools/ \
&& autoreconf --install \
&& ./configure --prefix=$(idir) \
&& make V=1 -j$(numthreads) SHELL=$(ibdir)/bash \
@@ -572,51 +577,51 @@ $(ibidir)/healpix: $(tdir)/healpix-$(healpix-version).tar.gz \
&& cp $(dtexdir)/healpix.tex $(ictdir)/ \
&& echo "HEALPix $(healpix-version) \citep{healpix}" > $@
-$(ibidir)/libjpeg: $(tdir)/jpegsrc.$(libjpeg-version).tar.gz
- $(call gbuild, $<, jpeg-9b, static) \
+$(ibidir)/libjpeg: | $(tdir)/jpegsrc.$(libjpeg-version).tar.gz
+ $(call gbuild, jpeg-9b, static) \
&& echo "Libjpeg $(libjpeg-version)" > $@
-$(ibidir)/libnsl: $(tdir)/libnsl-$(libnsl-version).tar.gz \
+$(ibidir)/libnsl: $(ibidir)/libtirpc \
$(ibidir)/rpcsvc-proto \
- $(ibidir)/libtirpc
- $(call gbuild, $<, libnsl-$(libnsl-version), static, \
+ | $(tdir)/libnsl-$(libnsl-version).tar.gz
+ $(call gbuild, libnsl-$(libnsl-version), static, \
--sysconfdir=$(idir)/etc) \
&& echo "Libnsl $(libnsl-version)" > $@
-$(ibidir)/libpng: $(tdir)/libpng-$(libpng-version).tar.xz
- $(call gbuild, $<, libpng-$(libpng-version), static) \
+$(ibidir)/libpng: | $(tdir)/libpng-$(libpng-version).tar.xz
+ $(call gbuild, libpng-$(libpng-version), static) \
&& echo "Libpng $(libpng-version)" > $@
-$(ibidir)/libtiff: $(tdir)/tiff-$(libtiff-version).tar.gz \
- $(ibidir)/libjpeg
- $(call gbuild, $<, tiff-$(libtiff-version), static, \
+$(ibidir)/libtiff: $(ibidir)/libjpeg \
+ | $(tdir)/tiff-$(libtiff-version).tar.gz
+ $(call gbuild, tiff-$(libtiff-version), static, \
--disable-jbig \
--disable-webp \
--disable-zstd) \
&& echo "Libtiff $(libtiff-version)" > $@
-$(ibidir)/libtirpc: $(tdir)/libtirpc-$(libtirpc-version).tar.bz2
- $(call gbuild, $<, libtirpc-$(libtirpc-version), static, \
+$(ibidir)/libtirpc: | $(tdir)/libtirpc-$(libtirpc-version).tar.bz2
+ $(call gbuild, libtirpc-$(libtirpc-version), static, \
--disable-gssapi, V=1) \
echo "libtirpc $(libtirpc-version)" > $@
-$(ibidir)/libxml2: $(tdir)/libxml2-$(libxml2-version).tar.gz
+$(ibidir)/libxml2: | $(tdir)/libxml2-$(libxml2-version).tar.gz
# The libxml2 tarball also contains Python bindings which are built and
# installed to a system directory by default. If you don't need the Python
# bindings, the easiest solution is to compile without Python support:
# ./configure --without-python
# If you really need the Python bindings, try the
# --with-python-install-dir=DIR option
- $(call gbuild, $<, libxml2-$(libxml2-version), static, \
+ $(call gbuild, libxml2-$(libxml2-version), static, \
--without-python) \
&& echo "Libxml2 $(libxml2-version)" > $@
-$(ibidir)/openblas: $(tdir)/openblas-$(openblas-version).tar.gz
+$(ibidir)/openblas: | $(tdir)/openblas-$(openblas-version).tar.gz
if [ x$(on_mac_os) = xyes ]; then \
export CC=clang; \
fi; \
cd $(ddir) \
- && tar xf $< \
+ && tar xf $(word 1,$(filter $(tdir)/%,$|)) \
&& cd OpenBLAS-$(openblas-version) \
&& make \
&& make PREFIX=$(idir) install \
@@ -624,8 +629,8 @@ $(ibidir)/openblas: $(tdir)/openblas-$(openblas-version).tar.gz
&& rm -rf OpenBLAS-$(openblas-version) \
&& echo "OpenBLAS $(openblas-version)" > $@
-$(ibidir)/openmpi: $(tdir)/openmpi-$(openmpi-version).tar.gz
- $(call gbuild, $<, openmpi-$(openmpi-version), static, , \
+$(ibidir)/openmpi: | $(tdir)/openmpi-$(openmpi-version).tar.gz
+ $(call gbuild, openmpi-$(openmpi-version), static, , \
-j$(numthreads) V=1) \
&& echo "Open MPI $(openmpi-version)" > $@
@@ -634,8 +639,8 @@ $(ibidir)/openmpi: $(tdir)/openmpi-$(openmpi-version).tar.gz
# within the project because of all the security issues it may cause. Only
# enable/build it in a project with caution, and if there is no other
# solution (for example to disable SSH in a program that may ask for it.
-$(ibidir)/openssh: $(tdir)/openssh-$(openssh-version).tar.gz
- $(call gbuild, $<, openssh-$(openssh-version), static, \
+$(ibidir)/openssh: | $(tdir)/openssh-$(openssh-version).tar.gz
+ $(call gbuild, openssh-$(openssh-version), static, \
--with-privsep-path=$(ibdir)/.ssh_privsep \
--with-privsep-user=nobody \
--with-md5-passwords \
@@ -643,23 +648,23 @@ $(ibidir)/openssh: $(tdir)/openssh-$(openssh-version).tar.gz
, -j$(numthreads) V=1) \
&& echo "OpenSSH $(openssh-version)" > $@
-$(ibidir)/pixman: $(tdir)/pixman-$(pixman-version).tar.gz
- $(call gbuild, $<, pixman-$(pixman-version), static, , \
+$(ibidir)/pixman: | $(tdir)/pixman-$(pixman-version).tar.gz
+ $(call gbuild, pixman-$(pixman-version), static, , \
-j$(numthreads) V=1) \
&& echo "Pixman $(pixman-version)" > $@
-$(ibidir)/rpcsvc-proto: $(tdir)/rpcsvc-proto-$(rpcsvc-proto-version).tar.xz
- $(call gbuild, $<, rpcsvc-proto-$(rpcsvc-proto-version), static) \
+$(ibidir)/rpcsvc-proto: | $(tdir)/rpcsvc-proto-$(rpcsvc-proto-version).tar.xz
+ $(call gbuild, rpcsvc-proto-$(rpcsvc-proto-version), static) \
&& echo "rpcsvc $(rpcsvc-proto-version)" > $@
-$(ibidir)/tides: $(tdir)/tides-$(tides-version).tar.gz
- $(call gbuild, $<, tides-$(tides-version), static,\
+$(ibidir)/tides: | $(tdir)/tides-$(tides-version).tar.gz
+ $(call gbuild, tides-$(tides-version), static,\
--with-gmp=$(idir) --with-mpfr=$(idir)) \
&& cp $(dtexdir)/tides.tex $(ictdir)/ \
&& echo "TIDES $(tides-version) \citep{tides}" > $@
-$(ibidir)/yaml: $(tdir)/yaml-$(yaml-version).tar.gz
- $(call gbuild, $<, yaml-$(yaml-version), static) \
+$(ibidir)/yaml: | $(tdir)/yaml-$(yaml-version).tar.gz
+ $(call gbuild, yaml-$(yaml-version), static) \
&& echo "LibYAML $(yaml-version)" > $@
@@ -687,10 +692,10 @@ $(ibidir)/yaml: $(tdir)/yaml-$(yaml-version).tar.gz
# functions! But apparently `libgit2' has its own implementation of libiconv
# that it uses if it can't find libiconv on macOS. So, to fix this problem
# it is necessary to use the option `-DUSE_ICONV=OFF` in the configure step.
-$(ibidir)/libgit2: $(tdir)/libgit2-$(libgit2-version).tar.gz \
- $(ibidir)/cmake \
- $(ibidir)/curl
- $(call cbuild, $<, libgit2-$(libgit2-version), static, \
+$(ibidir)/libgit2: $(ibidir)/curl \
+ | $(ibidir)/cmake \
+ $(tdir)/libgit2-$(libgit2-version).tar.gz
+ $(call cbuild, libgit2-$(libgit2-version), static, \
-DUSE_SSH=OFF -DBUILD_CLAR=OFF \
-DTHREADSAFE=ON -DUSE_ICONV=OFF ) \
&& if [ x$(on_mac_os) = xyes ]; then \
@@ -699,9 +704,9 @@ $(ibidir)/libgit2: $(tdir)/libgit2-$(libgit2-version).tar.gz \
fi \
&& echo "Libgit2 $(libgit2-version)" > $@
-$(ibidir)/wcslib: $(tdir)/wcslib-$(wcslib-version).tar.bz2 \
- $(ibidir)/cfitsio
- $(call gbuild, $<, wcslib-$(wcslib-version), , \
+$(ibidir)/wcslib: $(ibidir)/cfitsio \
+ | $(tdir)/wcslib-$(wcslib-version).tar.bz2
+ $(call gbuild, wcslib-$(wcslib-version), , \
LIBS="-pthread -lcurl -lm" \
--with-cfitsiolib=$(ildir) \
--with-cfitsioinc=$(idir)/include \
@@ -727,24 +732,25 @@ $(ibidir)/wcslib: $(tdir)/wcslib-$(wcslib-version).tar.bz2 \
# Astrometry-net contains a lot of programs. We need to specify the
# installation directory and the Python executable (by default it will look
# for /usr/bin/python)
-$(ibidir)/astrometrynet: $(tdir)/astrometry.net-$(astrometrynet-version).tar.gz \
- $(ibidir)/cfitsio \
- $(ibidir)/libjpeg \
+$(ibidir)/astrometrynet: $(ibidir)/gsl \
+ $(ibidir)/swig \
+ $(ipydir)/numpy \
+ $(ibidir)/cairo \
$(ibidir)/libpng \
$(ibidir)/netpbm \
- $(ibidir)/python \
$(ibidir)/wcslib \
- $(ibidir)/cairo \
- $(ipydir)/numpy \
- $(ibidir)/swig \
- $(ibidir)/gsl
+ $(ibidir)/cfitsio \
+ $(ibidir)/libjpeg \
+ | $(tdir)/astrometry.net-$(astrometrynet-version).tar.gz
# We are modifying the Makefile in two steps because on Mac OS
# system we do not have `/proc/cpuinfo' nor `free'. Since this is
# only for the `report.txt', this changes do not causes problems in
# running `astrometrynet'
cd $(ddir) \
&& rm -rf astrometry.net-$(astrometrynet-version) \
- && if ! tar xf $<; then echo; echo "Tar error"; exit 1; fi \
+ && if ! tar xf $(word 1,$(filter $(tdir)/%,$|)); then \
+ echo; echo "Tar error"; exit 1; \
+ fi \
&& cd astrometry.net-$(astrometrynet-version) \
&& sed -e 's|cat /proc/cpuinfo|echo "Ignoring CPU info"|' \
-e 's|-free|echo "Ignoring RAM info"|' Makefile > Makefile.tmp \
@@ -758,17 +764,17 @@ $(ibidir)/astrometrynet: $(tdir)/astrometry.net-$(astrometrynet-version).tar.gz
&& cp $(dtexdir)/astrometrynet.tex $(ictdir)/ \
&& echo "Astrometry.net $(astrometrynet-version) \citep{astrometrynet}" > $@
-$(ibidir)/autoconf: $(tdir)/autoconf-$(autoconf-version).tar.lz
- $(call gbuild, $<, autoconf-$(autoconf-version), static, ,V=1) \
+$(ibidir)/autoconf: | $(tdir)/autoconf-$(autoconf-version).tar.lz
+ $(call gbuild, autoconf-$(autoconf-version), static, ,V=1) \
&& echo "GNU Autoconf $(autoconf-version)" > $@
-$(ibidir)/automake: $(tdir)/automake-$(automake-version).tar.gz
- $(call gbuild, $<, automake-$(automake-version), static, ,V=1) \
+$(ibidir)/automake: | $(tdir)/automake-$(automake-version).tar.gz
+ $(call gbuild, automake-$(automake-version), static, ,V=1) \
&& echo "GNU Automake $(automake-version)" > $@
-$(ibidir)/bison: $(tdir)/bison-$(bison-version).tar.xz \
- $(ibidir)/help2man
- $(call gbuild, $<, bison-$(bison-version), static, ,V=1) \
+$(ibidir)/bison: | $(ibidir)/help2man \
+ $(tdir)/bison-$(bison-version).tar.xz
+ $(call gbuild, bison-$(bison-version), static, ,V=1) \
&& echo "GNU Bison $(bison-version)" > $@
# cdsclient is a set of software written in c to interact with astronomical
@@ -778,9 +784,9 @@ $(ibidir)/bison: $(tdir)/bison-$(bison-version).tar.xz \
# programs are scripts and we need to touch them before installing.
# Otherwise this software will be re-built each time the configure step is
# invoked.
-$(ibidir)/cdsclient: $(tdir)/cdsclient-$(cdsclient-version).tar.gz
+$(ibidir)/cdsclient: | $(tdir)/cdsclient-$(cdsclient-version).tar.gz
cd $(ddir) \
- && tar xf $< \
+ && tar xf $(word 1,$(filter $(tdir)/%,$|)) \
&& cd cdsclient-$(cdsclient-version) \
&& touch * \
&& ./configure --prefix=$(idir) \
@@ -791,8 +797,8 @@ $(ibidir)/cdsclient: $(tdir)/cdsclient-$(cdsclient-version).tar.gz
&& echo "cdsclient $(cdsclient-version)" > $@
# CMake can be built with its custom `./bootstrap' script.
-$(ibidir)/cmake: $(tdir)/cmake-$(cmake-version).tar.gz \
- $(ibidir)/curl
+$(ibidir)/cmake: $(ibidir)/curl \
+ | $(tdir)/cmake-$(cmake-version).tar.gz
# After searching in `bootstrap', I couldn't find `LIBS', only
# `LDFLAGS'. So the extra libraries are being added to `LDFLAGS',
# not `LIBS'.
@@ -805,7 +811,7 @@ $(ibidir)/cmake: $(tdir)/cmake-$(cmake-version).tar.gz \
fi; \
cd $(ddir) \
&& rm -rf cmake-$(cmake-version) \
- && tar xf $< \
+ && tar xf $(word 1,$(filter $(tdir)/%,$|)) \
&& cd cmake-$(cmake-version) \
&& ./bootstrap --prefix=$(idir) --system-curl --system-zlib \
--system-bzip2 --system-liblzma --no-qt-gui \
@@ -816,40 +822,40 @@ $(ibidir)/cmake: $(tdir)/cmake-$(cmake-version).tar.gz \
&& rm -rf cmake-$(cmake-version) \
&& echo "CMake $(cmake-version)" > $@
-$(ibidir)/flex: $(tdir)/flex-$(flex-version).tar.gz \
- $(ibidir)/bison
- $(call gbuild, $<, flex-$(flex-version), static, ,V=1) \
+$(ibidir)/flex: $(ibidir)/bison \
+ | $(tdir)/flex-$(flex-version).tar.gz
+ $(call gbuild, flex-$(flex-version), static, ,V=1) \
&& echo "Flex $(swig-version)" > $@
-$(ibidir)/ghostscript: $(tdir)/ghostscript-$(ghostscript-version).tar.gz \
- $(ibidir)/libtiff
- $(call gbuild, $<, ghostscript-$(ghostscript-version)) \
+$(ibidir)/ghostscript: $(ibidir)/libtiff \
+ | $(tdir)/ghostscript-$(ghostscript-version).tar.gz
+ $(call gbuild, ghostscript-$(ghostscript-version)) \
&& echo "GPL Ghostscript $(ghostscript-version)" > $@
-$(ibidir)/gnuastro: $(tdir)/gnuastro-$(gnuastro-version).tar.lz \
- $(ibidir)/ghostscript \
+$(ibidir)/gnuastro: $(ibidir)/gsl \
+ $(ibidir)/wcslib \
$(ibidir)/libjpeg \
$(ibidir)/libtiff \
$(ibidir)/libgit2 \
- $(ibidir)/wcslib \
- $(ibidir)/gsl
+ $(ibidir)/ghostscript \
+ | $(tdir)/gnuastro-$(gnuastro-version).tar.lz
ifeq ($(static_build),yes)
staticopts="--enable-static=yes --enable-shared=no";
endif
- $(call gbuild, $<, gnuastro-$(gnuastro-version), static, \
+ $(call gbuild, gnuastro-$(gnuastro-version), static, \
$$staticopts, -j$(numthreads)) \
&& cp $(dtexdir)/gnuastro.tex $(ictdir)/ \
&& echo "GNU Astronomy Utilities $(gnuastro-version) \citep{gnuastro}" > $@
-$(ibidir)/help2man: $(tdir)/help2man-$(help2man-version).tar.xz
- $(call gbuild, $<, help2man-$(help2man-version), static, ,V=1) \
+$(ibidir)/help2man: | $(tdir)/help2man-$(help2man-version).tar.xz
+ $(call gbuild, help2man-$(help2man-version), static, ,V=1) \
&& echo "Help2man $(Help2man-version)" > $@
-$(ibidir)/imagemagick: $(tdir)/imagemagick-$(imagemagick-version).tar.xz \
+$(ibidir)/imagemagick: $(ibidir)/zlib \
$(ibidir)/libjpeg \
$(ibidir)/libtiff \
- $(ibidir)/zlib
- $(call gbuild, $<, ImageMagick-$(imagemagick-version), static, \
+ | $(tdir)/imagemagick-$(imagemagick-version).tar.xz
+ $(call gbuild, ImageMagick-$(imagemagick-version), static, \
--without-x --disable-openmp, V=1 -j$(numthreads)) \
&& echo "ImageMagick $(imagemagick-version)" > $@
@@ -862,15 +868,17 @@ $(ibidir)/imagemagick: $(tdir)/imagemagick-$(imagemagick-version).tar.xz \
# by `$(idir)'. After that, each compiled program (`imfit', `imfit-mcmc'
# and `makeimage') is copied into the installation directory and an `rpath'
# is added.
-$(ibidir)/imfit: $(tdir)/imfit-$(imfit-version).tar.gz \
- $(ibidir)/cfitsio \
- $(ibidir)/scons \
+$(ibidir)/imfit: $(ibidir)/gsl \
$(ibidir)/fftw \
- $(ibidir)/gsl
+ $(ibidir)/scons \
+ $(ibidir)/cfitsio \
+ | $(tdir)/imfit-$(imfit-version).tar.gz
cd $(ddir) \
&& unpackdir=imfit-$(imfit-version) \
&& rm -rf $$unpackdir \
- && if ! tar xf $<; then echo; echo "Tar error"; exit 1; fi \
+ && if ! tar xf $(word 1,$(filter $(tdir)/%,$|)); then \
+ echo; echo "Tar error"; exit 1; \
+ fi \
&& cd $$unpackdir \
&& sed -i 's|/usr/local|$(idir)|g' SConstruct \
&& sed -i 's|/usr/include|$(idir)/include|g' SConstruct \
@@ -903,12 +911,12 @@ $(ibidir)/imfit: $(tdir)/imfit-$(imfit-version).tar.gz \
# ask to the user. We give all answers with a pipe to the scripts (configure
# and install). The questions are different depending on the system (tested
# on GNU/Linux and Mac OS).
-$(ibidir)/netpbm: $(tdir)/netpbm-$(netpbm-version).tar.gz \
+$(ibidir)/netpbm: $(ibidir)/unzip \
+ $(ibidir)/libpng \
$(ibidir)/libjpeg \
$(ibidir)/libtiff \
$(ibidir)/libxml2 \
- $(ibidir)/libpng \
- $(ibidir)/unzip
+ | $(tdir)/netpbm-$(netpbm-version).tar.gz
if [ x$(on_mac_os) = xyes ]; then \
answers='\n\n$(ildir)\n\n\n\n\n\n$(ildir)/include\n\n$(ildir)/include\n\n$(ildir)/include\nnone\n\n'; \
else \
@@ -917,7 +925,9 @@ $(ibidir)/netpbm: $(tdir)/netpbm-$(netpbm-version).tar.gz \
cd $(ddir) \
&& unpackdir=netpbm-$(netpbm-version) \
&& rm -rf $$unpackdir \
- && if ! tar xf $<; then echo; echo "Tar error"; exit 1; fi \
+ && if ! tar xf $(word 1,$(filter $(tdir)/%,$|)); then \
+ echo; echo "Tar error"; exit 1; \
+ fi \
&& cd $$unpackdir \
&& printf "$$answers" | ./configure \
&& make \
@@ -934,11 +944,11 @@ $(ibidir)/netpbm: $(tdir)/netpbm-$(netpbm-version).tar.gz \
# libraries that are not yet solved. However, we tried to install it with
# the option --enable-openblas and it worked (same issue happened with
# `sextractor'.
-$(ibidir)/scamp: $(tdir)/scamp-$(scamp-version).tar.lz \
- $(ibidir)/cdsclient \
+$(ibidir)/scamp: $(ibidir)/fftw \
$(ibidir)/openblas \
- $(ibidir)/fftw
- $(call gbuild, $<, scamp-$(scamp-version), static, \
+ $(ibidir)/cdsclient \
+ | $(tdir)/scamp-$(scamp-version).tar.lz
+ $(call gbuild, scamp-$(scamp-version), static, \
--enable-threads --enable-openblas \
--with-fftw-libdir=$(idir) \
--with-fftw-incdir=$(idir)/include \
@@ -949,12 +959,14 @@ $(ibidir)/scamp: $(tdir)/scamp-$(scamp-version).tar.lz \
# Since `scons' doesn't use the traditional GNU installation with
# `configure' and `make' it is installed manually using `python'.
-$(ibidir)/scons: $(tdir)/scons-$(scons-version).tar.gz \
- $(ibidir)/python
+$(ibidir)/scons: | $(ibidir)/python \
+ $(tdir)/scons-$(scons-version).tar.gz
cd $(ddir) \
&& unpackdir=scons-$(scons-version) \
&& rm -rf $$unpackdir \
- && if ! tar xf $<; then echo; echo "Tar error"; exit 1; fi \
+ && if ! tar xf $(word 1,$(filter $(tdir)/%,$|)); then \
+ echo; echo "Tar error"; exit 1; \
+ fi \
&& cd $$unpackdir \
&& python setup.py install \
&& echo "SCons $(scons-version)" > $@
@@ -963,10 +975,10 @@ $(ibidir)/scons: $(tdir)/scons-$(scons-version).tar.gz \
# libraries. But we can override this issue since we have Openblas
# installed, it is just necessary to explicity tell sextractor to use it in
# the configuration step.
-$(ibidir)/sextractor: $(tdir)/sextractor-$(sextractor-version).tar.lz \
+$(ibidir)/sextractor: $(ibidir)/fftw \
$(ibidir)/openblas \
- $(ibidir)/fftw
- $(call gbuild, $<, sextractor-$(sextractor-version), static, \
+ | $(tdir)/sextractor-$(sextractor-version).tar.lz
+ $(call gbuild, sextractor-$(sextractor-version), static, \
--enable-threads --enable-openblas \
--with-openblas-libdir=$(ildir) \
--with-openblas-incdir=$(idir)/include) \
@@ -974,18 +986,18 @@ $(ibidir)/sextractor: $(tdir)/sextractor-$(sextractor-version).tar.lz \
&& cp $(dtexdir)/sextractor.tex $(ictdir)/ \
&& echo "SExtractor $(sextractor-version) \citep{sextractor}" > $@
-$(ibidir)/swarp: $(tdir)/swarp-$(swarp-version).tar.gz \
- $(ibidir)/fftw
- $(call gbuild, $<, swarp-$(swarp-version), static, \
+$(ibidir)/swarp: $(ibidir)/fftw \
+ | $(tdir)/swarp-$(swarp-version).tar.gz
+ $(call gbuild, swarp-$(swarp-version), static, \
--enable-threads) \
&& cp $(dtexdir)/swarp.tex $(ictdir)/ \
&& echo "SWarp $(swarp-version) \citep{swarp}" > $@
-$(ibidir)/swig: $(tdir)/swig-$(swig-version).tar.gz
+$(ibidir)/swig: | $(tdir)/swig-$(swig-version).tar.gz
# Option --without-pcre was a suggestion once the configure step
# was tried and it failed. It was not recommended but it works!
# pcr is a dependency of swig
- $(call gbuild, $<, swig-$(swig-version), static, --without-pcre) \
+ $(call gbuild, swig-$(swig-version), static, --without-pcre) \
&& echo "Swig $(swig-version)" > $@
@@ -1015,8 +1027,8 @@ $(ibidir)/swig: $(tdir)/swig-$(swig-version).tar.gz
tlmirror=http://mirrors.rit.edu/CTAN/systems/texlive/tlnet
# The core TeX Live system.
-$(itidir)/texlive-ready-tlmgr: $(tdir)/install-tl-unx.tar.gz \
- reproduce/software/config/installation/texlive.conf
+$(itidir)/texlive-ready-tlmgr: reproduce/software/config/installation/texlive.conf \
+ | $(tdir)/install-tl-unx.tar.gz
# Unpack, enter the directory, and install based on the given
# configuration (prerequisite of this rule).
diff --git a/reproduce/software/make/python.mk b/reproduce/software/make/python.mk
index 9b107f0..ce0c974 100644
--- a/reproduce/software/make/python.mk
+++ b/reproduce/software/make/python.mk
@@ -131,7 +131,7 @@ $(pytarballs): $(tdir)/%:
# a number or dash in their name), we need special consideration
# because the tokenization above will produce `python' as the
# first string.
- if [ $* = python-dateutil-$(python-dateutil-version).tar.gz ]; then
+ @if [ $* = python-dateutil-$(python-dateutil-version).tar.gz ]; then
n=dateutil
elif [ $* = h5py-$(h5py-version).tar.gz ]; then
n=h5py
@@ -264,8 +264,10 @@ $(pytarballs): $(tdir)/%:
# controlled `sha512sum' build (as part of GNU Coreutils). So we
# don't need to check its existance like `basic.mk'.
checksum=$$(sha512sum "$@.unchecked" | awk '{print $$1}')
- if [ x"$$checksum" = x"$$c" ]; then mv "$@.unchecked" "$@"
- else echo "ERROR: Non-matching checksum for '$*'."
+ if [ x"$$checksum" = x"$$c" ]; then
+ mv "$@.unchecked" "$@"
+ else
+ echo "ERROR: Non-matching checksum for '$*'."
echo "Checksum should be: $$c"
echo "Checksum is: $$checksum"
exit 1
@@ -280,14 +282,14 @@ $(pytarballs): $(tdir)/%:
#
# While this Makefile is for Python programs, in some cases, we need
# certain programs (like Python itself), or libraries for the modules.
-$(ibidir)/libffi: $(tdir)/libffi-$(libffi-version).tar.gz
+$(ibidir)/libffi: | $(tdir)/libffi-$(libffi-version).tar.gz
# On some Fedora systems, libffi installs in `lib64', not
# `lib'. This will cause problems when building setuptools
# later. To fix this problem, we'll first check if this has indeed
# happened (it exists under `lib64', but not under `lib'). If so,
# we'll put a copy of the installed libffi libraries in `lib'.
- $(call gbuild, $<, libffi-$(libffi-version), , \
+ $(call gbuild, libffi-$(libffi-version), , \
CFLAGS="-DNO_JAVA_RAW_API=1") \
&& if [ -f $(idir)/lib64/libffi.a ] \
&& ! [ -f $(idir)/lib/libffi.a ]; then \
@@ -296,21 +298,21 @@ $(ibidir)/libffi: $(tdir)/libffi-$(libffi-version).tar.gz
&& echo "Libffi $(libffi-version)" > $@
$(ibidir)/python: $(ibidir)/libffi \
- $(tdir)/python-$(python-version).tar.gz
+ | $(tdir)/python-$(python-version).tar.gz
# On Mac systems, the build complains about `clang' specific
# features, so we can't use our own GCC build here.
+ echo "HEREKJRE"; \
if [ x$(on_mac_os) = xyes ]; then \
export CC=clang; \
export CXX=clang++; \
- fi; \
- $(call gbuild, $(filter $(tdir)/%,$^), \
- Python-$(python-version),, \
+ fi; echo; echo "$@: HERE"; echo;\
+ $(call gbuild, Python-$(python-version),, \
--without-ensurepip \
--with-system-ffi \
--enable-shared) \
&& ln -sf $(ildir)/python$(python-major-version) $(ildir)/python \
&& ln -sf $(ibdir)/python$(python-major-version) $(ibdir)/python \
- && ln -sf $(iidir)/python$(python-major-version)m $(iidir)/python(python-major-version) \
+ && ln -sf $(iidir)/python$(python-major-version)m $(iidir)/python$(python-major-version) \
&& rm -rf $(ipydir) \
&& mkdir $(ipydir) \
&& echo "Python $(python-version)" > $@
@@ -323,7 +325,10 @@ $(ibidir)/python: $(ibidir)/libffi \
# ----------------------------------
#
# To build Python packages with direct access to a `setup.py' (if no direct
-# access to `setup.py' is needed, pip can be used).
+# access to `setup.py' is needed, pip can be used). Note that the
+# software's packaged source code is the first prerequisite that is in the
+# `tdir' directory.
+#
# Arguments of this function are the numbers
# 1) Unpack command
# 2) Unpacked directory name after unpacking the tarball
@@ -331,7 +336,7 @@ $(ibidir)/python: $(ibidir)/libffi \
# 4) Official software name (for paper).
# 5) Manual step after installation.
pybuild = cd $(ddir); rm -rf $(2); \
- if ! $(1) $(filter $(tdir)/%,$^); then \
+ if ! $(1) $(word 1,$(filter $(tdir)/%,$|)); then \
echo; echo "Tar error"; exit 1; \
fi; \
cd $(2); \
@@ -358,12 +363,12 @@ pybuild = cd $(ddir); rm -rf $(2); \
#
# All the necessary Python modules go here.
$(ipydir)/asn1crypto: $(ipydir)/setuptools \
- $(tdir)/asn1crypto-$(asn1crypto-version).tar.gz \
+ | $(tdir)/asn1crypto-$(asn1crypto-version).tar.gz
$(call pybuild, tar xf, asn1crypto-$(asn1crypto-version), , \
Asn1crypto $(asn1crypto-version))
$(ipydir)/asteval: $(ipydir)/numpy \
- $(tdir)/asteval-$(asteval-version).tar.gz
+ | $(tdir)/asteval-$(asteval-version).tar.gz
$(call pybuild, tar xf, asteval-$(asteval-version), , \
ASTEVAL $(asteval-version))
@@ -373,41 +378,41 @@ $(ipydir)/astroquery: $(ipydir)/numpy \
$(ipydir)/html5lib \
$(ipydir)/requests \
$(ipydir)/beautifulsoup4 \
- $(tdir)/astroquery-$(astroquery-version).tar.gz
+ | $(tdir)/astroquery-$(astroquery-version).tar.gz
$(call pybuild, tar xf, astroquery-$(astroquery-version), ,\
Astroquery $(astroquery-version))
$(ipydir)/astropy: $(ipydir)/h5py \
$(ipydir)/scipy \
$(ipydir)/numpy \
- $(tdir)/astropy-$(astropy-version).tar.gz
+ | $(tdir)/astropy-$(astropy-version).tar.gz
$(call pybuild, tar xf, astropy-$(astropy-version)) \
&& cp $(dtexdir)/astropy.tex $(ictdir)/ \
&& echo "Astropy $(astropy-version) \citep{astropy2013,astropy2018}" > $@
$(ipydir)/beautifulsoup4: $(ipydir)/soupsieve \
- $(tdir)/beautifulsoup4-$(beautifulsoup4-version).tar.gz
+ | $(tdir)/beautifulsoup4-$(beautifulsoup4-version).tar.gz
$(call pybuild, tar xf, beautifulsoup4-$(beautifulsoup4-version), ,\
BeautifulSoup $(beautifulsoup4-version))
$(ipydir)/certifi: $(ipydir)/setuptools \
- $(tdir)/certifi-$(certifi-version).tar.gz
+ | $(tdir)/certifi-$(certifi-version).tar.gz
$(call pybuild, tar xf, certifi-$(certifi-version), ,\
Certifi $(certifi-version))
$(ipydir)/cffi: $(ibidir)/libffi \
$(ipydir)/pycparser \
- $(tdir)/cffi-$(cffi-version).tar.gz
+ | $(tdir)/cffi-$(cffi-version).tar.gz
$(call pybuild, tar xf, cffi-$(cffi-version), ,\
cffi $(cffi-version))
$(ipydir)/chardet: $(ipydir)/setuptools \
- $(tdir)/chardet-$(chardet-version).tar.gz
+ | $(tdir)/chardet-$(chardet-version).tar.gz
$(call pybuild, tar xf, chardet-$(chardet-version), ,\
Chardet $(chardet-version))
$(ipydir)/corner: $(ipydir)/matplotlib \
- $(tdir)/corner-$(corner-version).tar.gz
+ | $(tdir)/corner-$(corner-version).tar.gz
$(call pybuild, tar xf, corner-$(corner-version), ,\
Corner $(corner-version)) \
&& cp $(dtexdir)/corner.tex $(ictdir)/ \
@@ -415,50 +420,50 @@ $(ipydir)/corner: $(ipydir)/matplotlib \
$(ipydir)/cryptography: $(ipydir)/cffi \
$(ipydir)/asn1crypto \
- $(tdir)/cryptography-$(cryptography-version).tar.gz
+ | $(tdir)/cryptography-$(cryptography-version).tar.gz
$(call pybuild, tar xf, cryptography-$(cryptography-version), ,\
Cryptography $(cryptography-version))
$(ipydir)/cycler: $(ipydir)/six \
- $(tdir)/cycler-$(cycler-version).tar.gz
+ | $(tdir)/cycler-$(cycler-version).tar.gz
$(call pybuild, tar xf, cycler-$(cycler-version), ,\
Cycler $(cycler-version))
$(ipydir)/cython: $(ipydir)/setuptools \
- $(tdir)/cython-$(cython-version).tar.gz
+ | $(tdir)/cython-$(cython-version).tar.gz
$(call pybuild, tar xf, Cython-$(cython-version)) \
&& cp $(dtexdir)/cython.tex $(ictdir)/ \
&& echo "Cython $(cython-version) \citep{cython2011}" > $@
$(ipydir)/esutil: $(ipydir)/numpy \
- $(tdir)/esutil-$(esutil-version).tar.gz
+ | $(tdir)/esutil-$(esutil-version).tar.gz
$(call pybuild, tar xf, esutil-$(esutil-version), ,\
esutil $(esutil-version))
$(ipydir)/eigency: $(ibidir)/eigen \
- $(tdir)/eigency-$(eigency-version).tar.gz
+ | $(tdir)/eigency-$(eigency-version).tar.gz
$(call pybuild, tar xf, eigency-$(eigency-version), ,\
eigency $(eigency-version))
$(ipydir)/emcee: $(ipydir)/numpy \
$(ipydir)/setuptools_scm \
- $(tdir)/emcee-$(emcee-version).tar.gz
+ | $(tdir)/emcee-$(emcee-version).tar.gz
$(call pybuild, tar xf, emcee-$(emcee-version), ,\
emcee $(emcee-version))
$(ipydir)/entrypoints: $(ipydir)/setuptools \
- $(tdir)/entrypoints-$(entrypoints-version).tar.gz
+ | $(tdir)/entrypoints-$(entrypoints-version).tar.gz
$(call pybuild, tar xf, entrypoints-$(entrypoints-version), ,\
EntryPoints $(entrypoints-version))
$(ipydir)/flake8: $(ipydir)/pyflakes \
$(ipydir)/pycodestyle \
- $(tdir)/flake8-$(flake8-version).tar.gz
+ | $(tdir)/flake8-$(flake8-version).tar.gz
$(call pybuild, tar xf, flake8-$(flake8-version), ,\
Flake8 $(flake8-version))
$(ipydir)/future: $(ipydir)/setuptools \
- $(tdir)/future-$(future-version).tar.gz
+ | $(tdir)/future-$(future-version).tar.gz
$(call pybuild, tar xf, future-$(future-version), ,\
Future $(future-version))
@@ -467,7 +472,7 @@ $(ipydir)/galsim: $(ipydir)/future \
$(ipydir)/eigency \
$(ipydir)/pybind11 \
$(ipydir)/lsstdesccoord \
- $(tdir)/galsim-$(galsim-version).tar.gz
+ | $(tdir)/galsim-$(galsim-version).tar.gz
$(call pybuild, tar xf, GalSim-$(galsim-version), ,) \
&& cp $(dtexdir)/galsim.tex $(ictdir)/ \
&& echo "Galsim $(galsim-version) \citep{galsim}" > $@
@@ -478,7 +483,7 @@ $(ipydir)/h5py: $(ipydir)/six \
$(ipydir)/cython \
$(ipydir)/mpi4py \
$(ipydir)/pypkgconfig \
- $(tdir)/h5py-$(h5py-version).tar.gz
+ | $(tdir)/h5py-$(h5py-version).tar.gz
export HDF5_MPI=ON; \
export HDF5_DIR=$(ildir); \
$(call pybuild, tar xf, h5py-$(h5py-version), ,\
@@ -496,29 +501,29 @@ $(ipydir)/healpy: $(ibidir)/healpix
$(ipydir)/html5lib: $(ipydir)/six \
$(ipydir)/webencodings \
- $(tdir)/html5lib-$(html5lib-version).tar.gz
+ | $(tdir)/html5lib-$(html5lib-version).tar.gz
$(call pybuild, tar xf, html5lib-$(html5lib-version), ,\
HTML5lib $(html5lib-version))
$(ipydir)/idna: $(ipydir)/setuptools \
- $(tdir)/idna-$(idna-version).tar.gz
+ | $(tdir)/idna-$(idna-version).tar.gz
$(call pybuild, tar xf, idna-$(idna-version), ,\
idna $(idna-version))
$(ipydir)/jeepney: $(ipydir)/setuptools \
- $(tdir)/jeepney-$(jeepney-version).tar.gz \
+ | $(tdir)/jeepney-$(jeepney-version).tar.gz \
$(call pybuild, tar xf, jeepney-$(jeepney-version), ,\
Jeepney $(jeepney-version))
$(ipydir)/keyring: $(ipydir)/entrypoints \
$(ipydir)/secretstorage \
$(ipydir)/setuptools_scm \
- $(tdir)/keyring-$(keyring-version).tar.gz
+ | $(tdir)/keyring-$(keyring-version).tar.gz
$(call pybuild, tar xf, keyring-$(keyring-version), ,\
Keyring $(keyring-version))
$(ipydir)/kiwisolver: $(ipydir)/setuptools \
- $(tdir)/kiwisolver-$(kiwisolver-version).tar.gz
+ | $(tdir)/kiwisolver-$(kiwisolver-version).tar.gz
$(call pybuild, tar xf, kiwisolver-$(kiwisolver-version), ,\
Kiwisolver $(kiwisolver-version))
@@ -529,12 +534,12 @@ $(ipydir)/lmfit: $(ipydir)/six \
$(ipydir)/asteval \
$(ipydir)/matplotlib \
$(ipydir)/uncertainties \
- $(tdir)/lmfit-$(lmfit-version).tar.gz
+ | $(tdir)/lmfit-$(lmfit-version).tar.gz
$(call pybuild, tar xf, lmfit-$(lmfit-version), ,\
LMFIT $(lmfit-version))
$(ipydir)/lsstdesccoord: $(ipydir)/setuptools \
- $(tdir)/lsstdesccoord-$(lsstdesccoord-version).tar.gz
+ | $(tdir)/lsstdesccoord-$(lsstdesccoord-version).tar.gz
$(call pybuild, tar xf, LSSTDESC.Coord-$(lsstdesccoord-version), ,\
LSSTDESC.Coord $(lsstdesccoord-version))
@@ -547,27 +552,27 @@ $(ipydir)/matplotlib: $(ipydir)/numpy \
$(ibidir)/ghostscript \
$(ibidir)/imagemagick \
$(ipydir)/python-dateutil \
- $(tdir)/matplotlib-$(matplotlib-version).tar.gz
+ | $(tdir)/matplotlib-$(matplotlib-version).tar.gz
$(call pybuild, tar xf, matplotlib-$(matplotlib-version)) \
&& cp $(dtexdir)/matplotlib.tex $(ictdir)/ \
&& echo "Matplotlib $(matplotlib-version) \citep{matplotlib2007}" > $@
$(ipydir)/mpi4py: $(ibidir)/openmpi \
$(ipydir)/setuptools \
- $(tdir)/mpi4py-$(mpi4py-version).tar.gz
+ | $(tdir)/mpi4py-$(mpi4py-version).tar.gz
$(call pybuild, tar xf, mpi4py-$(mpi4py-version)) \
&& cp $(dtexdir)/mpi4py.tex $(ictdir)/ \
&& echo "mpi4py $(mpi4py-version) \citep{mpi4py2011}" > $@
$(ipydir)/mpmath: $(ipydir)/setuptools \
- $(tdir)/mpmath-$(mpmath-version).tar.gz
+ | $(tdir)/mpmath-$(mpmath-version).tar.gz
$(call pybuild, tar xf, mpmath-$(mpmath-version), ,\
mpmath $(mpmath-version))
$(ipydir)/numpy: $(ibidir)/unzip \
$(ibidir)/openblas \
$(ipydir)/setuptools \
- $(tdir)/numpy-$(numpy-version).zip
+ | $(tdir)/numpy-$(numpy-version).zip
if [ x$(on_mac_os) = xyes ]; then \
export LDFLAGS="$(LDFLAGS) -undefined dynamic_lookup -bundle"; \
else \
@@ -580,52 +585,52 @@ $(ipydir)/numpy: $(ibidir)/unzip \
&& echo "Numpy $(numpy-version) \citep{numpy2011}" > $@
$(ibidir)/pip3: $(ipydir)/setuptools \
- $(tdir)/pip-$(pip-version).tar.gz
+ | $(tdir)/pip-$(pip-version).tar.gz
$(call pybuild, tar xf, pip-$(pip-version), ,\
PiP $(pip-version))
$(ipydir)/pycodestyle: $(ipydir)/setuptools \
- $(tdir)/pycodestyle-$(pycodestyle-version).tar.gz
+ | $(tdir)/pycodestyle-$(pycodestyle-version).tar.gz
$(call pybuild, tar xf, pycodestyle-$(pycodestyle-version), ,\
pycodestyle $(pycodestyle-version))
$(ipydir)/pybind11: $(ibidir)/eigen \
$(ibidir)/boost \
$(ipydir)/setuptools \
- $(tdir)/pybind11-$(pybind11-version).tar.gz
+ | $(tdir)/pybind11-$(pybind11-version).tar.gz
$(call pybuild, tar xf, pybind11-$(pybind11-version), ,\
pybind11 $(pybind11-version),
cp -r include/pybind11 $(iidir)/python$(python-major-version)m/)
$(ipydir)/pycparser: $(ipydir)/setuptools \
- $(tdir)/pycparser-$(pycparser-version).tar.gz
+ | $(tdir)/pycparser-$(pycparser-version).tar.gz
$(call pybuild, tar xf, pycparser-$(pycparser-version), ,\
pycparser $(pycparser-version))
$(ipydir)/pyflakes: $(ipydir)/setuptools \
- $(tdir)/pyflakes-$(pyflakes-version).tar.gz
+ | $(tdir)/pyflakes-$(pyflakes-version).tar.gz
$(call pybuild, tar xf, pyflakes-$(pyflakes-version), ,\
pyflakes $(pyflakes-version))
$(ipydir)/pyparsing: $(ipydir)/setuptools \
- $(tdir)/pyparsing-$(pyparsing-version).tar.gz
+ | $(tdir)/pyparsing-$(pyparsing-version).tar.gz
$(call pybuild, tar xf, pyparsing-$(pyparsing-version), ,\
PyParsing $(pyparsing-version))
$(ipydir)/pypkgconfig: $(ipydir)/setuptools \
- $(tdir)/pkgconfig-$(pypkgconfig-version).tar.gz
+ | $(tdir)/pkgconfig-$(pypkgconfig-version).tar.gz
$(call pybuild, tar xf, pkgconfig-$(pypkgconfig-version), ,
pkgconfig $(pypkgconfig-version))
$(ipydir)/python-dateutil: $(ipydir)/six \
$(ipydir)/setuptools_scm \
- $(tdir)/python-dateutil-$(python-dateutil-version).tar.gz
+ | $(tdir)/python-dateutil-$(python-dateutil-version).tar.gz
$(call pybuild, tar xf, python-dateutil-$(python-dateutil-version), ,\
python-dateutil $(python-dateutil-version))
$(ipydir)/pyyaml: $(ibidir)/yaml \
$(ipydir)/cython \
- $(tdir)/pyyaml-$(pyyaml-version).tar.gz
+ | $(tdir)/pyyaml-$(pyyaml-version).tar.gz
$(call pybuild, tar xf, PyYAML-$(pyyaml-version), ,\
PyYAML $(pyyaml-version))
@@ -634,12 +639,12 @@ $(ipydir)/requests: $(ipydir)/idna \
$(ipydir)/certifi \
$(ipydir)/chardet \
$(ipydir)/urllib3 \
- $(tdir)/requests-$(requests-version).tar.gz
+ | $(tdir)/requests-$(requests-version).tar.gz
$(call pybuild, tar xf, requests-$(requests-version), ,\
Requests $(requests-version))
$(ipydir)/scipy: $(ipydir)/numpy \
- $(tdir)/scipy-$(scipy-version).tar.gz
+ | $(tdir)/scipy-$(scipy-version).tar.gz
if [ x$(on_mac_os) = xyes ]; then \
export LDFLAGS="$(LDFLAGS) -undefined dynamic_lookup -bundle"; \
else \
@@ -652,56 +657,56 @@ $(ipydir)/scipy: $(ipydir)/numpy \
$(ipydir)/secretstorage: $(ipydir)/jeepney \
$(ipydir)/cryptography \
- $(tdir)/secretstorage-$(secretstorage-version).tar.gz
+ | $(tdir)/secretstorage-$(secretstorage-version).tar.gz
$(call pybuild, tar xf, SecretStorage-$(secretstorage-version), ,\
SecretStorage $(secretstorage-version))
$(ipydir)/setuptools: $(ibidir)/unzip \
$(ibidir)/python \
- $(tdir)/setuptools-$(setuptools-version).zip
+ | $(tdir)/setuptools-$(setuptools-version).zip
$(call pybuild, unzip, setuptools-$(setuptools-version), ,\
Setuptools $(setuptools-version))
$(ipydir)/setuptools_scm: $(ipydir)/setuptools \
- $(tdir)/setuptools_scm-$(setuptools_scm-version).tar.gz
+ | $(tdir)/setuptools_scm-$(setuptools_scm-version).tar.gz
$(call pybuild, tar xf, setuptools_scm-$(setuptools_scm-version), ,\
Setuptools-scm $(setuptools_scm-version))
$(ipydir)/sip_tpv: $(ipydir)/sympy \
$(ipydir)/astropy \
- $(tdir)/sip_tpv-$(sip_tpv-version).tar.gz
+ | $(tdir)/sip_tpv-$(sip_tpv-version).tar.gz
$(call pybuild, tar xf, sip_tpv-$(sip_tpv-version), ,) \
&& cp $(dtexdir)/sip_tpv.tex $(ictdir)/ \
&& echo "sip\_tpv $(sip_tpv-version) \citep{sip-tpv}" > $@
$(ipydir)/six: $(ipydir)/setuptools \
- $(tdir)/six-$(six-version).tar.gz
+ | $(tdir)/six-$(six-version).tar.gz
$(call pybuild, tar xf, six-$(six-version), ,\
Six $(six-version))
$(ipydir)/soupsieve: $(ipydir)/setuptools \
- $(tdir)/soupsieve-$(soupsieve-version).tar.gz
+ | $(tdir)/soupsieve-$(soupsieve-version).tar.gz
$(call pybuild, tar xf, soupsieve-$(soupsieve-version), ,\
SoupSieve $(soupsieve-version))
$(ipydir)/sympy: $(ipydir)/mpmath \
- $(tdir)/sympy-$(sympy-version).tar.gz
+ | $(tdir)/sympy-$(sympy-version).tar.gz
$(call pybuild, tar xf, sympy-$(sympy-version), ,) \
&& cp $(dtexdir)/sympy.tex $(ictdir)/ \
&& echo "SymPy $(sympy-version) \citep{sympy}" > $@
$(ipydir)/uncertainties: $(ipydir)/numpy \
- $(tdir)/uncertainties-$(uncertainties-version).tar.gz
+ | $(tdir)/uncertainties-$(uncertainties-version).tar.gz
$(call pybuild, tar xf, uncertainties-$(uncertainties-version), ,\
uncertainties $(uncertainties-version))
$(ipydir)/urllib3: $(ipydir)/setuptools \
- $(tdir)/urllib3-$(urllib3-version).tar.gz
+ | $(tdir)/urllib3-$(urllib3-version).tar.gz
$(call pybuild, tar xf, urllib3-$(urllib3-version), ,\
Urllib3 $(urllib3-version))
$(ipydir)/webencodings: $(ipydir)/setuptools \
- $(tdir)/webencodings-$(webencodings-version).tar.gz
+ | $(tdir)/webencodings-$(webencodings-version).tar.gz
$(call pybuild, tar xf, webencodings-$(webencodings-version), ,\
Webencodings $(webencodings-version))