Define PKGPATH earlier so that mk.conf can use it.

Requested by David Brownlee on tech-pkg.
This commit is contained in:
joerg 2007-08-01 12:21:56 +00:00
parent fef80803fd
commit 4db0539a2b

View file

@ -1,4 +1,4 @@
# $NetBSD: bsd.prefs.mk,v 1.258 2007/07/30 14:10:36 joerg Exp $
# $NetBSD: bsd.prefs.mk,v 1.259 2007/08/01 12:21:56 joerg Exp $
#
# Make file, included to get the site preferences, if any. Should
# only be included by package Makefiles before any .if defined()
@ -251,6 +251,9 @@ MAKE_ENV+= USETOOLS=no
OBJECT_FMT?= Mach-O
.endif
# Provide PKGPATH early on so that mk.conf can use it.
PKGPATH?= ${.CURDIR:C|.*/([^/]*/[^/]*)$|\1|}
# Load the settings from MAKECONF, which is /etc/mk.conf by default.
.include <bsd.own.mk>
@ -518,7 +521,6 @@ USE_TOOLS+= awk:pkgsrc cut:pkgsrc echo:pkgsrc pwd:pkgsrc \
.include "${_PKGSRC_TOPDIR}/mk/tools/defaults.mk"
PKGPATH?= ${.CURDIR:C|.*/([^/]*/[^/]*)$|\1|}
.if !defined(_PKGSRCDIR)
_PKGSRCDIR!= cd ${_PKGSRC_TOPDIR} && ${PWD_CMD}
MAKEFLAGS+= _PKGSRCDIR=${_PKGSRCDIR:Q}