diff options
-rw-r--r-- | Mk/bsd.options.mk | 43 |
1 files changed, 41 insertions, 2 deletions
diff --git a/Mk/bsd.options.mk b/Mk/bsd.options.mk index 4a06a5c46a3..a8aa25c8c6c 100644 --- a/Mk/bsd.options.mk +++ b/Mk/bsd.options.mk @@ -144,5 +144,44 @@ NOPORTDOCS= yes WITHOUT_NLS= yes .endif - - +### to be removed once old OPTIONS disappear +.if defined(OPTIONS) +# include OPTIONSFILE first if exists +. if exists(${OPTIONSFILE}) && !make(rmconfig) +. include "${OPTIONSFILE}" +. endif +. if exists(${OPTIONSFILE}.local) +. include "${OPTIONSFILE}.local" +. endif +WITHOUT:= +WITH:= +. if defined(OPTIONS) +REALOPTIONS=${OPTIONS:C/".*"//g} +. for O in ${REALOPTIONS} +RO:=${O} +. if ${RO:L} == off +WITHOUT:= ${WITHOUT} ${OPT} +. endif +. if ${RO:L} == on +WITH:= ${WITH} ${OPT} +. endif +OPT:=${RO} +. endfor +. endif +# define only if NO WITH/WITHOUT_${W} is defined +. for W in ${WITH} +. if !defined(WITH_${W}) && !defined(WITHOUT_${W}) +WITH_${W}:= true +. endif +. endfor +. for W in ${WITHOUT} +. if !defined(WITH_${W}) && !defined(WITHOUT_${W}) +WITHOUT_${W}:= true +. endif +. endfor +. undef WITH +. undef WITHOUT +. undef RO +. undef REALOPTIONS +.endif +### |