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)
Tue, Mar 19, 6:11 PM
Unknown Object (File)
Tue, Mar 19, 6:11 PM
Unknown Object (File)
Tue, Mar 19, 6:11 PM
Unknown Object (File)
Feb 2 2024, 11:46 AM
Unknown Object (File)
Dec 21 2023, 2:46 AM
Unknown Object (File)
Dec 20 2023, 1:59 AM
Unknown Object (File)
Oct 14 2023, 11:58 AM
Unknown Object (File)
Oct 14 2023, 11:57 AM

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
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 39782
Build 36671: arc lint + arc unit

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.