aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorSimon J. Gerraty <sjg@FreeBSD.org>2023-04-20 16:40:39 +0000
committerSimon J. Gerraty <sjg@FreeBSD.org>2023-04-20 16:40:39 +0000
commit0df4d8ad7a1b675ead8dec70f291bfd4f3fd81fa (patch)
treefbc44d189069e7fd532cd39c073218f3a30f5694 /Makefile
parentdd9059b3e9a1711d54c1d511a2cbb23e6e23f556 (diff)
downloadsrc-0df4d8ad7a1b675ead8dec70f291bfd4f3fd81fa.tar.gz
src-0df4d8ad7a1b675ead8dec70f291bfd4f3fd81fa.zip
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
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 10 insertions, 0 deletions
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 <jobs.mk>
+.endif
+
.if defined(UNIVERSE_TARGET) || defined(MAKE_JUST_WORLDS) || defined(WITHOUT_KERNELS)
__DO_KERNELS=no
.endif