Date: Tue, 28 Jul 2015 18:04:10 -0700 From: Bryan Drewery <bdrewery@FreeBSD.org> To: "Simon J. Gerraty" <sjg@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r284598 - head/share/mk Message-ID: <55B8268A.5030305@FreeBSD.org> In-Reply-To: <201506191456.t5JEuPDU074336@svn.freebsd.org> References: <201506191456.t5JEuPDU074336@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 6/19/15 7:56 AM, Simon J. Gerraty wrote: > Author: sjg > Date: Fri Jun 19 14:56:24 2015 > New Revision: 284598 > URL: https://svnweb.freebsd.org/changeset/base/284598 >=20 > Log: > Move include of make.conf back to its old position. > =20 > This means moving include of local.sys.mk and src.sys.mk too. > Introduce new includes to take the early slot, for the purpose > of being able to influence toolchains and the like. > =20 > Differential Revision: D2860 > Reviewed by: imp >=20 > Added: > head/share/mk/local.sys.env.mk > - copied, changed from r284432, head/share/mk/local.sys.mk > head/share/mk/src.sys.env.mk > - copied, changed from r284432, head/share/mk/src.sys.mk > Modified: > head/share/mk/local.sys.mk I'm bothered by the amount of local.* files committed in the tree. I expect, as a user and working in a downstream product, that a local.* file is MINE, not FREEBSD. The pattern of using 'local' is quite common as a *user* file. Why are these named as such? It seems they should just be 'src.' with .sinclude hooks for actual local overrides. local.autodep.mk local.dirdeps.mk local.gendirdeps.mk local.init.mk local.meta.sys.mk local.sys.env.mk local.sys.mk > head/share/mk/src.sys.mk > head/share/mk/sys.mk >=20 ... > +# site customizations that do not depend on anything! > +SRC_ENV_CONF?=3D /etc/src-env.conf > +.if !empty(SRC_ENV_CONF) && !target(_src_env_conf_included_) > +.-include "${SRC_ENV_CONF}" > +_src_env_conf_included_: .NOTMAIN > .endif This needs to be documented in at least src.conf(5). I'm concerned that the need to add this indicates subtle changes elsewhere that may break existing /etc/src.conf setups, but I cannot find an example. > + > # If we were found via .../share/mk we need to replace that > # with ${.PARSEDIR:tA} so that we can be found by > # sub-makes launched from objdir. > @@ -24,5 +22,3 @@ _srcconf_included_: .NOTMAIN > MAKESYSPATH:=3D ${MAKESYSPATH:S,.../share/mk,${.PARSEDIR:tA},} > .export MAKESYSPATH > .endif > -# tempting, but bsd.compiler.mk causes problems this early > -#.include "src.opts.mk" >=20 > Modified: head/share/mk/src.sys.mk > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/share/mk/src.sys.mk Fri Jun 19 14:20:21 2015 (r284597) > +++ head/share/mk/src.sys.mk Fri Jun 19 14:56:24 2015 (r284598) > @@ -5,24 +5,13 @@ > # to preserve historical (and useful) behavior. Changes here need to > # be reflected there so SRCCONF isn't included multiple times. > =20 > -# make sure this is defined in a consistent manner > -SRCTOP:=3D ${.PARSEDIR:tA:H:H} > - > # Allow user to configure things that only effect src tree builds. > SRCCONF?=3D /etc/src.conf > .if (exists(${SRCCONF}) || ${SRCCONF} !=3D "/etc/src.conf") && !target= (_srcconf_included_) > .sinclude "${SRCCONF}" > _srcconf_included_: .NOTMAIN > .endif > -# If we were found via .../share/mk we need to replace that > -# with ${.PARSEDIR:tA} so that we can be found by > -# sub-makes launched from objdir. > -.if ${.MAKEFLAGS:M.../share/mk} !=3D "" > -.MAKEFLAGS:=3D ${.MAKEFLAGS:S,.../share/mk,${.PARSEDIR:tA},} > -.endif > -.if ${MAKESYSPATH:Uno:M*.../*} !=3D "" > -MAKESYSPATH:=3D ${MAKESYSPATH:S,.../share/mk,${.PARSEDIR:tA},} > -.export MAKESYSPATH > -.endif > + > # tempting, but bsd.compiler.mk causes problems this early > +# probably need to remove dependence on bsd.own.mk=20 > #.include "src.opts.mk" >=20 > Modified: head/share/mk/sys.mk > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/share/mk/sys.mk Fri Jun 19 14:20:21 2015 (r284597) > +++ head/share/mk/sys.mk Fri Jun 19 14:56:24 2015 (r284598) > @@ -31,15 +31,9 @@ __DEFAULT_DEPENDENT_OPTIONS=3D \ > =20 > .include <bsd.mkopt.mk> > =20 > -# Pull in global settings. > -__MAKE_CONF?=3D/etc/make.conf > -.if exists(${__MAKE_CONF}) > -.include "${__MAKE_CONF}" > -.endif > - > -# Set any local definitions first. Place this early, but it needs > -# MACHINE_CPUARCH to be defined. > -.-include <local.sys.mk> > +# early include for customization > +# see local.sys.mk below > +.-include <local.sys.env.mk> > =20 > .if ${MK_META_MODE} =3D=3D "yes" > .-include <meta.sys.mk> > @@ -360,6 +354,14 @@ YFLAGS ?=3D -d > rm -f ${.PREFIX}.tmp.c > ${CTFCONVERT_CMD} > =20 > +# Pull in global settings. > +__MAKE_CONF?=3D/etc/make.conf > +.if exists(${__MAKE_CONF}) > +.include "${__MAKE_CONF}" > +.endif > + > +# late include for customization > +.-include <local.sys.mk> In local.sys.mk from r284345 is an inclusion of SRCCONF, which is now different and earlier than before. I wonder if this should move back to only being included from bsd.own.mk (there is even a lingering WITHOUT_SRCCONF check in that file). The way it is now is very obscure in terms of when it is actually included and from where. > =20 > .if defined(__MAKE_SHELL) && !empty(__MAKE_SHELL) > SHELL=3D ${__MAKE_SHELL} >=20 --=20 Regards, Bryan Drewery
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?55B8268A.5030305>