From: Felix Fietkau Date: Tue, 14 Jan 2025 13:02:16 +0000 (+0100) Subject: build: use lazy evaluation for NPROC to speed up metadata dump X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=dac8021297a5541eac418fb295a9013109d39a61;p=openwrt%2Fopenwrt.git build: use lazy evaluation for NPROC to speed up metadata dump Reduces package metadata dump time by ~10% Signed-off-by: Felix Fietkau --- 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)