From 0e87e3cb6fc5d22df0d6cd87bc9cd90d65d811f3 Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Thu, 7 Jan 2016 00:20:47 +0000 Subject: [PATCH] Revert r293286. It was not intended to come in yet. --- Makefile | 7 +++++++ share/mk/sys.mk | 19 ------------------- 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/Makefile b/Makefile index c9b8a0a11bc0..836097b42389 100644 --- a/Makefile +++ b/Makefile @@ -143,6 +143,13 @@ TGTS+= ${BITGTS} PATH= /sbin:/bin:/usr/sbin:/usr/bin MAKEOBJDIRPREFIX?= /usr/obj +_MAKEOBJDIRPREFIX!= /usr/bin/env -i PATH=${PATH} ${MAKE} \ + ${.MAKEFLAGS:MMAKEOBJDIRPREFIX=*} __MAKE_CONF=${__MAKE_CONF} \ + -f /dev/null -V MAKEOBJDIRPREFIX dummy +.if !empty(_MAKEOBJDIRPREFIX) +.error MAKEOBJDIRPREFIX can only be set in environment, not as a global\ + (in make.conf(5)) or command-line variable. +.endif # We often need to use the tree's version of make to build it. # Choices add to complexity though. diff --git a/share/mk/sys.mk b/share/mk/sys.mk index d8fc057b12db..51f2818480d7 100644 --- a/share/mk/sys.mk +++ b/share/mk/sys.mk @@ -33,13 +33,6 @@ __ENV_ONLY_OPTIONS:= \ ${__DEFAULT_YES_OPTIONS} \ ${__DEFAULT_DEPENDENT_OPTIONS:H} -__ENV_ONLY_VARS= \ - MAKEOBJDIR \ - MAKEOBJDIRPREFIX -.for _var in ${__ENV_ONLY_VARS} -_pre_includes_${_var:tl}:= ${${_var}:U__null} -.endfor - # early include for customization # see local.sys.mk below # Not included when building in fmake compatibility mode (still needed @@ -57,9 +50,6 @@ _pre_includes_${_var:tl}:= ${${_var}:U__null} .endif .endif .if ${MK_AUTO_OBJ} == "yes" -# Reset, since it is allowed to be set from src-env.conf included before this. -_pre_includes_makeobjdirprefix:= ${MAKEOBJDIRPREFIX:U__null} -_pre_includes_makeobjdir:= ${MAKEOBJDIR:U__null} # This needs to be done early - before .PATH is computed # Don't do this for 'make showconfig' as it enables all options where meta mode # is not expected. @@ -420,15 +410,6 @@ __MAKE_SHELL?=/bin/sh path=${__MAKE_SHELL} .endif -# Ensure MAKEOBJDIRPREFIX was not incorrectly set. -.for _var in ${__ENV_ONLY_VARS} -.if ${.MAKEOVERRIDES:M${_var}} || (defined(${_var}) && \ - ${${_var}} != ${_pre_includes_${_var:tl}}) -.error ${_var} can only be set in environment, not as a global (in make.conf(5)) or command-line variable. -.endif -.undef _pre_includes_${_var:tl} -.endfor - # Hack for ports compatibility. Historically, ports makefiles have # assumed they can examine MACHINE_CPU without including anything # because this was automatically included in sys.mk. For /usr/src,