summaryrefslogtreecommitdiff
path: root/mk/bsd.prefs.mk
diff options
context:
space:
mode:
authortv <tv>1998-08-19 16:23:40 +0000
committertv <tv>1998-08-19 16:23:40 +0000
commitae09611a8acc0229f80fe2074ff1b559eea63786 (patch)
tree66f4d45d7d03e0a56486e3fa46cac9a90a527139 /mk/bsd.prefs.mk
parentad7868678fc62c73bc2cc4d905225392286fa99d (diff)
downloadpkgsrc-ae09611a8acc0229f80fe2074ff1b559eea63786.tar.gz
Don't barf if the environment sets PREFIX (just ignore it). Needed for
recursive makes.
Diffstat (limited to 'mk/bsd.prefs.mk')
-rw-r--r--mk/bsd.prefs.mk7
1 files changed, 5 insertions, 2 deletions
diff --git a/mk/bsd.prefs.mk b/mk/bsd.prefs.mk
index 9331773127d..a3a56a55909 100644
--- a/mk/bsd.prefs.mk
+++ b/mk/bsd.prefs.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.prefs.mk,v 1.2 1998/08/11 19:30:48 tv Exp $
+# $NetBSD: bsd.prefs.mk,v 1.3 1998/08/19 16:23:40 tv Exp $
#
# Make file, included to get the site preferences, if any. Should
# only be included by package Makefiles before any .if defined()
@@ -9,6 +9,9 @@
OPSYS!= /usr/bin/uname -s
.endif
+# Don't complain about environment settings on recursive makes.
+__PREFIX_SET__=${PREFIX}
+
.if defined(MAKECONF) && exists(${MAKECONF})
.include "${MAKECONF}"
.elif ${OPSYS} == "FreeBSD" && exists(/etc/make.conf)
@@ -17,7 +20,7 @@ OPSYS!= /usr/bin/uname -s
.include "/etc/mk.conf"
.endif
-.if defined(PREFIX)
+.if defined(PREFIX) && (${PREFIX} != ${__PREFIX_SET__})
.BEGIN:
@${ECHO_MSG} "You can NOT set PREFIX manually or in mk.conf. Set LOCALBASE or X11BASE"
@${ECHO_MSG} "depending on your needs. See the pkg system documentation for more info."