diff options
-rw-r--r-- | mk/bsd.pkg.mk | 6 | ||||
-rw-r--r-- | mk/defaults/mk.conf | 4 | ||||
-rw-r--r-- | mk/internal/locking.mk | 7 |
3 files changed, 10 insertions, 7 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index 4d7bd911fab..686968565fd 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.1907 2007/02/20 10:32:09 rillig Exp $ +# $NetBSD: bsd.pkg.mk,v 1.1908 2007/02/22 07:20:41 rillig Exp $ # # This file is in the public domain. # @@ -590,7 +590,7 @@ makedirs: ${WRKDIR} ${WRKDIR}: .if !defined(KEEP_WRKDIR) -. if ${PKGSRC_LOCKTYPE} == "sleep" || ${PKGSRC_LOCKTYPE} == "once" +. if ${WRKDIR_LOCKTYPE} != "none" ${RUN} ${TEST} -f ${_WRKDIR_LOCKFILE} || ${RM} -fr ${WRKDIR} . endif .endif @@ -604,7 +604,7 @@ CREATE_WRKDIR_SYMLINK?= yes .if defined(WRKOBJDIR) && !empty(CREATE_WRKDIR_SYMLINK:M[Yy][Ee][Ss]) makedirs: ${.CURDIR}/${WRKDIR_BASENAME} ${.CURDIR}/${WRKDIR_BASENAME}: -. if ${PKGSRC_LOCKTYPE} == "sleep" || ${PKGSRC_LOCKTYPE} == "once" +. if ${WRKDIR_LOCKTYPE} != "none" ${RUN} ${TEST} -f ${_WRKDIR_LOCKFILE} || ${RM} -f ${.TARGET} . endif ${RUN} \ diff --git a/mk/defaults/mk.conf b/mk/defaults/mk.conf index 9a56e277460..4bf05427531 100644 --- a/mk/defaults/mk.conf +++ b/mk/defaults/mk.conf @@ -1,4 +1,4 @@ -# $NetBSD: mk.conf,v 1.149 2007/02/22 07:05:57 rillig Exp $ +# $NetBSD: mk.conf,v 1.150 2007/02/22 07:20:42 rillig Exp $ # # This file provides default values for variables that may be overridden @@ -84,7 +84,7 @@ PKGSRC_LOCKTYPE?= none # process, the current process will sleep for PKGSRC_SLEEPSECS # seconds and then try again. # -# Note: Locking requires that OBJHOSTNAME is set. +# See also: LOCALBASE_LOCKTYPE, WRKDIR_LOCKTYPE. # # Keywords: lock locking parallel # diff --git a/mk/internal/locking.mk b/mk/internal/locking.mk index dff0abe4b4d..6ee759fc5e3 100644 --- a/mk/internal/locking.mk +++ b/mk/internal/locking.mk @@ -1,4 +1,4 @@ -# $NetBSD: locking.mk,v 1.6 2007/02/20 22:11:10 rillig Exp $ +# $NetBSD: locking.mk,v 1.7 2007/02/22 07:20:42 rillig Exp $ # # User-settable variables: # @@ -16,6 +16,9 @@ # Default value: none # Recommended: sleep # +# See also: PKGSRC_LOCKTYPE. +# + # This file provides the following .USE targets: # # acquire-lock @@ -45,7 +48,7 @@ _LOCKVARS= WRKDIR_LOCKTYPE LOCALBASE_LOCKTYPE .for v in ${_LOCKVARS} _OK= no . for t in none once sleep -. if ${PKGSRC_LOCKTYPE} == "${t}" +. if ${${v}} == "${t}" _OK= yes . endif . endfor |