1
0
Fork 0

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>
utp
Peter Tyser 2008-11-12 12:33:20 -06:00 committed by Wolfgang Denk
parent 4b53001876
commit cf7a7b9979
1 changed files with 6 additions and 1 deletions

View File

@ -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=