move LOCKDIR default to pkgpath.mk since it's shared with Makefile.

fix one missed dolock.

Thanks naddy@
This commit is contained in:
espie 2010-08-20 23:11:07 +00:00
parent 25718716f6
commit 3e43c2d160
3 changed files with 5 additions and 7 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.64 2010/08/20 15:02:24 espie Exp $
# $OpenBSD: Makefile,v 1.65 2010/08/20 23:11:07 espie Exp $
# $FreeBSD: Makefile,v 1.36 1997/10/04 15:54:31 jkh Exp $
#
@ -103,15 +103,13 @@ search: ${.CURDIR}/INDEX
. endif
.endif
LOCKDIR ?=
mirror-maker:
@mkdir -p ${MIRROR_MK:H}
.if !empty(LOCKDIR)
@echo "EXEC = " >${MIRROR_MK}
@echo 'LOCKDIR = ${LOCKDIR}' >>${MIRROR_MK}
@echo 'PORTSDIR = ${PORTSDIR}' >>${MIRROR_MK}
@echo 'LOCK_CMD = perl $${PORTSDIR}/infrastructure/build/dolock' >>${MIRROR_MK}
@echo 'LOCK_CMD = perl $${PORTSDIR}/infrastructure/bin/dolock' >>${MIRROR_MK}
@echo 'UNLOCK_CMD = rm -f' >>${MIRROR_MK}
@echo 'SIMPLE_LOCK = $${LOCK_CMD} $${LOCKDIR}/$$$$lock.lock; trap "$${UNLOCK_CMD} $${LOCKDIR}/$$$$lock.lock" 0 1 2 3 13 15' >>${MIRROR_MK}
.else

View File

@ -1,6 +1,6 @@
#-*- mode: Makefile; tab-width: 4; -*-
# ex:ts=4 sw=4 filetype=make:
# $OpenBSD: bsd.port.mk,v 1.1027 2010/08/20 14:53:18 espie Exp $
# $OpenBSD: bsd.port.mk,v 1.1028 2010/08/20 23:11:07 espie Exp $
# $FreeBSD: bsd.port.mk,v 1.264 1996/12/25 02:27:44 imp Exp $
# $NetBSD: bsd.port.mk,v 1.62 1998/04/09 12:47:02 hubertf Exp $
#
@ -1513,7 +1513,6 @@ ECHO_REORDER ?= :
# Lock infrastructure:
# to remove locks handling, define LOCKDIR to an empty value
LOCKDIR ?= ${TMPDIR}/portslocks
LOCK_CMD ?= ${_PERLSCRIPT}/dolock
UNLOCK_CMD ?= rm -f
_LOCKS_HELD ?=

View File

@ -1,4 +1,4 @@
# $OpenBSD: pkgpath.mk,v 1.28 2010/08/20 15:02:24 espie Exp $
# $OpenBSD: pkgpath.mk,v 1.29 2010/08/20 23:11:07 espie Exp $
# ex:ts=4 sw=4 filetype=make:
# pkgpath.mk - 2003 Marc Espie
# This file is in the public domain.
@ -9,6 +9,7 @@ PORTSDIR_PATH ?= ${PORTSDIR}:${PORTSDIR}/mystuff
TMPDIR ?= /tmp
READMES_TOP ?= ${PORTSDIR}
DANGEROUS ?= No
LOCKDIR ?= ${TMPDIR}/portslocks
.if !defined(PKGPATH)