diff options
author | Peter Tyser <ptyser@xes-inc.com> | 2008-11-12 12:33:20 -0600 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2008-12-08 23:11:15 +0100 |
commit | cf7a7b99794bac936899819b95539be1dbd71708 (patch) | |
tree | 132ea675ba3c490b5014dd6bef7389010f77fc88 /Makefile | |
parent | 4b530018764934ad5689196e9aa5714a6f4d1a6c (diff) | |
download | u-boot-imx-cf7a7b99794bac936899819b95539be1dbd71708.zip u-boot-imx-cf7a7b99794bac936899819b95539be1dbd71708.tar.gz u-boot-imx-cf7a7b99794bac936899819b95539be1dbd71708.tar.bz2 |
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 <ptyser@xes-inc.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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= |