build: fix umask test
authorKurt Van Dijck <dev.kurt@vandijck-laurijssen.be>
Sun, 19 Jun 2016 04:12:06 +0000 (06:12 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Mon, 20 Jun 2016 20:48:42 +0000 (22:48 +0200)
Some shells' builtin umask does not print 2 leading 0's for the umask.
Switching to bash is done anyway.
This patch switches to bash before the umask test.

Signed-off-by: Kurt Van Dijck <dev.kurt@vandijck-laurijssen.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Makefile

index 3f5c3d3b2f13737ec65c9cc15c65bcf59f6e3fe2..78b44c5e4bcdcdc0fc3023ea0e675e37961688d0 100644 (file)
--- a/Makefile
+++ b/Makefile
 # You shouldn't need to mess with anything beyond this point...
 #--------------------------------------------------------------
 
+# we want bash as shell
+SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
+        else if [ -x /bin/bash ]; then echo /bin/bash; \
+        else echo sh; fi; fi)
+
 # Trick for always running with a fixed umask
 UMASK = 0022
 ifneq ($(shell umask),$(UMASK))
@@ -227,11 +232,6 @@ else
   Q = @
 endif
 
-# we want bash as shell
-SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
-        else if [ -x /bin/bash ]; then echo /bin/bash; \
-        else echo sh; fi; fi)
-
 # kconfig uses CONFIG_SHELL
 CONFIG_SHELL := $(SHELL)