pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/mk



Module Name:    pkgsrc
Committed By:   dholland
Date:           Sun Mar 17 03:59:11 UTC 2019

Modified Files:
        pkgsrc/mk/build: build.mk
        pkgsrc/mk/defaults: mk.conf

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 pkgsrc/mk/build/build.mk
cvs rdiff -u -r1.300 -r1.301 pkgsrc/mk/defaults/mk.conf

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/mk/build/build.mk
diff -u pkgsrc/mk/build/build.mk:1.24 pkgsrc/mk/build/build.mk:1.25
--- pkgsrc/mk/build/build.mk:1.24       Fri Nov 30 18:38:19 2018
+++ pkgsrc/mk/build/build.mk    Sun Mar 17 03:59:11 2019
@@ -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 @@ BUILD_MAKE_CMD= \
 
 .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

Index: pkgsrc/mk/defaults/mk.conf
diff -u pkgsrc/mk/defaults/mk.conf:1.300 pkgsrc/mk/defaults/mk.conf:1.301
--- pkgsrc/mk/defaults/mk.conf:1.300    Mon Feb  4 09:36:41 2019
+++ pkgsrc/mk/defaults/mk.conf  Sun Mar 17 03:59:11 2019
@@ -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 @@ GZIP?=      -9
 # 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