Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] build: fix umask test
@ 2016-05-30  7:06 Kurt Van Dijck
  2016-05-30  7:55 ` Peter Korsgaard
  0 siblings, 1 reply; 12+ messages in thread
From: Kurt Van Dijck @ 2016-05-30  7:06 UTC (permalink / raw)
  To: buildroot

Some shells' builtin umask does not print 2 leading 0's for the umask.
Not doing so would break the comparison.
This patch makes sure that the umask has (at least) 4 digits.

Signed-off-by: Kurt Van Dijck <dev.kurt@vandijck-laurijssen.be>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 63502d0..9a36769 100644
--- a/Makefile
+++ b/Makefile
@@ -26,7 +26,7 @@
 
 # Trick for always running with a fixed umask
 UMASK = 0022
-ifneq ($(shell umask),$(UMASK))
+ifneq ($(shell printf "%04o\n" `umask`),$(UMASK))
 .PHONY: _all $(MAKECMDGOALS)
 
 $(MAKECMDGOALS): _all

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2016-05-31  9:35 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-30  7:06 [Buildroot] [PATCH] build: fix umask test Kurt Van Dijck
2016-05-30  7:55 ` Peter Korsgaard
2016-05-30  8:05   ` Peter Korsgaard
2016-05-30  9:17     ` Thomas Petazzoni
2016-05-30  9:53       ` Kurt Van Dijck
2016-05-30  9:59         ` Peter Korsgaard
2016-05-30 21:09           ` Kurt Van Dijck
2016-05-30 21:31             ` Arnout Vandecappelle
2016-05-31  7:43               ` Kurt Van Dijck
2016-05-31  7:48                 ` Peter Korsgaard
2016-05-31  9:35                   ` Kurt Van Dijck
2016-05-30  9:56       ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox