aboutsummaryrefslogtreecommitdiff
path: root/reproduce/src/make/dependencies-build-rules.mk
diff options
context:
space:
mode:
authorMohammad Akhlaghi <mohammad@akhlaghi.org>2018-12-04 13:26:32 +0000
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2018-12-04 13:26:32 +0000
commit627cee6910ffd181552d6dca01501154b4d78372 (patch)
tree8354415e01dd97f750f4aa7bc63faa11d24621c7 /reproduce/src/make/dependencies-build-rules.mk
parent49654daa6b1ecf2126154466a9fccef4fc7ec2f5 (diff)
Configure script for GNU Build system now an input argument
Until now, we were checking the existance of the `configure' file and if it wasn't present, we would check for `config' (for OpenSSL which also has a lower-level "Configure" script that is called by the `config' script). But after two tests on Mac machines by Raul Infante Sainz and Cristina Martínez Lombilla, we found out that Mac Os's file names aren't case sensitive and thus the build wouldn't use `config', but `Configure'. Now, the exact configuration script can be specified as the 7th argument to the `gbuild' script. If it isn't given, the standard `configure' name will be used, but when it is, the given name will be used.
Diffstat (limited to 'reproduce/src/make/dependencies-build-rules.mk')
-rw-r--r--reproduce/src/make/dependencies-build-rules.mk13
1 files changed, 7 insertions, 6 deletions
diff --git a/reproduce/src/make/dependencies-build-rules.mk b/reproduce/src/make/dependencies-build-rules.mk
index 4de9a4e..25a95af 100644
--- a/reproduce/src/make/dependencies-build-rules.mk
+++ b/reproduce/src/make/dependencies-build-rules.mk
@@ -48,6 +48,7 @@
# 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).
#
# NOTE: Unfortunately the configure script of `zlib' doesn't recognize
# `SHELL'. So we'll have to remove it from the call to the configure
@@ -61,28 +62,28 @@ gbuild = if [ x$(static_build) = xyes ] && [ $(3)x = staticx ]; then \
if ! tar xf $(1); then echo; echo "Tar error"; exit 1; fi; \
cd $(2); \
\
- if [ -f configure ]; then confscript=configure; \
- elif [ -f config ]; then confscript=config; \
+ if [ x"$(strip $(7))" = x ]; then confscript=./configure; \
+ else confscript="$(strip $(7))"; \
fi; \
\
if [ -f $(ibdir)/bash ]; then \
sed $$confscript -e's|\#\! /bin/sh|\#\! $(ibdir)/bash|' \
-e's|\#\!/bin/sh|\#\! $(ibdir)/bash|' \
- > tmp-$$confscript; \
- mv tmp-$$confscript $$confscript; \
+ > $$confscript-tmp; \
+ mv $$confscript-tmp $$confscript; \
chmod +x $$confscript; \
shellop="SHELL=$(ibdir)/bash"; \
elif [ -f /bin/bash ]; then shellop="SHELL=/bin/bash"; \
else shellop="SHELL=/bin/sh"; \
fi; \
\
- if [ x"$(2)" = x"zlib-$(zlib-version)" ]; then \
+ if [ x"$(strip $(2))" = x"zlib-$(zlib-version)" ]; then \
configop="--prefix=$(idir)"; \
else configop="$$shellop --prefix=$(idir)"; \
fi; \
\
echo; echo "Using '$$confscript' to configure..."; echo; \
- ./$$confscript $(4) $$configop && \
+ $$confscript $(4) $$configop && \
make "$$shellop" $(5) && \
$$check && \
make "$$shellop" install && \