summaryrefslogtreecommitdiffstats
path: root/share/mk
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2006-11-19 16:28:52 +0000
committerru <ru@FreeBSD.org>2006-11-19 16:28:52 +0000
commit5a9798235e2f40dd84941fcfa4e4f7c7facd173a (patch)
treee984ddccf1ba43079c25932a34ac5fec465fc3d3 /share/mk
parent2b14cadbaf5d2b420ab83271176821eda38aa302 (diff)
downloadFreeBSD-src-5a9798235e2f40dd84941fcfa4e4f7c7facd173a.zip
FreeBSD-src-5a9798235e2f40dd84941fcfa4e4f7c7facd173a.tar.gz
Try harder to not leak src/ build stuff into ports/ environment
by not exposing the MK_* variables that were designed for src/. Requested by: many
Diffstat (limited to 'share/mk')
-rw-r--r--share/mk/bsd.own.mk4
-rw-r--r--share/mk/bsd.port.mk5
2 files changed, 7 insertions, 2 deletions
diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk
index 790582f..bde0e3f 100644
--- a/share/mk/bsd.own.mk
+++ b/share/mk/bsd.own.mk
@@ -104,10 +104,12 @@
.if !target(__<bsd.own.mk>__)
__<bsd.own.mk>__:
+.if !defined(_WITHOUT_SRCCONF)
SRCCONF?= /etc/src.conf
.if exists(${SRCCONF})
.include "${SRCCONF}"
.endif
+.endif
# Binaries
BINOWN?= root
@@ -170,6 +172,7 @@ STRIP?= -s
COMPRESS_CMD?= gzip -cn
COMPRESS_EXT?= .gz
+.if !defined(_WITHOUT_SRCCONF)
#
# Define MK_* variables (which are either "yes" or "no") for users
# to set via WITH_*/WITHOUT_* in /etc/src.conf and override in the
@@ -448,5 +451,6 @@ MK_${var}_SUPPORT:= no
MK_${var}_SUPPORT:= yes
.endif
.endfor
+.endif # !_WITHOUT_SRCCONF
.endif # !target(__<bsd.own.mk>__)
diff --git a/share/mk/bsd.port.mk b/share/mk/bsd.port.mk
index 4d6f640..99374a5 100644
--- a/share/mk/bsd.port.mk
+++ b/share/mk/bsd.port.mk
@@ -3,8 +3,9 @@
PORTSDIR?= /usr/ports
BSDPORTMK?= ${PORTSDIR}/Mk/bsd.port.mk
-# Needed to keep bsd.own.mk from reading in /etc/src.conf when building ports.
-SRCCONF= /dev/null
+# Needed to keep bsd.own.mk from reading in /etc/src.conf
+# and setting MK_* variables when building ports.
+_WITHOUT_SRCCONF=
.include <bsd.own.mk>
.include "${BSDPORTMK}"
OpenPOWER on IntegriCloud