rust: Use make's jobserver when building packages
authorJeffery To <redacted>
Sat, 23 Sep 2023 12:24:37 +0000 (20:24 +0800)
committerJeffery To <redacted>
Wed, 11 Oct 2023 07:50:24 +0000 (15:50 +0800)
commit0dfc1b508d5e5b361978ef9783cb63775176c305
tree87d123b9d63916b84de9d88e81502e38a6bf4a0b
parent9db7284d589dc8490f8c7dbe56af731fce953eda
rust: Use make's jobserver when building packages

This allows cargo to use make's jobserver when building packages, by
marking the cargo command as recursive (with the + prefix[1]) and
setting MAKEFLAGS.

This also:

* Give cargo/x.py the build directory instead of having to change the
  current directory (and opening subshells)

* Set PKG_BUILD_PARALLEL/HOST_BUILD_PARALLEL for Rust packages to enable
  the use of make's jobserver

[1]: https://www.gnu.org/software/make/manual/html_node/POSIX-Jobserver.html

Signed-off-by: Jeffery To <redacted>
admin/bottom/Makefile
lang/maturin/Makefile
lang/rust/Makefile
lang/rust/rust-host-build.mk
lang/rust/rust-package.mk
net/aardvark-dns/Makefile
net/netavark/Makefile
utils/arp-whisper/Makefile
utils/procs/Makefile
utils/ripgrep/Makefile
git clone https://git.99rst.org/PROJECT