diff --git a/Makefile b/Makefile index 11fc3b76a467204ab1800d46f240425cf1addd01..913fd16e1167995f0915d48cd5ebe591d45f9d75 100644 --- a/Makefile +++ b/Makefile @@ -45,7 +45,12 @@ HOSTARCH := $(shell uname -m | \ HOSTOS := $(shell uname -s | tr '[:upper:]' '[:lower:]' | \ sed -e 's/\(cygwin\).*/cygwin/') -export HOSTARCH HOSTOS +# 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 # Deal with colliding definitions from tcsh etc. VENDOR=