aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammad Akhlaghi <mohammad@akhlaghi.org>2019-01-20 22:48:22 +0000
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2019-01-20 22:48:22 +0000
commit54a5ce11a2b225e1bf92c4b25ab420726447344a (patch)
tree48e5b7b9c2bff2e8d1c87e293249b22cd2e0d1be
parent78a35fb8e584a970446f9edc1e5cd61398d40958 (diff)
Cleaner, more managable, build of Bash
The build of bash has been made a little cleaner to help in readability and management of the code.
-rwxr-xr-xreproduce/src/make/dependencies-basic.mk14
-rw-r--r--reproduce/src/make/dependencies-build-rules.mk2
2 files changed, 10 insertions, 6 deletions
diff --git a/reproduce/src/make/dependencies-basic.mk b/reproduce/src/make/dependencies-basic.mk
index f862c6b..b0d762a 100755
--- a/reproduce/src/make/dependencies-basic.mk
+++ b/reproduce/src/make/dependencies-basic.mk
@@ -358,11 +358,15 @@ $(ibdir)/bash: $(tdir)/bash-$(bash-version).tar.gz \
# complaining that it can't find `libreadline'. Therefore, even
# though we build readline below, we won't link Bash with an
# external readline.
-ifeq ($(static_build),yes)
- $(call gbuild, $<, bash-$(bash-version), , --enable-static-link)
-else
- $(call gbuild, $<, bash-$(bash-version))
-endif
+ #
+ # Bash has many `--enable' features which are already enabled by
+ # default. As described in the manual, they are mainly useful when
+ # you disable them all with `--enable-minimal-config' and enable a
+ # subset using the `--enable' options.
+ if [ "x$(static_build)" = xyes ]; then stopt="--enable-static-link";\
+ else stopt=""; \
+ fi; \
+ $(call gbuild, $<, bash-$(bash-version),, --enable-rpath $$stopt )
# To be generic, some systems use the `sh' command to call the
# shell. By convention, `sh' is just a symbolic link to the
diff --git a/reproduce/src/make/dependencies-build-rules.mk b/reproduce/src/make/dependencies-build-rules.mk
index 299ed11..1c30a55 100644
--- a/reproduce/src/make/dependencies-build-rules.mk
+++ b/reproduce/src/make/dependencies-build-rules.mk
@@ -53,7 +53,7 @@
# NOTE: Unfortunately the configure script of `zlib' doesn't recognize
# `SHELL'. So we'll have to remove it from the call to the configure
# script.
-gbuild = if [ x$(static_build) = xyes ] && [ $(3)x = staticx ]; then \
+gbuild = if [ x$(static_build) = xyes ] && [ "x$(3)" = xstatic ]; then \
export LDFLAGS="$$LDFLAGS -static"; \
fi; \
check="$(6)"; \