diff options
author | bapt <bapt@FreeBSD.org> | 2012-05-29 19:49:10 +0800 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2012-05-29 19:49:10 +0800 |
commit | 0469774f244ce387d421eb032ff0d306c3790622 (patch) | |
tree | 81e0dd45528c6c97c9148c84264f5ec22f5c471a /Mk/bsd.options.mk | |
parent | 6b68f1849c7790db07a7edc6691ded6f87da4f6c (diff) | |
download | freebsd-ports-graphics-0469774f244ce387d421eb032ff0d306c3790622.tar.gz freebsd-ports-graphics-0469774f244ce387d421eb032ff0d306c3790622.tar.zst freebsd-ports-graphics-0469774f244ce387d421eb032ff0d306c3790622.zip |
recreate the WITH_/WITHOUT_ options for compatibility
Diffstat (limited to 'Mk/bsd.options.mk')
-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 +### |