summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile7
-rw-r--r--config.mk7
2 files changed, 8 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 8d0e2b8..caca851 100644
--- a/Makefile
+++ b/Makefile
@@ -46,12 +46,7 @@ HOSTARCH := $(shell uname -m | \
HOSTOS := $(shell uname -s | tr '[:upper:]' '[:lower:]' | \
sed -e 's/\(cygwin\).*/cygwin/')
-# Set shell to bash if possible, otherwise fall back to sh
-SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
- else if [ -x /bin/bash ]; then echo /bin/bash; \
- else echo sh; fi; fi)
-
-export HOSTARCH HOSTOS SHELL
+export HOSTARCH HOSTOS
# Deal with colliding definitions from tcsh etc.
VENDOR=
diff --git a/config.mk b/config.mk
index 4e6a19b..1fd109f 100644
--- a/config.mk
+++ b/config.mk
@@ -23,6 +23,13 @@
#########################################################################
+# Set shell to bash if possible, otherwise fall back to sh
+SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
+ else if [ -x /bin/bash ]; then echo /bin/bash; \
+ else echo sh; fi; fi)
+
+export SHELL
+
ifeq ($(CURDIR),$(SRCTREE))
dir :=
else