Skip to contentSkip to conversation

build: fix umask test

PATCH New Kurt Van Dijck 2 participants 2 messages Jun 19, 2016 – Jun 20, 2016 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 build: fix umask test

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.

---
 Makefile | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
Makefile +5 -5
index 3f5c3d3..78b44c5 100644
@@ -24,6 +24,11 @@
 # 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)
 
Signature · 1 line
1.8.5.rc3
#1 lore raw

PATCH v2 1/1 build: fix umask test

Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Kurt" == Kurt Van Dijck <[email protected]> writes:

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.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard