From dac8021297a5541eac418fb295a9013109d39a61 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 14 Jan 2025 14:02:16 +0100 Subject: [PATCH] build: use lazy evaluation for NPROC to speed up metadata dump Reduces package metadata dump time by ~10% Signed-off-by: Felix Fietkau --- 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) -- 2.30.2