From owner-freebsd-arch@FreeBSD.ORG Mon Oct 8 17:53:33 2012 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 248861065672; Mon, 8 Oct 2012 17:53:33 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from exprod7og119.obsmtp.com (exprod7og119.obsmtp.com [64.18.2.16]) by mx1.freebsd.org (Postfix) with ESMTP id 93A3A8FC0A; Mon, 8 Oct 2012 17:53:32 +0000 (UTC) Received: from P-EMHUB03-HQ.jnpr.net ([66.129.224.36]) (using TLSv1) by exprod7ob119.postini.com ([64.18.6.12]) with SMTP ID DSNKUHMTFuN/OztzHaNlesQefUfbVerSwTPG@postini.com; Mon, 08 Oct 2012 10:53:32 PDT Received: from magenta.juniper.net (172.17.27.123) by P-EMHUB03-HQ.jnpr.net (172.24.192.33) with Microsoft SMTP Server (TLS) id 8.3.213.0; Mon, 8 Oct 2012 10:52:06 -0700 Received: from chaos.jnpr.net (chaos.jnpr.net [172.24.29.229]) by magenta.juniper.net (8.11.3/8.11.3) with ESMTP id q98Hq6h01030; Mon, 8 Oct 2012 10:52:06 -0700 (PDT) (envelope-from sjg@juniper.net) Received: from chaos.jnpr.net (localhost [127.0.0.1]) by chaos.jnpr.net (Postfix) with ESMTP id 5961858094; Mon, 8 Oct 2012 10:52:06 -0700 (PDT) To: Brooks Davis In-Reply-To: <20121008154853.GC23400@lor.one-eyed-alien.net> References: <20121007001423.9878F58094@chaos.jnpr.net> <20121008154853.GC23400@lor.one-eyed-alien.net> Comments: In-reply-to: Brooks Davis message dated "Mon, 08 Oct 2012 10:48:53 -0500." From: "Simon J. Gerraty" X-Mailer: MH-E 7.82+cvs; nmh 1.3; GNU Emacs 22.3.1 Date: Mon, 8 Oct 2012 10:52:06 -0700 Message-ID: <20121008175206.5961858094@chaos.jnpr.net> MIME-Version: 1.0 Content-Type: text/plain Cc: freebsd-arch@freebsd.org Subject: Re: bsd.own.mk - just let WITHOUT_* take precedence X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Oct 2012 17:53:33 -0000 On Mon, 8 Oct 2012 10:48:53 -0500, Brooks Davis writes: >I'm not sure if I agree or not, I'll have to think more. This sort of >thing that leads to me yelling at my computer "but I @#%$@# set >WITH_FOO you ^@$@! machine." :) For default YES options, WITHOUT_ already takes precedence (ignoring the fact that you die first if both are set). The main change is to make default NO options behave the same. >I think we should at a minimum issue a warning and say what we did. Sure, something like: .warning both WITHOUT_${var} and WITH_${var} set; WITHOUT_${var} wins. >The implementation looks mostly fine. I do think it skips some options >with variable defaults (LIBCXX in HEAD for example) so I think you'd need >to sprinkle more of these changes in. True, here's a more complte change: Index: share/mk/bsd.own.mk =================================================================== --- share/mk/bsd.own.mk (revision 241871) +++ share/mk/bsd.own.mk (working copy) @@ -469,7 +469,7 @@ __DEFAULT_NO_OPTIONS+=FDT # .for var in ${__DEFAULT_YES_OPTIONS} .if defined(WITH_${var}) && defined(WITHOUT_${var}) -.error WITH_${var} and WITHOUT_${var} can't both be set. +.warning both WITH_${var} and WITHOUT_${var} set; WITHOUT_${var} wins. .endif .if defined(MK_${var}) .error MK_${var} can't be set by a user. @@ -487,12 +487,12 @@ MK_${var}:= yes # .for var in ${__DEFAULT_NO_OPTIONS} .if defined(WITH_${var}) && defined(WITHOUT_${var}) -.error WITH_${var} and WITHOUT_${var} can't both be set. +.warning both WITH_${var} and WITHOUT_${var} set; WITHOUT_${var} wins. .endif .if defined(MK_${var}) .error MK_${var} can't be set by a user. .endif -.if defined(WITH_${var}) +.if defined(WITH_${var}) && !defined(WITHOUT_${var}) MK_${var}:= yes .else MK_${var}:= no @@ -609,7 +609,7 @@ MK_CLANG_IS_CC:= no PAM \ WIRELESS .if defined(WITH_${var}_SUPPORT) && defined(WITHOUT_${var}_SUPPORT) -.error WITH_${var}_SUPPORT and WITHOUT_${var}_SUPPORT can't both be set. +.warning both WITH_${var}_SUPPORT and WITHOUT_${var}_SUPPORT set; WITHOUT_${var}_SUPPORT wins. .endif .if defined(MK_${var}_SUPPORT) .error MK_${var}_SUPPORT can't be set by a user. @@ -628,15 +628,15 @@ MK_${var}_SUPPORT:= yes GSSAPI/KERBEROS \ MAN_UTILS/MAN .if defined(WITH_${vv:H}) && defined(WITHOUT_${vv:H}) -.error WITH_${vv:H} and WITHOUT_${vv:H} can't both be set. +.warning both WITH_${vv:H} and WITHOUT_${vv:H} set; WITHOUT_${vv:H} wins. .endif .if defined(MK_${vv:H}) .error MK_${vv:H} can't be set by a user. .endif -.if defined(WITH_${vv:H}) +.if defined(WITHOUT_${vv:H}) +MK_${vv:H}:= no +.elif defined(WITH_${vv:H}) MK_${vv:H}:= yes -.elif defined(WITHOUT_${vv:H}) -MK_${vv:H}:= no .else MK_${vv:H}:= ${MK_${vv:T}} .endif @@ -649,7 +649,7 @@ MK_${vv:H}:= ${MK_${vv:T}} .for var in \ LIBCPLUSPLUS .if defined(WITH_${var}) && defined(WITHOUT_${var}) -.error WITH_${var} and WITHOUT_${var} can't both be set. +.warning both WITH_${var} and WITHOUT_${var} set; WITHOUT_${var} wins. .endif .if defined(MK_${var}) .error MK_${var} can't be set by a user. @@ -661,7 +661,7 @@ MK_${var}:= no MK_${var}:= yes .endif .else -.if defined(WITH_${var}) +.if defined(WITH_${var}) && !defined(WITHOUT_${var}) MK_${var}:= yes .else MK_${var}:= no