Tue Feb 18 16:10:38 2020 UTC ()
Make sure _MAKE_JOBS_N has a valid value even if MAKE_JOBS is unset.


(maya)
diff -r1.30 -r1.31 pkgsrc/mk/build/build.mk

cvs diff -r1.30 -r1.31 pkgsrc/mk/build/build.mk (expand / switch to unified diff)

--- pkgsrc/mk/build/build.mk 2020/01/19 18:20:46 1.30
+++ pkgsrc/mk/build/build.mk 2020/02/18 16:10:37 1.31
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: build.mk,v 1.30 2020/01/19 18:20:46 maya Exp $ 1# $NetBSD: build.mk,v 1.31 2020/02/18 16:10:37 maya Exp $
2# 2#
3# This file defines what happens in the build phase, excluding the 3# This file defines what happens in the build phase, excluding the
4# self-test, which is defined in test.mk. 4# self-test, which is defined in test.mk.
5# 5#
6# Public targets for developers: 6# Public targets for developers:
7# 7#
8# build-env: 8# build-env:
9# Runs an interactive shell (BUILD_ENV_SHELL) in the environment 9# Runs an interactive shell (BUILD_ENV_SHELL) in the environment
10# that is used for building the package. 10# that is used for building the package.
11# 11#
12# Package-settable variables: 12# Package-settable variables:
13# 13#
14# BUILD_MAKE_FLAGS is the list of arguments that is passed to the make 14# BUILD_MAKE_FLAGS is the list of arguments that is passed to the make
@@ -53,26 +53,28 @@ BUILD_MAKE_CMD= \ @@ -53,26 +53,28 @@ BUILD_MAKE_CMD= \
53 ${MAKE_PROGRAM} ${_MAKE_JOBS} \ 53 ${MAKE_PROGRAM} ${_MAKE_JOBS} \
54 ${MAKE_FLAGS} ${BUILD_MAKE_FLAGS} \ 54 ${MAKE_FLAGS} ${BUILD_MAKE_FLAGS} \
55 -f ${MAKE_FILE} 55 -f ${MAKE_FILE}
56 56
57.if defined(MAKE_JOBS_SAFE) && !empty(MAKE_JOBS_SAFE:M[nN][oO]) 57.if defined(MAKE_JOBS_SAFE) && !empty(MAKE_JOBS_SAFE:M[nN][oO])
58_MAKE_JOBS= # nothing 58_MAKE_JOBS= # nothing
59_MAKE_JOBS_N= 1 59_MAKE_JOBS_N= 1
60.elif defined(MAKE_JOBS.${PKGPATH}) 60.elif defined(MAKE_JOBS.${PKGPATH})
61_MAKE_JOBS= -j${MAKE_JOBS.${PKGPATH}} 61_MAKE_JOBS= -j${MAKE_JOBS.${PKGPATH}}
62_MAKE_JOBS_N= ${MAKE_JOBS.${PKGPATH}} 62_MAKE_JOBS_N= ${MAKE_JOBS.${PKGPATH}}
63.elif defined(MAKE_JOBS) 63.elif defined(MAKE_JOBS)
64_MAKE_JOBS= -j${MAKE_JOBS} 64_MAKE_JOBS= -j${MAKE_JOBS}
65_MAKE_JOBS_N= ${MAKE_JOBS} 65_MAKE_JOBS_N= ${MAKE_JOBS}
 66.else
 67_MAKE_JOBS_N= 1
66.endif 68.endif
67 69
68###################################################################### 70######################################################################
69### build (PUBLIC) 71### build (PUBLIC)
70###################################################################### 72######################################################################
71### build is a public target to build the sources from the package. 73### build is a public target to build the sources from the package.
72### 74###
73_BUILD_TARGETS+= check-vulnerable 75_BUILD_TARGETS+= check-vulnerable
74_BUILD_TARGETS+= configure 76_BUILD_TARGETS+= configure
75_BUILD_TARGETS+= acquire-build-lock 77_BUILD_TARGETS+= acquire-build-lock
76_BUILD_TARGETS+= ${_COOKIE.build} 78_BUILD_TARGETS+= ${_COOKIE.build}
77_BUILD_TARGETS+= release-build-lock 79_BUILD_TARGETS+= release-build-lock
78.if ${_USE_NEW_PKGINSTALL:Uno} == "no" 80.if ${_USE_NEW_PKGINSTALL:Uno} == "no"