From owner-freebsd-arch@FreeBSD.ORG Mon Oct 8 15:48:55 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 C82B3106566B for ; Mon, 8 Oct 2012 15:48:55 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (lor.one-eyed-alien.net [69.66.77.232]) by mx1.freebsd.org (Postfix) with ESMTP id 705D18FC14 for ; Mon, 8 Oct 2012 15:48:54 +0000 (UTC) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.5/8.14.5) with ESMTP id q98FmrWq033779; Mon, 8 Oct 2012 10:48:53 -0500 (CDT) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.5/8.14.5/Submit) id q98Fmr9K033778; Mon, 8 Oct 2012 10:48:53 -0500 (CDT) (envelope-from brooks) Date: Mon, 8 Oct 2012 10:48:53 -0500 From: Brooks Davis To: Simon Gerraty Message-ID: <20121008154853.GC23400@lor.one-eyed-alien.net> References: <20121007001423.9878F58094@chaos.jnpr.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="TiqCXmo5T1hvSQQg" Content-Disposition: inline In-Reply-To: <20121007001423.9878F58094@chaos.jnpr.net> User-Agent: Mutt/1.5.21 (2010-09-15) 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 15:48:56 -0000 --TiqCXmo5T1hvSQQg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Oct 06, 2012 at 05:14:23PM -0700, Simon Gerraty wrote: > After being bitten by: >=20 > make: "/b/sjg/work/fbsd-head/src/share/mk/bsd.own.mk" line 490: WITH_CTF > and WITHOUT_CTF can't both be set. >=20 > I took a look at bsd.own.mk > I'm not sure what's so evil about setting both WITH_ and WITHOUT_ > especially when bits of buildworld, buildkernel etc, set WITHOUT_ > (which triggers the problem for me). >=20 > All that seems necessary is a clear rule - "WITHOUT_ wins". > Thus the patch below solve my problem. 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." :) I think we should at a minimum issue a warning and say what we did. It won't help a lot if the output is lost when running "make -j16 -DWITH_FOO buildworld", but at least we'll have told the user that their make.conf or src.conf setting was why the feature they turned on didn't work. 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. -- Brooks >=20 > Index: share/mk/bsd.own.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 > --- share/mk/bsd.own.mk (revision 241871) > +++ share/mk/bsd.own.mk (working copy) > @@ -468,9 +468,6 @@ __DEFAULT_NO_OPTIONS+=3DFDT > # MK_* options which default to "yes". > # > .for var in ${__DEFAULT_YES_OPTIONS} > -.if defined(WITH_${var}) && defined(WITHOUT_${var}) > -.error WITH_${var} and WITHOUT_${var} can't both be set. > -.endif > .if defined(MK_${var}) > .error MK_${var} can't be set by a user. > .endif > @@ -486,13 +483,10 @@ MK_${var}:=3D yes > # MK_* options which default to "no". > # > .for var in ${__DEFAULT_NO_OPTIONS} > -.if defined(WITH_${var}) && defined(WITHOUT_${var}) > -.error WITH_${var} and WITHOUT_${var} can't both be set. > -.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}:=3D yes > .else > MK_${var}:=3D no > _______________________________________________ > freebsd-arch@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arch > To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org" >=20 --TiqCXmo5T1hvSQQg Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iD8DBQFQcvXlXY6L6fI4GtQRAsRDAJsF2/I+qR4kRKEaNBnR/CGTxobrUQCg5ejk zBv6UkxkyG+7kWrV0hT1wao= =jGO3 -----END PGP SIGNATURE----- --TiqCXmo5T1hvSQQg--