summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorjoerg <joerg>2007-08-01 12:21:56 +0000
committerjoerg <joerg>2007-08-01 12:21:56 +0000
commit8555f5fd10720618165d778b003fdb37cb01ed68 (patch)
tree9fe145cee3507ebe366fe2bc62ee1993804afb46 /mk
parent36a29de085aaa9631645e36f5054e375cc5f5fd4 (diff)
downloadpkgsrc-8555f5fd10720618165d778b003fdb37cb01ed68.tar.gz
Define PKGPATH earlier so that mk.conf can use it.
Requested by David Brownlee on tech-pkg.
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.prefs.mk6
1 files changed, 4 insertions, 2 deletions
diff --git a/mk/bsd.prefs.mk b/mk/bsd.prefs.mk
index 727c0c4ade3..722046ed736 100644
--- a/mk/bsd.prefs.mk
+++ b/mk/bsd.prefs.mk
@@ -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}