aboutsummaryrefslogtreecommitdiffstats
path: root/include/toplevel.mk
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-10-31 00:23:47 +0000
committerFelix Fietkau <nbd@openwrt.org>2012-10-31 00:23:47 +0000
commit5ba7421eed91a748beed2bc84c7dc31d18f4e281 (patch)
tree54a3d719223e4a20e101d272340560f09b1f8e05 /include/toplevel.mk
parentc1af5b9e30466f8ee369ad4e1c4dedc3f00a8f24 (diff)
downloadmaster-187ad058-5ba7421eed91a748beed2bc84c7dc31d18f4e281.tar.gz
master-187ad058-5ba7421eed91a748beed2bc84c7dc31d18f4e281.tar.bz2
master-187ad058-5ba7421eed91a748beed2bc84c7dc31d18f4e281.zip
build: increase file descriptor count limit for the build, some systems (e.g. Mac OS X default to 256, which is too little for some parallel builds)
Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34023 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'include/toplevel.mk')
-rw-r--r--include/toplevel.mk4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/toplevel.mk b/include/toplevel.mk
index f44dc81557..19ed8cb1d9 100644
--- a/include/toplevel.mk
+++ b/include/toplevel.mk
@@ -51,6 +51,8 @@ export SCAN_COOKIE
SUBMAKE:=umask 022; $(SUBMAKE)
+ULIMIT_FIX=_limit=`ulimit -n`; [ "$$_limit" = "unlimited" -o "$$_limit" -ge 1024 ] || ulimit -n 1024;
+
prepare-mk: FORCE ;
prepare-tmpinfo: FORCE
@@ -149,7 +151,7 @@ prereq:: prepare-tmpinfo .config
echo "WARNING: your configuration is out of sync. Please run make menuconfig, oldconfig or defconfig!"; \
fi \
)
- @+$(SUBMAKE) -r $@
+ @+$(ULIMIT_FIX) $(SUBMAKE) -r $@
help:
cat README