Page MenuHomeFreeBSD

mk: WITH_FOO=no now generates a warning
ClosedPublic

Authored by imp on Jun 7 2021, 8:00 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 13, 8:34 PM
Unknown Object (File)
Wed, Nov 13, 8:27 PM
Unknown Object (File)
Tue, Nov 12, 12:52 AM
Unknown Object (File)
Wed, Oct 30, 9:55 AM
Unknown Object (File)
Oct 4 2024, 7:26 AM
Unknown Object (File)
Oct 4 2024, 5:43 AM
Unknown Object (File)
Oct 4 2024, 1:26 AM
Unknown Object (File)
Oct 1 2024, 11:14 PM

Details

Summary

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.

MFC After: 2 weeks
Sponsored by: Netflix

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

imp requested review of this revision.Jun 7 2021, 8:00 PM
This revision is now accepted and ready to land.Jun 7 2021, 8:01 PM
manu added inline comments.
share/mk/bsd.mkopt.mk
40

If you put -D at one place you should put it in the other.
But I think that we shouldn't .warning with -D here, as we have redirected people to use src.conf for a long time now.

This revision now requires review to proceed.Jun 7 2021, 9:01 PM

tweak warning message, per manu@

imp marked an inline comment as done.Jun 7 2021, 9:03 PM
imp added inline comments.
share/mk/bsd.mkopt.mk
40

sure. updated comment

share/mk/bsd.mkopt.mk
61

There is a '-' that shouldn't be there :)

share/mk/bsd.mkopt.mk
40

Doesn't WITHOUT_FOO=<yes> perpetuate the wrong idea?

63

What if they have WITHOUT_FOO=no?

imp marked an inline comment as done.

better message

share/mk/bsd.mkopt.mk
40

changed it to be generic.

63

I'm unsure on this point. WITHOUT_FOO=yes and WITHOUT_FOO=no both make sense to enable it depending on your world view, which is likely informed by your native language is. In Spanish, double negatives are still negative, so that construct makes sense and =yes is weird. English speakers, on the other hand, would think WITHOUT_FOO=no is negating it so it should enable.

WITH_FOO=no, though, never makes sense and is a common idiom for WITHOUT_FOO in other contexts...

So I'm unsure what to do about the WITHOUT_FOO case.

This revision is now accepted and ready to land.Jun 9 2021, 4:38 PM
This revision was automatically updated to reflect the committed changes.