Date: Fri, 14 Jun 2013 06:56:16 +0000 (UTC) From: Baptiste Daroussin <bapt@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r320886 - head/Mk Message-ID: <201306140656.r5E6uGpJ002770@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bapt Date: Fri Jun 14 06:56:16 2013 New Revision: 320886 URL: http://svnweb.freebsd.org/changeset/ports/320886 Log: Yes more simplification in showconfig, pretty-print-config and pkgng manifest generation Modified: head/Mk/bsd.pkgng.mk head/Mk/bsd.port.mk Modified: head/Mk/bsd.pkgng.mk ============================================================================== --- head/Mk/bsd.pkgng.mk Fri Jun 14 06:25:39 2013 (r320885) +++ head/Mk/bsd.pkgng.mk Fri Jun 14 06:56:16 2013 (r320886) @@ -83,11 +83,7 @@ fake-pkg: @${ECHO_CMD} "]" >> ${MANIFESTF} @${ECHO_CMD} -n "options: {" >> ${MANIFESTF} .for opt in ${COMPLETE_OPTIONS_LIST} -.if empty(PORT_OPTIONS:M${opt}) - @${ECHO_CMD} -n "${opt}: off," >> ${MANIFESTF} -.else - @${ECHO_CMD} -n "${opt}: on," >> ${MANIFESTF} -.endif + @[ -z "${PORT_OPTIONS:M${opt}}" ] || match="on" ; ${ECHO_MSG} -n " ${opt}: $${match:-off}," >> ${MANIFESTF} .endfor .undef opt @${ECHO_CMD} "}" >> ${MANIFESTF} Modified: head/Mk/bsd.port.mk ============================================================================== --- head/Mk/bsd.port.mk Fri Jun 14 06:25:39 2013 (r320885) +++ head/Mk/bsd.port.mk Fri Jun 14 06:56:16 2013 (r320886) @@ -6185,11 +6185,7 @@ showconfig: .if !empty(COMPLETE_OPTIONS_LIST) @${ECHO_MSG} "===> The following configuration options are available for ${PKGNAME}": .for opt in ${ALL_OPTIONS} -. if empty(PORT_OPTIONS:M${opt}) - @${ECHO_MSG} -n " ${opt}=off" -. else - @${ECHO_MSG} -n " ${opt}=on" -. endif + @[ -z "${PORT_OPTIONS:M${opt}}" ] || match="on" ; ${ECHO_MSG} -n " ${opt}=$${match:-off}" . if !empty(${opt}_DESC) @${ECHO_MSG} -n ": "${${opt}_DESC:Q} . endif @@ -6205,11 +6201,7 @@ showconfig: @${ECHO_MSG} "====> ${${m}_DESC}${${otype}_EOL}" . endif . for opt in ${OPTIONS_${otype}_${m}} -. if ${PORT_OPTIONS:M${opt}} - @${ECHO_MSG} -n " ${opt}=on" -. else - @${ECHO_MSG} -n " ${opt}=off" -. endif + @[ -z "${PORT_OPTIONS:M${opt}}" ] || match="on" ; ${ECHO_MSG} -n " ${opt}=$${match:-off}" . if !empty(${opt}_DESC) @${ECHO_MSG} -n ": "${${opt}_DESC:Q} . endif @@ -6271,22 +6263,14 @@ RADIO_START= ( RADIO_END= ) pretty-print-config: .for opt in ${ALL_OPTIONS} -. if empty(PORT_OPTIONS:M${opt}) - @${ECHO_MSG} -n "-${opt} " -. else - @${ECHO_MSG} -n "+${opt} " -. endif + @[ -z "${PORT_OPTIONS:M${opt}}" ] || match="+" ; ${ECHO_MSG} -n "$${match:--}${opt} " .endfor .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} " -. else - @${ECHO_MSG} -n "-${opt} " -. endif -. endfor + @[ -z "${PORT_OPTIONS:M${opt}}" ] || match="+" ; ${ECHO_MSG} -n "$${match:--}${opt} " +. endfor @${ECHO_MSG} -n "${${otype}_END} " . endfor .endfor
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201306140656.r5E6uGpJ002770>