From 46304cde3d4a84d139c686c803a0f30a7454e5a5 Mon Sep 17 00:00:00 2001 From: Arkadiusz Hiler Date: Tue, 1 Aug 2023 12:05:15 +0300 Subject: [PATCH] make: Use GNU Make's job server when building via ninja. `+` is necessary to mark it as recurisve[0] so that fds are passed as expected. Passing explicit `-j` is dropped because it takes precedence over MAKEFLAGS and disables the job server integration. [0]: https://www.gnu.org/software/make/manual/html_node/POSIX-Jobserver.html --- make/rules-meson.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/make/rules-meson.mk b/make/rules-meson.mk index 2bf2db8c..985f2085 100644 --- a/make/rules-meson.mk +++ b/make/rules-meson.mk @@ -60,8 +60,8 @@ $$(OBJ)/.$(1)-configure$(3): $$($(2)_SRC)/meson.build $$(OBJ)/.$(1)-build$(3): @echo ":: building $(3)bit $(1)..." >&2 - env $$($(2)_ENV$(3)) \ - ninja $$(filter -j%,$$(MAKEFLAGS)) -C "$$($(2)_OBJ$(3))" install $(-v?) + +env $$($(2)_ENV$(3)) \ + ninja -C "$$($(2)_OBJ$(3))" install touch $$@ endef