pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk Add support for MAKE_JOBS.pkgpath.
details: https://anonhg.NetBSD.org/pkgsrc/rev/a7c4b04f6ed2
branches: trunk
changeset: 321130:a7c4b04f6ed2
user: dholland <dholland%pkgsrc.org@localhost>
date: Sun Mar 17 03:59:11 2019 +0000
description:
Add support for MAKE_JOBS.pkgpath.
This allows setting MAKE_JOBS high and then setting e.g.
MAKE_JOBS.emulators/qemu=2 (or some such low value) to keep it from
thrashing during build.
Discussed/approved on tech-pkg two months ago and then I forgot to
actually commit it.
diffstat:
mk/build/build.mk | 4 +++-
mk/defaults/mk.conf | 17 +++++++++++++----
2 files changed, 16 insertions(+), 5 deletions(-)
diffs (60 lines):
diff -r 81ffc35657ef -r a7c4b04f6ed2 mk/build/build.mk
--- a/mk/build/build.mk Sun Mar 17 01:17:23 2019 +0000
+++ b/mk/build/build.mk Sun Mar 17 03:59:11 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: build.mk,v 1.24 2018/11/30 18:38:19 rillig Exp $
+# $NetBSD: build.mk,v 1.25 2019/03/17 03:59:11 dholland Exp $
#
# This file defines what happens in the build phase, excluding the
# self-test, which is defined in test.mk.
@@ -55,6 +55,8 @@
.if defined(MAKE_JOBS_SAFE) && !empty(MAKE_JOBS_SAFE:M[nN][oO])
_MAKE_JOBS= # nothing
+.elif defined(MAKE_JOBS.${PKGPATH})
+_MAKE_JOBS= -j${MAKE_JOBS.${PKGPATH}}
.elif defined(MAKE_JOBS)
_MAKE_JOBS= -j${MAKE_JOBS}
.endif
diff -r 81ffc35657ef -r a7c4b04f6ed2 mk/defaults/mk.conf
--- a/mk/defaults/mk.conf Sun Mar 17 01:17:23 2019 +0000
+++ b/mk/defaults/mk.conf Sun Mar 17 03:59:11 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mk.conf,v 1.300 2019/02/04 09:36:41 wiz Exp $
+# $NetBSD: mk.conf,v 1.301 2019/03/17 03:59:11 dholland Exp $
#
# This file provides default values for variables that may be overridden
@@ -50,20 +50,29 @@
# Possible: -[0-9], --fast, --best (see gzip(1))
# Default: -9
-#MAKE_JOBS= 3
+#MAKE_JOBS= 3
+#MAKE_JOBS.category/dir= 2
# When defined, specifies the maximum number of jobs ("make -j")
# that are run in parallel when building packages with the default
# do-build action. MAKE_JOBS only affects the "build" target,
# neither "test" nor "install".
#
+# May be specified on a per-package basis; any package-specific
+# value overrides the global setting. Package-specific settings are
+# by source directory, not package name, as the circumstances that
+# would lead one to make them are based on properties of sources.
+#
# Possible values: any positive integer. Useful values are around
# the number of processors on the machine.
#
# Default value: (undefined)
#
-# Warning: This is experimental. Some packages will not build with
-# this. Disabling this for an individual package can be done by
+# Warning: Some packages will not build with this. Disabling
+# parallel builds for an individual package can be done by
# setting MAKE_JOBS_SAFE=NO within the per package Makefile.
+# When doing so, please include a comment indicating what went
+# wrong so it can be crosschecked in the future after upstream
+# changes.
#OBJHOSTNAME=
# use hostname-specific object directories, e.g. work.amnesiac, work.localhost
Home |
Main Index |
Thread Index |
Old Index