From 0df4d8ad7a1b675ead8dec70f291bfd4f3fd81fa Mon Sep 17 00:00:00 2001 From: "Simon J. Gerraty" Date: Thu, 20 Apr 2023 09:40:39 -0700 Subject: Add jobs.mk to allow for target-jobs jobs.mk automates -j$JOB_MAX and capturing build log based on target. Compute a default for JOB_MAX in local.sys.mk Reviewed by: stevek, imp Differential Revision: https://reviews.freebsd.org/D39683 --- Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 8232041e0a35..0b2438a0cfc0 100644 --- a/Makefile +++ b/Makefile @@ -119,6 +119,16 @@ # For more information, see the build(7) manual page. # +# Include jobs.mk early if we need it. +# It will turn: +# make buildworld-jobs +# into +# make -j${JOB_MAX} buildworld > ../buildworld.log 2>&1 +# +.if make(*-jobs) +.include +.endif + .if defined(UNIVERSE_TARGET) || defined(MAKE_JUST_WORLDS) || defined(WITHOUT_KERNELS) __DO_KERNELS=no .endif -- cgit v1.2.3