diff options
author | kwm <kwm@df743ca5-7f9a-e211-a948-0013205c9059> | 2012-12-10 21:04:31 +0800 |
---|---|---|
committer | kwm <kwm@df743ca5-7f9a-e211-a948-0013205c9059> | 2012-12-10 21:04:31 +0800 |
commit | 25378134a2a2e3d620105cd08945d00ef401021a (patch) | |
tree | 9ec00962ccfa8460b593c95fba5623dc06b27927 /Mk | |
parent | ef328dcfa9ee05625bea60bb6e2317e2653bf1a5 (diff) | |
download | marcuscom-ports-experimental-25378134a2a2e3d620105cd08945d00ef401021a.tar.gz marcuscom-ports-experimental-25378134a2a2e3d620105cd08945d00ef401021a.tar.zst marcuscom-ports-experimental-25378134a2a2e3d620105cd08945d00ef401021a.zip |
Sync with ports.
git-svn-id: svn://creme-brulee.marcuscom.com/ports-experimental/trunk@17502 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'Mk')
-rw-r--r-- | Mk/bsd.port.mk | 100 |
1 files changed, 96 insertions, 4 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index 04e6634..3f5295b 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -1,7 +1,7 @@ #-*- tab-width: 4; -*- # ex:ts=4 # -# $FreeBSD: head/Mk/bsd.port.mk 305677 2012-10-10 18:20:21Z beat $ +# $FreeBSD: head/Mk/bsd.port.mk 308603 2012-12-10 12:46:43Z kwm $ # $NetBSD: $ # # bsd.port.mk - 940820 Jordan K. Hubbard. @@ -3321,6 +3321,7 @@ DEPENDS_ARGS+= NOCLEANDEPENDS=yes # ################################################################ .if ((!defined(OPTIONS_DEFINE) && !defined(OPTIONS_SINGLE) && !defined(OPTIONS_MULTI)) \ + && !defined(OPTIONS_GROUP) && !defined(OPTIONS_RADIO) \ || defined(CONFIG_DONE_${UNIQUENAME:U}) || \ defined(PACKAGE_BUILDING) || defined(BATCH)) _OPTIONS_OK=yes @@ -6016,6 +6017,19 @@ OPTIONS_WRONG_SINGLE+= ${single} .endfor .undef single +.for radio in ${OPTIONS_RADIO} +. for opt in ${OPTIONS_RADIO_${radio}} +. if !empty(PORT_OPTIONS:M${opt}) +. if defined(OPTFOUND) +OPTIONS_WRONG_RADIO+= ${radio} +. else +OPTFOUND= true +. endif +. endif +. endfor +. undef OPTFOUND +.endfor + .for multi in ${OPTIONS_MULTI} . for opt in ${OPTIONS_MULTI_${multi}} . if empty(ALL_OPTIONS:M${multi}) || !empty(PORT_OPTIONS:M${multi}) @@ -6047,7 +6061,10 @@ _check-config: pre-check-config .for single in ${OPTIONS_WRONG_SINGLE} @${ECHO_MSG} "====> You must select one and only one option from the ${single} single" .endfor -.if !empty(OPTIONS_WRONG_MULTI) || !empty(OPTIONS_WRONG_SINGLE) +.for radio in ${OPTIONS_WRONG_RADIO} + @${ECHO_MSG} "====> You cannot select multiple options from the ${radio} radio" +.endfor +.if !empty(OPTIONS_WRONG_MULTI) || !empty(OPTIONS_WRONG_SINGLE) || !empty(OPTIONS_WRONG_RADIO) _CHECK_CONFIG_ERROR= true .endif .endif # _check-config @@ -6099,14 +6116,33 @@ DEFOPTIONS+= ${opt} "S(${single}): "${${opt}_DESC:Q} on . endif . endfor .endfor +.for radio in ${OPTIONS_RADIO} +. for opt in ${OPTIONS_RADIO_${radio}} +. if empty(PORT_OPTIONS:M${opt}) +DEFOPTIONS+= ${opt} "R(${radio}): "${${opt}_DESC:Q} off +. else +DEFOPTIONS+= ${opt} "R(${radio}): "${${opt}_DESC:Q} on +. endif +. endfor +.endfor +.for group in ${OPTIONS_GROUP} +. for opt in ${OPTIONS_GROUP_${group}} +. if empty(PORT_OPTIONS:M${opt}) +DEFOPTIONS+= ${opt} "G(${group}): "${${opt}_DESC:Q} off +. else +DEFOPTIONS+= ${opt} "G(${group}): "${${opt}_DESC:Q} on +. endif +. endfor +.endfor .undef multi .undef single +.undef group .undef opt .endif # pre-config .if !target(do-config) do-config: -.if empty(ALL_OPTIONS) && empty(OPTIONS_SINGLE) && empty(OPTIONS_MULTI) +.if empty(ALL_OPTIONS) && empty(OPTIONS_SINGLE) && empty(OPTIONS_MULTI) && empty(OPTIONS_RADIO) && empty(OPTIONS_GROUP) @${ECHO_MSG} "===> No options to configure" .else .if ${UID} != 0 && !defined(INSTALL_AS_USER) @@ -6182,7 +6218,7 @@ config-conditional: pre-config .if !target(showconfig) .include "${PORTSDIR}/Mk/bsd.options.desc.mk" showconfig: -.if !empty(ALL_OPTIONS) || !empty(OPTIONS_SINGLE) || !empty(OPTIONS_MULTI) +.if !empty(ALL_OPTIONS) || !empty(OPTIONS_SINGLE) || !empty(OPTIONS_MULTI) || !empty(OPTIONS_RADIO) || !empty(OPTIONS_GROUP) @${ECHO_MSG} "===> The following configuration options are available for ${PKGNAME}": .for opt in ${ALL_OPTIONS} . if empty(PORT_OPTIONS:M${opt}) @@ -6227,8 +6263,40 @@ showconfig: . endfor .endfor +.for radio in ${OPTIONS_RADIO} + @${ECHO_MSG} "====> Options available for the radio ${radio}: you can only select none or one of them" +. for opt in ${OPTIONS_RADIO_${radio}} +. if empty(PORT_OPTIONS:M${opt}) + @${ECHO_MSG} -n " ${opt}=off" +. else + @${ECHO_MSG} -n " ${opt}=on" +. endif +. if !empty(${opt}_DESC) + @${ECHO_MSG} -n ": "${${opt}_DESC:Q} +. endif + @${ECHO_MSG} "" +. endfor +.endfor + +.for group in ${OPTIONS_GROUP} + @${ECHO_MSG} "====> Options available for the group ${group}" +. for opt in ${OPTIONS_GROUP_${group}} +. if empty(PORT_OPTIONS:M${opt}) + @${ECHO_MSG} -n " ${opt}=off" +. else + @${ECHO_MSG} -n " ${opt}=on" +. endif +. if !empty(${opt}_DESC) + @${ECHO_MSG} -n ": "${${opt}_DESC:Q} +. endif + @${ECHO_MSG} "" +. endfor +.endfor + .undef multi .undef single +.undef radio +.undef group .undef opt @${ECHO_MSG} "===> Use 'make config' to modify these settings" .endif @@ -6300,8 +6368,32 @@ pretty-print-config: . endfor @${ECHO_MSG} -n ") " .endfor +.for radio in ${OPTIONS_RADIO} + @${ECHO_MSG} -n "${radio}( " +. for opt in ${OPTIONS_RADIO_${radio}} +. if empty(PORT_OPTIONS:M${opt}) + @${ECHO_MSG} -n "-${opt} " +. else + @${ECHO_MSG} -n "+${opt} " +. endif +. endfor + @${ECHO_MSG} -n ") " +.endfor +.for group in ${OPTIONS_GROUP} + @${ECHO_MSG} -n "${group}[ " +. for opt in ${OPTIONS_GROUP_${group}} +. if empty(PORT_OPTIONS:M${opt}) + @${ECHO_MSG} -n "-${opt} " +. else + @${ECHO_MSG} -n "+${opt} " +. endif +. endfor + @${ECHO_MSG} -n "] " +.endfor .undef multi .undef single +.undef radio +.undef group .undef opt @${ECHO_MSG} "" .endif # pretty-print-config |