Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Nov 2017 18:27:38 -0700
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Cc:        peter@freebsd.org
Subject:   Re: svn commit: r325416 - head/share/mk
Message-ID:  <2AE40414-7976-4B43-90B2-41C32026A2B7@FreeBSD.org>
In-Reply-To: <201711050012.vA50C6m8042948@repo.freebsd.org>
References:  <201711050012.vA50C6m8042948@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Pretty sure this fixes /etc host files being used in =E2=80=98make distribut=
ion=E2=80=99 (without AUTO_OBJ) as the source files to install to DESTDIR si=
nce many of the etc dirs use NO_OBJ.
I am away from computer for a while so cannot confirm but some basic tests b=
efore I left showed it was possible and Peter has run into such a case.
I=E2=80=99ll look more when I get home and mail current@ if it did fix it. I=
t would have regressed since the src.sys.obj.mk commit the other day.


Regards,
Bryan Drewery

> On Nov 4, 2017, at 17:12, Bryan Drewery <bdrewery@FreeBSD.org> wrote:
>=20
> Author: bdrewery
> Date: Sun Nov  5 00:12:05 2017
> New Revision: 325416
> URL: https://svnweb.freebsd.org/changeset/base/325416
>=20
> Log:
>  Always try to set .OBJDIR, even if AUTO_OBJ is enabled, and fallback to .=
CURDIR.
>=20
>  When AUTO_OBJ is enabled this change becomes redundant with the auto.obj.=
mk
>  check added in r325404.  However, it is possible that new code is added
>  at some point between src.sys.obj.mk and auto.obj.mk that disables AUTO_O=
BJ.
>  That could leave make with a bogus and unsafe .OBJDIR in some cases.
>=20
>  Sponsored by:    Dell EMC Isilon
>=20
> Modified:
>  head/share/mk/src.sys.obj.mk
>=20
> Modified: head/share/mk/src.sys.obj.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.obj.mk    Sun Nov  5 00:12:02 2017    (r325415)
> +++ head/share/mk/src.sys.obj.mk    Sun Nov  5 00:12:05 2017    (r325416)
> @@ -154,9 +154,8 @@ MK_AUTO_OBJ:=3D    ${OBJDIR_WRITABLE}
> .export MK_AUTO_OBJ
> .endif    # ${MK_AUTO_OBJ} =3D=3D "no" && ...
>=20
> -# Assign this directory as .OBJDIR if possible after determining if AUTO_=
OBJ
> -# can be enabled by default.
> -.if ${MK_AUTO_OBJ} =3D=3D "no"
> +# Assign this directory as .OBJDIR if possible.
> +#
> # The expected OBJDIR already exists, set it as .OBJDIR.
> .if !empty(MAKEOBJDIRPREFIX) && exists(${MAKEOBJDIRPREFIX}${.CURDIR})
> .OBJDIR: ${MAKEOBJDIRPREFIX}${.CURDIR}
> @@ -169,5 +168,10 @@ MK_AUTO_OBJ:=3D    ${OBJDIR_WRITABLE}
> .elif ${MAKE_VERSION} <=3D 20170720 && \
>     ${.CURDIR} =3D=3D ${SRCTOP} && ${.OBJDIR} =3D=3D ${SRCTOP}/
> .OBJDIR: ${.CURDIR}
> +.else
> +# The OBJDIR we wanted does not yet exist, ensure we default to safe .CUR=
DIR
> +# in case make started with a bogus MAKEOBJDIR, that expanded before OBJT=
OP
> +# was set, that happened to match some unexpected directory.  Either
> +# auto.obj.mk or bsd.obj.mk will create the directory and fix .OBJDIR lat=
er.
> +.OBJDIR: ${.CURDIR}
> .endif
> -.endif    # ${MK_AUTO_OBJ} =3D=3D "no"
>=20




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2AE40414-7976-4B43-90B2-41C32026A2B7>