pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk/build Add a visible EFFECTIVE_MAKE_JOBS, a tunable ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/1549dc05616a
branches: trunk
changeset: 410251:1549dc05616a
user: maya <maya%pkgsrc.org@localhost>
date: Sun Jan 19 16:51:47 2020 +0000
description:
Add a visible EFFECTIVE_MAKE_JOBS, a tunable resembling _MAKE_JOBS,
but is defined as 1 in the case of no jobs.
No -j prefix for maximum usability.
(XXX: is _DEF_VARS the right place to add it?)
diffstat:
mk/build/build.mk | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diffs (35 lines):
diff -r 77c55dfed98a -r 1549dc05616a mk/build/build.mk
--- a/mk/build/build.mk Sun Jan 19 15:43:44 2020 +0000
+++ b/mk/build/build.mk Sun Jan 19 16:51:47 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: build.mk,v 1.28 2019/09/02 02:59:47 rillig Exp $
+# $NetBSD: build.mk,v 1.29 2020/01/19 16:51:47 maya Exp $
#
# This file defines what happens in the build phase, excluding the
# self-test, which is defined in test.mk.
@@ -38,6 +38,7 @@
# Keywords: build make
_VARGROUPS+= build
+_DEF_VARS.build= EFFECTIVE_MAKE_JOBS
_USER_VARS.build= MAKE_JOBS BUILD_ENV_SHELL
_PKG_VARS.build= MAKE_ENV MAKE_FLAGS BUILD_MAKE_FLAGS BUILD_TARGET MAKE_JOBS_SAFE
_SYS_VARS.build= BUILD_MAKE_CMD
@@ -54,11 +55,14 @@
-f ${MAKE_FILE}
.if defined(MAKE_JOBS_SAFE) && !empty(MAKE_JOBS_SAFE:M[nN][oO])
-_MAKE_JOBS= # nothing
+_MAKE_JOBS= # nothing
+EFFECTIVE_MAKE_JOBS= 1
.elif defined(MAKE_JOBS.${PKGPATH})
-_MAKE_JOBS= -j${MAKE_JOBS.${PKGPATH}}
+_MAKE_JOBS= -j${MAKE_JOBS.${PKGPATH}}
+EFFECTIVE_MAKE_JOBS= ${MAKE_JOBS.${PKGPATH}}
.elif defined(MAKE_JOBS)
-_MAKE_JOBS= -j${MAKE_JOBS}
+_MAKE_JOBS= -j${MAKE_JOBS}
+EFFECTIVE_MAKE_JOBS= ${MAKE_JOBS}
.endif
######################################################################
Home |
Main Index |
Thread Index |
Old Index