Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Oct 2012 10:48:53 -0500
From:      Brooks Davis <brooks@freebsd.org>
To:        Simon Gerraty <sjg@juniper.net>
Cc:        freebsd-arch@freebsd.org
Subject:   Re: bsd.own.mk - just let WITHOUT_* take precedence
Message-ID:  <20121008154853.GC23400@lor.one-eyed-alien.net>
In-Reply-To: <20121007001423.9878F58094@chaos.jnpr.net>
References:  <20121007001423.9878F58094@chaos.jnpr.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20121008154853.GC23400>