From f02479f386f7e236f30a2edb0df72778c059cc10 Mon Sep 17 00:00:00 2001 From: espie Date: Mon, 17 Jul 2000 07:11:50 +0000 Subject: [PATCH] Buglet: ensure PKGPATH is without a /. This complicates bsd.port.subdir.mk slightly (needs to set _SEP), but at least it's consistent. --- infrastructure/mk/bsd.port.mk | 4 ++-- infrastructure/mk/bsd.port.subdir.mk | 14 ++++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/infrastructure/mk/bsd.port.mk b/infrastructure/mk/bsd.port.mk index 548449708a1..6c4ec61c807 100644 --- a/infrastructure/mk/bsd.port.mk +++ b/infrastructure/mk/bsd.port.mk @@ -1,6 +1,6 @@ #-*- mode: Fundamental; tab-width: 4; -*- # ex:ts=4 sw=4 filetype=make: -FULL_REVISION=$$OpenBSD: bsd.port.mk,v 1.316 2000/07/14 23:07:25 espie Exp $$ +FULL_REVISION=$$OpenBSD: bsd.port.mk,v 1.317 2000/07/17 07:11:50 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 $ # @@ -707,7 +707,7 @@ WRKPKG?= ${WRKBUILD}/pkg .if !defined(PKGPATH) _PORTSDIR!= cd ${PORTSDIR} && pwd -P _CURDIR!= cd ${.CURDIR} && pwd -P -PKGPATH=${_CURDIR:S,${_PORTSDIR}/,,}/ +PKGPATH=${_CURDIR:S,${_PORTSDIR}/,,} .endif # A few aliases for *-install targets diff --git a/infrastructure/mk/bsd.port.subdir.mk b/infrastructure/mk/bsd.port.subdir.mk index f49d957c007..cd9801be013 100644 --- a/infrastructure/mk/bsd.port.subdir.mk +++ b/infrastructure/mk/bsd.port.subdir.mk @@ -1,5 +1,5 @@ # from: @(#)bsd.subdir.mk 5.9 (Berkeley) 2/1/91 -# $OpenBSD: bsd.port.subdir.mk,v 1.28 2000/07/14 23:01:11 espie Exp $ +# $OpenBSD: bsd.port.subdir.mk,v 1.29 2000/07/17 07:11:50 espie Exp $ # FreeBSD Id: bsd.port.subdir.mk,v 1.20 1997/08/22 11:16:15 asami Exp # # The include file contains the default targets @@ -54,10 +54,12 @@ _PORTSDIR!= cd ${PORTSDIR} && pwd -P _CURDIR!= cd ${.CURDIR} && pwd -P . if ${_PORTSDIR} == ${_CURDIR} PKGPATH= +_SEP= . else -PKGPATH=${_CURDIR:S,${_PORTSDIR}/,,}/ +PKGPATH=${_CURDIR:S,${_PORTSDIR}/,,} . endif .endif +_SEP?=/ ECHO_MSG?= echo @@ -69,7 +71,7 @@ _SUBDIRUSE: .USE @for entry in ${SUBDIR}; do \ for dud in $$DUDS; do \ if [ $${dud} = $${entry} ]; then \ - ${ECHO_MSG} "===> ${PKGPATH}$${entry} skipped"; \ + ${ECHO_MSG} "===> ${PKGPATH}${_SEP}$${entry} skipped"; \ continue 2; \ fi; \ done; \ @@ -88,12 +90,12 @@ _SUBDIRUSE: .USE elif cd ${.CURDIR}/$${entry} 2>/dev/null; then \ edir=$${entry}; \ else \ - ${ECHO_MSG} "===> ${PKGPATH}$${entry} non-existent"; \ + ${ECHO_MSG} "===> ${PKGPATH}${_SEP}$${entry} non-existent"; \ continue; \ fi; \ - ${ECHO_MSG} "===> ${PKGPATH}$${edir}$$display"; \ + ${ECHO_MSG} "===> ${PKGPATH}${_SEP}$${edir}$$display"; \ if env $$varname="$$flavor" \ - PKGPATH=${PKGPATH}$$edir/ \ + PKGPATH=${PKGPATH}${_SEP}$$edir \ RECURSIVE_FETCH_LIST=${RECURSIVE_FETCH_LIST} \ ${MAKE} ${.TARGET:realinstall=install}; \ then :; else ${REPORT_PROBLEM}; fi; \