aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2013-06-10 14:30:30 +0800
committerbapt <bapt@FreeBSD.org>2013-06-10 14:30:30 +0800
commitd7dc056ad3117109e4bcf2e1ecdfd58ef7252a47 (patch)
treee38df335ccb485b305a575407f50fc4adf7e3299 /Mk
parentc16683529894933c611cdf847c23ee6ecdefb096 (diff)
downloadfreebsd-ports-gnome-d7dc056ad3117109e4bcf2e1ecdfd58ef7252a47.tar.gz
freebsd-ports-gnome-d7dc056ad3117109e4bcf2e1ecdfd58ef7252a47.tar.zst
freebsd-ports-gnome-d7dc056ad3117109e4bcf2e1ecdfd58ef7252a47.zip
Factorise make pretty-print-config code
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.port.mk63
1 files changed, 19 insertions, 44 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 8744f88111ee..1841fc7f5371 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -6222,10 +6222,10 @@ showconfig:
@${ECHO_MSG} "====> ${${m}_DESC}${${otype}_EOL}"
. endif
. for opt in ${OPTIONS_${otype}_${m}}
-. if empty(PORT_OPTIONS:M${opt})
- @${ECHO_MSG} -n " ${opt}=off"
-. else
+. if ${PORT_OPTIONS:M${opt}}
@${ECHO_MSG} -n " ${opt}=on"
+. else
+ @${ECHO_MSG} -n " ${opt}=off"
. endif
. if !empty(${opt}_DESC)
@${ECHO_MSG} -n ": "${${opt}_DESC:Q}
@@ -6278,6 +6278,14 @@ rmconfig-recursive:
.endif # rmconfig-recursive
.if !target(pretty-print-config)
+MULTI_START= [
+MULTI_END= ]
+GROUP_START= [
+GROUP_END= ]
+SINGLE_START= (
+SINGLE_END= )
+RADIO_START= (
+RADIO_END= )
pretty-print-config:
.for opt in ${ALL_OPTIONS}
. if empty(PORT_OPTIONS:M${opt})
@@ -6286,54 +6294,21 @@ pretty-print-config:
@${ECHO_MSG} -n "+${opt} "
. endif
.endfor
-.for multi in ${OPTIONS_MULTI}
- @${ECHO_MSG} -n "${multi}[ "
-. for opt in ${OPTIONS_MULTI_${multi}}
-. if empty(PORT_OPTIONS:M${opt})
- @${ECHO_MSG} -n "-${opt} "
-. else
+.for otype in MULTI GROUP SINGLE RADIO
+. for m in ${OPTIONS_${otype}}
+ @${ECHO_MSG} -n "${m}${${otype}_START} "
+. for opt in ${OPTIONS_${otype}_${m}}
+. if ${PORT_OPTIONS:M${opt}}
@${ECHO_MSG} -n "+${opt} "
-. endif
-. endfor
- @${ECHO_MSG} -n "] "
-.endfor
-.for single in ${OPTIONS_SINGLE}
- @${ECHO_MSG} -n "${single}( "
-. for opt in ${OPTIONS_SINGLE_${single}}
-. if empty(PORT_OPTIONS:M${opt})
- @${ECHO_MSG} -n "-${opt} "
. else
- @${ECHO_MSG} -n "+${opt} "
-. endif
-. 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
+ @${ECHO_MSG} -n "${${otype}_END} "
. endfor
- @${ECHO_MSG} -n "] "
.endfor
-.undef multi
-.undef single
-.undef radio
-.undef group
+.undef otype
+.undef m
.undef opt
@${ECHO_MSG} ""
.endif # pretty-print-config