From c285fca2561e7c10017b08569507b16813d6ba03 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Tue, 21 Nov 2023 00:55:19 +0200 Subject: [PATCH] Makefile: allow specifying the needed concurrency for make via MAKE_CONCURRENCY env var --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8d96b628d9..97c4485564 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ PKG_PREFIX := github.com/VictoriaMetrics/VictoriaMetrics -MAKE_PARALLEL := $(MAKE) -j `cat /proc/cpuinfo | grep -c processor` +MAKE_CONCURRENCY ?= $(shell cat /proc/cpuinfo | grep -c processor) +MAKE_PARALLEL := $(MAKE) -j $(MAKE_CONCURRENCY) DATEINFO_TAG ?= $(shell date -u +'%Y%m%d-%H%M%S') BUILDINFO_TAG ?= $(shell echo $$(git describe --long --all | tr '/' '-')$$( \ git diff-index --quiet HEAD -- || echo '-dirty-'$$(git diff-index -u HEAD | openssl sha1 | cut -d' ' -f2 | cut -c 1-8)))