]> git.earman.xyz Git - sensor-watch.git/commitdiff
Fix Linux Makefile parallelism
authorJames Haggerty <james@gruemail.com>
Mon, 24 Oct 2022 22:24:54 +0000 (09:24 +1100)
committerJames Haggerty <james@gruemail.com>
Mon, 24 Oct 2022 22:24:54 +0000 (09:24 +1100)
Makefile != bourne shell, I think.

At least on my systems, this was causing a raw -j, which meant
that make had no restriction on its parallelism
(i.e. tried to build everything at once).

make.mk

diff --git a/make.mk b/make.mk
index 254016428b8bf3f7f0ebe197c0b576783c7e9821..2fe89d75e0774101b6c49f6169526c400f51b8b3 100644 (file)
--- a/make.mk
+++ b/make.mk
@@ -31,7 +31,7 @@ else
 endif
 
 ifeq ($(DETECTED_OS), LINUX)
-  MAKEFLAGS += -j `nproc`
+  MAKEFLAGS += -j $(shell nproc)
 endif
 ifeq ($(DETECTED_OS), OSX)
   NPROCS = $(shell sysctl hw.ncpu  | grep -o '[0-9]\+')