summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorjlam <jlam>2006-06-04 05:25:08 +0000
committerjlam <jlam>2006-06-04 05:25:08 +0000
commitfe4f2029196912837e9a9c8a93a49b3610263905 (patch)
tree087a72f3835dfabf3f77700c5faf3e1a8b12d1fc /mk
parente1a6d0440751a9fab109732d8955496a08c48807 (diff)
downloadpkgsrc-fe4f2029196912837e9a9c8a93a49b3610263905.tar.gz
Move test for the lockfile within the target's shell code instead of
testing for it at the Makefile level.
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.pkg.mk11
1 files changed, 4 insertions, 7 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index 6cd7c4a2e50..9de21b49483 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1829 2006/06/04 04:31:47 jlam Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1830 2006/06/04 05:25:08 jlam Exp $
#
# This file is in the public domain.
#
@@ -1196,18 +1196,15 @@ release-lock: .USE
${WRKDIR}:
.if !defined(KEEP_WRKDIR)
. if ${PKGSRC_LOCKTYPE} == "sleep" || ${PKGSRC_LOCKTYPE} == "once"
-. if !exists(${LOCKFILE})
- ${_PKG_SILENT}${_PKG_DEBUG}${RM} -rf ${WRKDIR}
-. endif
+ ${_PKG_SILENT}${_PKG_DEBUG} \
+ ${TEST} -f ${LOCKFILE} || ${RM} -fr ${WRKDIR}
. endif
.endif
${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${WRKDIR}
.if defined(WRKOBJDIR)
. if ${PKGSRC_LOCKTYPE} == "sleep" || ${PKGSRC_LOCKTYPE} == "once"
-. if !exists(${LOCKFILE})
${_PKG_SILENT}${_PKG_DEBUG} \
- ${RM} -f ${WRKDIR_BASENAME} || ${TRUE}
-. endif
+ ${TEST} -f ${LOCKFILE} || ${RM} -f ${WRKDIR_BASENAME}
. endif
. if !empty(CREATE_WRKDIR_SYMLINK:M[Yy][Ee][Ss])
${_PKG_SILENT}${_PKG_DEBUG} \