Page MenuHomeFreeBSD

mk: WITH_FOO=no now generates a warning
ClosedPublic

Authored by imp on Mon, Jun 7, 8:00 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
R10 FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

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

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.Mon, Jun 7, 9:01 PM

tweak warning message, per manu@

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

sure. updated comment

share/mk/bsd.mkopt.mk
60

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

share/mk/bsd.mkopt.mk
39

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
39

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.Wed, Jun 9, 4:38 PM
This revision was automatically updated to reflect the committed changes.