[openwrt/openwrt] build: use lazy evaluation for NPROC to speed up metadata dump
LEDE Commits
lede-commits at lists.infradead.org
Tue Jan 14 05:05:18 PST 2025
nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/dac8021297a5541eac418fb295a9013109d39a61
commit dac8021297a5541eac418fb295a9013109d39a61
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Tue Jan 14 14:02:16 2025 +0100
build: use lazy evaluation for NPROC to speed up metadata dump
Reduces package metadata dump time by ~10%
Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
rules.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rules.mk b/rules.mk
index 16d6020e1a..dbc448e1a4 100644
--- a/rules.mk
+++ b/rules.mk
@@ -96,7 +96,7 @@ TARGET_SUFFIX=$(call qstrip,$(CONFIG_TARGET_SUFFIX))
BUILD_SUFFIX:=$(call qstrip,$(CONFIG_BUILD_SUFFIX))
SUBDIR:=$(patsubst $(TOPDIR)/%,%,${CURDIR})
BUILD_SUBDIR:=$(patsubst $(TOPDIR)/%,%,${CURDIR})
-NPROC:=$(shell sysctl -n hw.ncpu 2>/dev/null || nproc)
+NPROC=$(shell sysctl -n hw.ncpu 2>/dev/null || nproc)
export SHELL:=/usr/bin/env bash
IS_PACKAGE_BUILD := $(if $(filter package/%,$(BUILD_SUBDIR)),1)
More information about the lede-commits
mailing list