summaryrefslogtreecommitdiff
path: root/mk/bsd.prefs.mk
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2004-02-05 03:37:47 +0000
committerjlam <jlam@pkgsrc.org>2004-02-05 03:37:47 +0000
commit629be8a499229a01bf5edb46711dd7b72a95a958 (patch)
tree63c95ead370135a22f52871833bd628fc5529650 /mk/bsd.prefs.mk
parentc2d20bedad498d2bf5cda3907503947cbece550a (diff)
downloadpkgsrc-629be8a499229a01bf5edb46711dd7b72a95a958.tar.gz
Include bsd.compiler.mk inside both bsd.pkg.mk and bsd.prefs.mk and define
a stack-like mechanism in bsd.prefs.mk to detect when a we're inside bsd.prefs.mk.
Diffstat (limited to 'mk/bsd.prefs.mk')
-rw-r--r--mk/bsd.prefs.mk10
1 files changed, 9 insertions, 1 deletions
diff --git a/mk/bsd.prefs.mk b/mk/bsd.prefs.mk
index ef1b0e5708a..6fef0239571 100644
--- a/mk/bsd.prefs.mk
+++ b/mk/bsd.prefs.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.prefs.mk,v 1.146 2004/02/01 00:32:38 jlam Exp $
+# $NetBSD: bsd.prefs.mk,v 1.147 2004/02/05 03:37:47 jlam Exp $
#
# Make file, included to get the site preferences, if any. Should
# only be included by package Makefiles before any .if defined()
@@ -6,6 +6,11 @@
# to make sure any variables defined in /etc/mk.conf, $MAKECONF, or
# the system defaults (sys.mk and bsd.own.mk) are used.
+# If empty(BSD_PREFS_MK:M+*), then we are _not_ being included from
+# within bsd.prefs.mk.
+#
+BSD_PREFS_MK:= ${BSD_PREFS_MK}+
+
# Do not recursively include mk.conf, redefine OPSYS, include bsd.own.mk, etc.
.ifndef BSD_PKG_MK
@@ -463,6 +468,7 @@ WRKDIR?= ${BUILD_DIR}/${WRKDIR_BASENAME}
#
WRKLOG?= ${WRKDIR}/.work.log
+# Include bsd.compiler.mk for CC_VERSION.
.if exists(${.CURDIR}/../../mk/compiler/bsd.compiler.mk)
. include "../../mk/compiler/bsd.compiler.mk"
.elif exists(${.CURDIR}/../mk/compiler/bsd.compiler.mk)
@@ -470,3 +476,5 @@ WRKLOG?= ${WRKDIR}/.work.log
.endif
.endif # BSD_PKG_MK
+
+BSD_PREFS_MK:= ${BSD_PREFS_MK:S/+$//}