aboutsummaryrefslogtreecommitdiff
path: root/reproduce
diff options
context:
space:
mode:
authorMohammad Akhlaghi <mohammad@akhlaghi.org>2018-11-20 10:28:47 +0000
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2018-11-20 10:28:47 +0000
commit016b8f3b567e9af1125361520fe609f009c814c9 (patch)
tree186cc2982de45747f9baad811bc8a6cd3c40fc7e /reproduce
parenta832f17a68819e22296258fef1c6156a97f14490 (diff)
GNU Coreutils now built in basic dependencies
GNU Coreutils are basic programs that can help in the configuration of higher-level programs. Because of that, it was a dependency of almost all software built in `dependencies.mk'. To make things more clear, easier to read and faster (when building in parallel), the building of Coreutils is now moved to the `dependencies-basic.mk' rules. There, it is built along-side Bash. Since `dependenceis-basic.mk' is run and completed before `dependencies.mk', with this, we can be sure that Coreutils is present by the time we want to build the higher-level programs. Also, Zlib is now added as a dependency of Git also (it is necessary for its build).
Diffstat (limited to 'reproduce')
-rw-r--r--reproduce/src/make/dependencies-basic.mk48
-rw-r--r--reproduce/src/make/dependencies.mk46
2 files changed, 46 insertions, 48 deletions
diff --git a/reproduce/src/make/dependencies-basic.mk b/reproduce/src/make/dependencies-basic.mk
index c9bb4e1..2cc4327 100644
--- a/reproduce/src/make/dependencies-basic.mk
+++ b/reproduce/src/make/dependencies-basic.mk
@@ -56,7 +56,7 @@ LDFLAGS := -L$(ildir) $(LDFLAGS)
CPPFLAGS := -I$(idir)/include $(CPPFLAGS)
LD_LIBRARY_PATH := $(ildir):$(LD_LIBRARY_PATH)
-top-level-programs = bash
+top-level-programs = bash which ls
all: $(foreach p, $(top-level-programs), $(ibdir)/$(p))
@@ -87,6 +87,7 @@ all: $(foreach p, $(top-level-programs), $(ibdir)/$(p))
# its easier to just keep a with the others.
tarballs = $(foreach t, bash-$(bash-version).tar.gz \
bzip2-$(bzip2-version).tar.gz \
+ coreutils-$(coreutils-version).tar.xz \
gzip-$(gzip-version).tar.gz \
lzip-$(lzip-version).tar.gz \
make-$(make-version).tar.lz \
@@ -103,14 +104,15 @@ $(tarballs): $(tdir)/%:
| awk '{print $$1}' ); \
\
mergenames=1; \
- if [ $$n = bash ]; then w=http://ftp.gnu.org/gnu/bash; \
- elif [ $$n = bzip ]; then w=http://akhlaghi.org/src; \
- elif [ $$n = gzip ]; then w=http://akhlaghi.org/src; \
- 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; \
- elif [ $$n = which ]; then w=http://ftp.gnu.org/gnu/which; \
- elif [ $$n = xz ]; then w=http://tukaani.org/xz; \
+ if [ $$n = bash ]; then w=http://ftp.gnu.org/gnu/bash; \
+ elif [ $$n = bzip ]; then w=http://akhlaghi.org/src; \
+ elif [ $$n = coreutils ]; then w=http://ftp.gnu.org/gnu/coreutils;\
+ elif [ $$n = gzip ]; then w=http://akhlaghi.org/src; \
+ 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; \
+ elif [ $$n = which ]; then w=http://ftp.gnu.org/gnu/which; \
+ elif [ $$n = xz ]; then w=http://tukaani.org/xz; \
else \
echo; echo; echo; \
echo "'$$n' not a basic dependency name (for downloading)." \
@@ -187,15 +189,6 @@ $(ibdir)/tar: $(tdir)/tar-$(tar-version).tar.gz \
-# GNU Which:
-$(ibdir)/which: $(tdir)/which-$(which-version).tar.gz \
- $(ibdir)/tar
- $(call gbuild, $<, which-$(which-version), static)
-
-
-
-
-
# GNU Make: Unfortunately it 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
@@ -209,12 +202,29 @@ $(ibdir)/make: $(tdir)/make-$(make-version).tar.lz \
+# GNU Which:
+$(ibdir)/which: $(tdir)/which-$(which-version).tar.gz \
+ $(ibdir)/make
+ $(call gbuild, $<, which-$(which-version), static)
+
+
+
+
+
# GNU Bash
$(ibdir)/bash: $(tdir)/bash-$(bash-version).tar.gz \
- $(ibdir)/which \
$(ibdir)/make
ifeq ($(static_build),yes)
$(call gbuild, $<, bash-$(bash-version), , --enable-static-link)
else
$(call gbuild,$(subst $(tdir)/,,$<), bash-$(bash-version))
endif
+
+
+
+
+
+# GNU Coreutils
+$(ibdir)/ls: $(tdir)/coreutils-$(coreutils-version).tar.xz \
+ $(ibdir)/make
+ $(call gbuild, $<, coreutils-$(coreutils-version), static)
diff --git a/reproduce/src/make/dependencies.mk b/reproduce/src/make/dependencies.mk
index 7d25c3d..e1b601f 100644
--- a/reproduce/src/make/dependencies.mk
+++ b/reproduce/src/make/dependencies.mk
@@ -42,9 +42,8 @@ ibdir = $(BDIR)/dependencies/installed/bin
ildir = $(BDIR)/dependencies/installed/lib
ilidir = $(BDIR)/dependencies/installed/lib/built
-# Define the top-level programs to build (installed in `.local/bin', so for
-# Coreutils, only one of its executables is enough).
-top-level-programs = ls gawk gs grep sed git astnoisechisel texlive-ready
+# Define the top-level programs to build (installed in `.local/bin').
+top-level-programs = gawk gs grep sed git astnoisechisel texlive-ready
all: $(foreach p, $(top-level-programs), $(ibdir)/$(p))
# Other basic environment settings.
@@ -72,7 +71,6 @@ LD_LIBRARY_PATH := $(ildir):$(LD_LIBRARY_PATH)
# downloaded file has our desired format.
tarballs = $(foreach t, cfitsio-$(cfitsio-version).tar.gz \
cmake-$(cmake-version).tar.gz \
- coreutils-$(coreutils-version).tar.xz \
curl-$(curl-version).tar.gz \
gawk-$(gawk-version).tar.lz \
ghostscript-$(ghostscript-version).tar.gz \
@@ -109,7 +107,6 @@ $(tarballs): $(tdir)/%:
: "%d000\n") ), $$1)}')
w=https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio$$v.tar.gz
elif [ $$n = cmake ]; then w=https://cmake.org/files/v3.12
- elif [ $$n = coreutils ]; then w=http://ftp.gnu.org/gnu/coreutils
elif [ $$n = curl ]; then w=https://curl.haxx.se/download
elif [ $$n = gawk ]; then w=http://ftp.gnu.org/gnu/gawk
elif [ $$n = ghostscript ]; then w=https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs925
@@ -167,8 +164,7 @@ $(tarballs): $(tdir)/%:
# and create/write into it when the library is successfully built.
$(ilidir): | $(ildir); mkdir -p $@
$(ilidir)/cfitsio: $(tdir)/cfitsio-$(cfitsio-version).tar.gz \
- $(ibdir)/curl \
- $(ibdir)/ls | $(ilidir)
+ $(ibdir)/curl | $(ilidir)
$(call gbuild, $<,cfitsio, static, --enable-sse2 --enable-reentrant) \
&& echo "CFITSIO is built" > $@
@@ -181,16 +177,14 @@ $(ilidir)/libgit2: $(tdir)/libgit2-$(libgit2-version).tar.gz \
-DTHREADSAFE=ON) \
&& echo "Libgit2 is built" > $@
-$(ilidir)/gsl: $(tdir)/gsl-$(gsl-version).tar.gz \
- $(ibdir)/ls | $(ilidir)
+$(ilidir)/gsl: $(tdir)/gsl-$(gsl-version).tar.gz | $(ilidir)
$(call gbuild, $<, gsl-$(gsl-version), static) \
&& echo "GNU Scientific Library is built" > $@
$(ilidir)/libjpeg: $(tdir)/jpegsrc.$(libjpeg-version).tar.gz | $(ilidir)
$(call gbuild, $<, jpeg-9b, static) && echo "Libjpeg is built" > $@
-$(ilidir)/libtiff: $(tdir)/tiff-$(libtiff-version).tar.gz \
- $(ibdir)/ls | $(ilidir)
+$(ilidir)/libtiff: $(tdir)/tiff-$(libtiff-version).tar.gz | $(ilidir)
$(call gbuild, $<, tiff-$(libtiff-version), static) \
&& echo "Libtiff is built" > $@
@@ -222,43 +216,33 @@ endif
# --------
#
# CMake can be built with its custom `./bootstrap' script.
-$(ibdir)/cmake: $(tdir)/cmake-$(cmake-version).tar.gz \
- $(ibdir)/ls
+$(ibdir)/cmake: $(tdir)/cmake-$(cmake-version).tar.gz
cd $(ddir) && rm -rf cmake-$(cmake-version) && \
tar xf $< && cd cmake-$(cmake-version) && \
./bootstrap --prefix=$(idir) && make && make install && \
cd ..&& rm -rf cmake-$(cmake-version)
$(ibdir)/curl: $(tdir)/curl-$(curl-version).tar.gz \
- $(ilidir)/zlib \
- $(ibdir)/ls
+ $(ilidir)/zlib
$(call gbuild, $<, curl-$(curl-version), static, --without-brotli)
-$(ibdir)/ls: $(tdir)/coreutils-$(coreutils-version).tar.xz
- $(call gbuild, $<, coreutils-$(coreutils-version), static)
-
-$(ibdir)/gawk: $(tdir)/gawk-$(gawk-version).tar.lz \
- $(ibdir)/ls
+$(ibdir)/gawk: $(tdir)/gawk-$(gawk-version).tar.lz
$(call gbuild, $<, gawk-$(gawk-version), static)
-$(ibdir)/sed: $(tdir)/sed-$(sed-version).tar.xz \
- $(ibdir)/ls
+$(ibdir)/sed: $(tdir)/sed-$(sed-version).tar.xz
$(call gbuild, $<, sed-$(sed-version), static)
-$(ibdir)/grep: $(tdir)/grep-$(grep-version).tar.xz \
- $(ibdir)/ls
+$(ibdir)/grep: $(tdir)/grep-$(grep-version).tar.xz
$(call gbuild, $<, grep-$(grep-version), static)
-$(ibdir)/libtool: $(tdir)/libtool-$(libtool-version).tar.xz \
- $(ibdir)/ls
+$(ibdir)/libtool: $(tdir)/libtool-$(libtool-version).tar.xz
$(call gbuild, $<, libtool-$(libtool-version), static)
-$(ibdir)/gs: $(tdir)/ghostscript-$(ghostscript-version).tar.gz \
- $(ibdir)/ls
+$(ibdir)/gs: $(tdir)/ghostscript-$(ghostscript-version).tar.gz
$(call gbuild, $<, ghostscript-$(ghostscript-version))
$(ibdir)/git: $(tdir)/git-$(git-version).tar.xz \
- $(ibdir)/ls
+ $(ilidir)/zlib
$(call gbuild, $<, git-$(git-version), static)
$(ibdir)/astnoisechisel: $(tdir)/gnuastro-$(gnuastro-version).tar.lz \
@@ -278,6 +262,10 @@ else
make check -j8)
endif
+
+
+
+
# Since we want to avoid complicating the PATH, we are putting a symbolic
# link of all the TeX Live executables in $(ibdir). Therefore, since the
# symbolic link is hard to track for Make (as a target), we'll make a