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
This commit is contained in:
Arkadiusz Hiler 2023-08-01 12:05:15 +03:00
parent 45039fc24e
commit 46304cde3d

View file

@ -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