From owner-dev-commits-src-branches@freebsd.org Tue Sep 7 12:09:36 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E5432662605; Tue, 7 Sep 2021 12:09:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H3kbN5Ygrz4rng; Tue, 7 Sep 2021 12:09:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 94F1E121DD; Tue, 7 Sep 2021 12:09:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 187C9ak8087126; Tue, 7 Sep 2021 12:09:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 187C9aXb087125; Tue, 7 Sep 2021 12:09:36 GMT (envelope-from git) Date: Tue, 7 Sep 2021 12:09:36 GMT Message-Id: <202109071209.187C9aXb087125@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jessica Clarke Subject: git: 502fa11ee8ee - stable/13 - Makefile: Fix MAKEOBJDIRPREFIX command-line variable check for bmake MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 502fa11ee8ee11529371a1d85703a2be6f94f673 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Sep 2021 12:09:37 -0000 The branch stable/13 has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=502fa11ee8ee11529371a1d85703a2be6f94f673 commit 502fa11ee8ee11529371a1d85703a2be6f94f673 Author: Jessica Clarke AuthorDate: 2021-07-21 01:48:10 +0000 Commit: Jessica Clarke CommitDate: 2021-09-07 12:06:46 +0000 Makefile: Fix MAKEOBJDIRPREFIX command-line variable check for bmake Unlike the old fmake, running make FOO=bar when using bmake doesn't put FOO=bar in .MAKEFLAGS at the top level, it instead just puts FOO in .MAKEOVERRIDES and the full MAKEFLAGS will be formed for sub-makes. Moreover, this only applies for sub-makes in rules, so this doesn't apply to those in shell assignments. This means that the current check does not catch make MAKEOBJDIRPREFIX=..., only those defined in config files. Thus we must also check .MAKEOVERRIDES explicitly. Reviewed by: sjg MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31015 (cherry picked from commit d0c737e18454868447f731fe2b10d04f50d9d53b) --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1a1739acb0fe..5929b3c6df20 100644 --- a/Makefile +++ b/Makefile @@ -219,7 +219,7 @@ _MAKEOBJDIRPREFIX!= /usr/bin/env -i PATH=${PATH} ${MAKE} MK_AUTO_OBJ=no \ ${.MAKEFLAGS:MMAKEOBJDIRPREFIX=*} __MAKE_CONF=${__MAKE_CONF} \ SRCCONF=${SRCCONF} SRC_ENV_CONF= \ -f /dev/null -V MAKEOBJDIRPREFIX dummy -.if !empty(_MAKEOBJDIRPREFIX) +.if !empty(_MAKEOBJDIRPREFIX) || !empty(.MAKEOVERRIDES:MMAKEOBJDIRPREFIX) .error MAKEOBJDIRPREFIX can only be set in environment or src-env.conf(5),\ not as a global (in make.conf(5) or src.conf(5)) or command-line variable. .endif