From: Peter Tyser Date: Wed, 12 Nov 2008 18:33:20 +0000 (-0600) Subject: Use bash for default GNU Make shell application X-Git-Tag: v2009.01-rc1~35 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cf7a7b99794bac936899819b95539be1dbd71708;p=kernel%2Fu-boot.git Use bash for default GNU Make shell application Some Make script commands rely on bash-specific features like brace expansion, so default to bash for the SHELL variable with a fallback to the standard sh shell Signed-off-by: Peter Tyser --- diff --git a/Makefile b/Makefile index 11fc3b7..913fd16 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=