From 5e3284ecfde6f340061cc6a01c613d49af7bbac0 Mon Sep 17 00:00:00 2001
From: Felix Fietkau <nbd@openwrt.org>
Date: Thu, 14 Oct 2010 15:53:47 +0000
Subject: [PATCH] set the umask in toplevel.mk instead of forcing the user to
 adjust it

SVN-Revision: 23445
---
 include/prereq-build.mk | 7 -------
 include/toplevel.mk     | 2 ++
 2 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/include/prereq-build.mk b/include/prereq-build.mk
index afb92ff021..84d3f2274c 100644
--- a/include/prereq-build.mk
+++ b/include/prereq-build.mk
@@ -18,13 +18,6 @@ $(eval $(call Require,non-root, \
 	Please do not compile as root. \
 ))
 
-define Require/umask-0022
-	[ "$$(shell umask)" -eq 22 ]
-endef
-$(eval $(call Require,umask-0022, \
-	Please compile with umask 0022. \
-))
-
 # Required for the toolchain
 define Require/working-make
 	$(MAKE) -v | awk '($$$$1 == "GNU") && ($$$$2 = "Make") && ($$$$3 >= "3.81") { print "ok" }' | grep ok > /dev/null
diff --git a/include/toplevel.mk b/include/toplevel.mk
index dee43cba98..cb50dfa3d7 100644
--- a/include/toplevel.mk
+++ b/include/toplevel.mk
@@ -41,6 +41,8 @@ endif
 SCAN_COOKIE?=$(shell echo $$$$)
 export SCAN_COOKIE
 
+SUBMAKE:=umask 022; $(SUBMAKE)
+
 prepare-mk: FORCE ;
 
 prepare-tmpinfo: FORCE
-- 
GitLab