From owner-dev-commits-src-main@freebsd.org Thu Jun 10 00:11:00 2021 Return-Path: Delivered-To: dev-commits-src-main@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 DD273656385; Thu, 10 Jun 2021 00:11:00 +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 4G0ksJ5z2xz4TMx; Thu, 10 Jun 2021 00:11:00 +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 B520A255D6; Thu, 10 Jun 2021 00:11:00 +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 15A0B0td080543; Thu, 10 Jun 2021 00:11:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15A0B0oI080542; Thu, 10 Jun 2021 00:11:00 GMT (envelope-from git) Date: Thu, 10 Jun 2021 00:11:00 GMT Message-Id: <202106100011.15A0B0oI080542@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: f4d987cd137c - main - mk: WITH_FOO=no now generates a warning MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f4d987cd137cb2d0d54a3e35d9258ca7c175d291 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2021 00:11:00 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=f4d987cd137cb2d0d54a3e35d9258ca7c175d291 commit f4d987cd137cb2d0d54a3e35d9258ca7c175d291 Author: Warner Losh AuthorDate: 2021-06-10 00:10:12 +0000 Commit: Warner Losh CommitDate: 2021-06-10 00:10:52 +0000 mk: WITH_FOO=no now generates a warning Many people are used to gnu configure's behavior of changing --with-foo=no to --without-foo. At the same time, several folks have WITH_FOO=no in their config files to enable this ironic form of the option because of an old meme from IRC, a mailing list or the forums (I forget which). Add a warning to allow to alert people w/o breaking POLA. Reviewed by: allanjude, bdrewery, manu MFC After: 2 weeks Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D30684 --- share/mk/bsd.mkopt.mk | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/share/mk/bsd.mkopt.mk b/share/mk/bsd.mkopt.mk index 5a9cf1b2f1be..98d23dd46c2a 100644 --- a/share/mk/bsd.mkopt.mk +++ b/share/mk/bsd.mkopt.mk @@ -36,6 +36,9 @@ # .for var in ${__DEFAULT_YES_OPTIONS} .if !defined(MK_${var}) +.if defined(WITH_${var}) && ${WITH_${var}} == "no" +.warning "Use WITHOUT_${var}=1 insetad of WITH_${var}=no" +.endif .if defined(WITHOUT_${var}) # WITHOUT always wins MK_${var}:= no .else @@ -54,6 +57,9 @@ MK_${var}:= yes # .for var in ${__DEFAULT_NO_OPTIONS} .if !defined(MK_${var}) +.if defined(WITH_${var}) && ${WITH_${var}} == "no" +.warning "Use WITHOUT_${var}=1 insetad of WITH_${var}=no" +.endif .if defined(WITH_${var}) && !defined(WITHOUT_${var}) # WITHOUT always wins MK_${var}:= yes .else