Changeset View
Changeset View
Standalone View
Standalone View
share/mk/bsd.mkopt.mk
Show All 30 Lines | |||||
# user's desires or default behavior. | # user's desires or default behavior. | ||||
# | # | ||||
# | # | ||||
# MK_* options which default to "yes". | # MK_* options which default to "yes". | ||||
# | # | ||||
.for var in ${__DEFAULT_YES_OPTIONS} | .for var in ${__DEFAULT_YES_OPTIONS} | ||||
.if !defined(MK_${var}) | .if !defined(MK_${var}) | ||||
.if defined(WITH_${var}) && ${WITH_${var}} == "no" | |||||
.warning "Use -DWITHOUT_${var} insetad of WITH_${var}=no" | |||||
manu: If you put -D at one place you should put it in the other.
But I think that we shouldn't . | |||||
Done Inline Actionssure. updated comment imp: sure. updated comment | |||||
Not Done Inline ActionsDoesn't WITHOUT_FOO=<yes> perpetuate the wrong idea? bdrewery: Doesn't `WITHOUT_FOO=<yes>` perpetuate the wrong idea? | |||||
Done Inline Actionschanged it to be generic. imp: changed it to be generic. | |||||
.endif | |||||
.if defined(WITHOUT_${var}) # WITHOUT always wins | .if defined(WITHOUT_${var}) # WITHOUT always wins | ||||
MK_${var}:= no | MK_${var}:= no | ||||
.else | .else | ||||
MK_${var}:= yes | MK_${var}:= yes | ||||
.endif | .endif | ||||
.else | .else | ||||
.if ${MK_${var}} != "yes" && ${MK_${var}} != "no" | .if ${MK_${var}} != "yes" && ${MK_${var}} != "no" | ||||
.error "Illegal value for MK_${var}: ${MK_${var}}" | .error "Illegal value for MK_${var}: ${MK_${var}}" | ||||
.endif | .endif | ||||
.endif # !defined(MK_${var}) | .endif # !defined(MK_${var}) | ||||
.endfor | .endfor | ||||
.undef __DEFAULT_YES_OPTIONS | .undef __DEFAULT_YES_OPTIONS | ||||
# | # | ||||
# MK_* options which default to "no". | # MK_* options which default to "no". | ||||
# | # | ||||
.for var in ${__DEFAULT_NO_OPTIONS} | .for var in ${__DEFAULT_NO_OPTIONS} | ||||
.if !defined(MK_${var}) | .if !defined(MK_${var}) | ||||
.if defined(WITH_${var}) && ${WITH_${var}} == "no" | |||||
.warning "Use -DWITHOUT_${var} insetad of WITH_${var}=no" | |||||
Not Done Inline ActionsThere is a '-' that shouldn't be there :) manu: There is a '-' that shouldn't be there :) | |||||
.endif | |||||
.if defined(WITH_${var}) && !defined(WITHOUT_${var}) # WITHOUT always wins | .if defined(WITH_${var}) && !defined(WITHOUT_${var}) # WITHOUT always wins | ||||
Not Done Inline ActionsWhat if they have WITHOUT_FOO=no? bdrewery: What if they have `WITHOUT_FOO=no`? | |||||
Done Inline ActionsI'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. imp: I'm unsure on this point. WITHOUT_FOO=yes and WITHOUT_FOO=no both make sense to enable it… | |||||
MK_${var}:= yes | MK_${var}:= yes | ||||
.else | .else | ||||
MK_${var}:= no | MK_${var}:= no | ||||
.endif | .endif | ||||
.else | .else | ||||
.if ${MK_${var}} != "yes" && ${MK_${var}} != "no" | .if ${MK_${var}} != "yes" && ${MK_${var}} != "no" | ||||
.error "Illegal value for MK_${var}: ${MK_${var}}" | .error "Illegal value for MK_${var}: ${MK_${var}}" | ||||
.endif | .endif | ||||
Show All 25 Lines |
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.