From 00b4893b2829ddb0e9050ae7de6af7cb4d4d8304 Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Mon, 26 Nov 2018 14:33:18 +0000 Subject: sh executable now available in PATH While working on a research project using this pipeline, I noticed that we don't have any `sh' executable within our PATH. However, some programs (including Gnuastro's configure script, when it is checking for shells to use with Libtool) check and use it. So after building Bash, we also build an `sh' symbolic link to point to the built Bash executable. --- reproduce/src/make/dependencies-basic.mk | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'reproduce/src/make') diff --git a/reproduce/src/make/dependencies-basic.mk b/reproduce/src/make/dependencies-basic.mk index 2102338..17bd73f 100644 --- a/reproduce/src/make/dependencies-basic.mk +++ b/reproduce/src/make/dependencies-basic.mk @@ -214,12 +214,27 @@ $(ibdir)/which: $(tdir)/which-$(which-version).tar.gz \ # GNU Bash $(ibdir)/bash: $(tdir)/bash-$(bash-version).tar.gz \ $(ibdir)/make + + # Delete any possibly existing output + if [ -f $@ ]; then rm $@; fi; + + # Build Bash. ifeq ($(static_build),yes) $(call gbuild, $<, bash-$(bash-version), , --enable-static-link) else $(call gbuild, $<, bash-$(bash-version)) endif + # To be generic, some systems use the `sh' command to call the + # shell. By convention, `sh' is just a symbolic link to the + # preferred shell executable. So we'll define `$(ibdir)/sh' as a + # symbolic link to the Bash that we just built and installed. + # + # Just to be sure that the installation step above went well, + # before making the link, we'll see if the file actually exists + # there. + if [ -f $@ ]; then ln -s $@ $(ibdir)/sh; fi + -- cgit v1.2.1