tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Set MAKE_JOBS_SAFE=no for samba?
On Sat, Jan 05, 2019 at 03:33:02PM -0500, Greg Troxel wrote:
> > Indeed, please use something like this instead of limiting the build
> > for everyone. My personal favourite way of doing this is with
> > something like this in mk.conf:
> >
> > PKG_MAKE_JOBS.lang/gcc7= 12
> > PKG_MAKE_JOBS.net/samba= 2
> >
> > MAKE_JOBS_DEFAULT= 4
> >
> > MAKE_JOBS= ${PKG_MAKE_JOBS.${PKGPATH}:U${MAKE_JOBS_DEFAULT}}
>
> I would like to see this (I guess that means the last line) added.
>
> A nit: given MAKE_JOBS and MAKE_JOBS_DEFAULT, it seems that it should be
> MAKE_JOBS.lang/gcc7 (not PKG_MAKE_JOBS), so the variable matches -- even
> if all of them should arguably have PKG_.
This is the patch that was already rejected once:
Index: mk/build/build.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/build/build.mk,v
retrieving revision 1.24
diff -u -r1.24 build.mk
--- mk/build/build.mk 30 Nov 2018 18:38:19 -0000 1.24
+++ mk/build/build.mk 5 Jan 2019 21:50:37 -0000
@@ -55,6 +55,8 @@
.if defined(MAKE_JOBS_SAFE) && !empty(MAKE_JOBS_SAFE:M[nN][oO])
_MAKE_JOBS= # nothing
+.elif defined(MAKE_JOBS.${PKGBASE})
+_MAKE_JOBS= -j${MAKE_JOBS.${PKGBASE}}
.elif defined(MAKE_JOBS)
_MAKE_JOBS= -j${MAKE_JOBS}
.endif
Index: mk/defaults/mk.conf
===================================================================
RCS file: /cvsroot/pkgsrc/mk/defaults/mk.conf,v
retrieving revision 1.297
diff -u -r1.297 mk.conf
--- mk/defaults/mk.conf 12 Nov 2018 14:22:58 -0000 1.297
+++ mk/defaults/mk.conf 5 Jan 2019 21:50:37 -0000
@@ -51,19 +51,26 @@
# Default: -9
#MAKE_JOBS= 3
+#MAKE_JOBS.pkg= 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.
+#
# 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
--
David A. Holland
dholland%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index