summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2004-10-07 13:42:26 +0000
committerjlam <jlam@pkgsrc.org>2004-10-07 13:42:26 +0000
commit98eb2064746b9ff83b2b45f465fce27f114ac6bd (patch)
treed43e3a64512e962519f785c23f06d5e10a00822c /mk
parent9801f339f62bcdd31cdbfa688b63fe5ab74e1c22 (diff)
downloadpkgsrc-98eb2064746b9ff83b2b45f465fce27f114ac6bd.tar.gz
Make PKGSRCDIR a read-only value. This avoids problems where the user
decides to set PKGSRCDIR to a relative path as seen in several old PRs and which prompted the original switch to make PKGSRCDIR private in revision 1.881 of bsd.pkg.mk.
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.prefs.mk9
1 files changed, 5 insertions, 4 deletions
diff --git a/mk/bsd.prefs.mk b/mk/bsd.prefs.mk
index 16ff0fa956d..32eecf1fa78 100644
--- a/mk/bsd.prefs.mk
+++ b/mk/bsd.prefs.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.prefs.mk,v 1.172 2004/10/07 03:03:09 jlam Exp $
+# $NetBSD: bsd.prefs.mk,v 1.173 2004/10/07 13:42:26 jlam Exp $
#
# Make file, included to get the site preferences, if any. Should
# only be included by package Makefiles before any .if defined()
@@ -464,10 +464,11 @@ PKG_FAIL_REASON+= 'for more details.'
.endif
PKGPATH?= ${.CURDIR:C|.*/([^/]*/[^/]*)$|\1|}
-.if !defined(PKGSRCDIR)
-PKGSRCDIR!= cd ${_PKGSRC_TOPDIR} && ${PWD_CMD}
-MAKEFLAGS+= PKGSRCDIR=${PKGSRCDIR:Q}
+.if !defined(_PKGSRCDIR)
+_PKGSRCDIR!= cd ${_PKGSRC_TOPDIR} && ${PWD_CMD}
+MAKEFLAGS+= _PKGSRCDIR=${_PKGSRCDIR:Q}
.endif
+PKGSRCDIR= ${_PKGSRCDIR}
DISTDIR?= ${PKGSRCDIR}/distfiles
PACKAGES?= ${PKGSRCDIR}/packages