From owner-svn-ports-head@FreeBSD.ORG Mon Jun 10 06:22:49 2013 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id CC042D8E; Mon, 10 Jun 2013 06:22:49 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id AE87D1D31; Mon, 10 Jun 2013 06:22:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5A6Mnr7050480; Mon, 10 Jun 2013 06:22:49 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5A6MnFo050479; Mon, 10 Jun 2013 06:22:49 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201306100622.r5A6MnFo050479@svn.freebsd.org> From: Baptiste Daroussin Date: Mon, 10 Jun 2013 06:22:49 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r320435 - head/Mk X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2013 06:22:49 -0000 Author: bapt Date: Mon Jun 10 06:22:49 2013 New Revision: 320435 URL: http://svnweb.freebsd.org/changeset/ports/320435 Log: Show options group descriptions in make showconfig, While here, factorize code Modified: head/Mk/bsd.port.mk Modified: head/Mk/bsd.port.mk ============================================================================== --- head/Mk/bsd.port.mk Mon Jun 10 06:06:03 2013 (r320434) +++ head/Mk/bsd.port.mk Mon Jun 10 06:22:49 2013 (r320435) @@ -6195,6 +6195,9 @@ config-conditional: pre-config .if !target(showconfig) .include "${PORTSDIR}/Mk/bsd.options.desc.mk" +MULTI_EOL= ": you have to choose at least one of them" +SINGLE_EOL= ": you have to select exactly one of them" +RADIO_EOL= ": you can only select none or one of them" showconfig: .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}": @@ -6209,72 +6212,31 @@ showconfig: . endif @${ECHO_MSG} "" .endfor -#multi and conditional multis -.for multi in ${OPTIONS_MULTI} - @${ECHO_MSG} "====> Options available for the multi ${multi}: you have to choose at least one of them" -. for opt in ${OPTIONS_MULTI_${multi}} -. 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 -#single and conditional singles - -.for single in ${OPTIONS_SINGLE} - @${ECHO_MSG} "====> Options available for the single ${single}: you have to select exactly one of them" -. for opt in ${OPTIONS_SINGLE_${single}} -. 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 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" +#multi and conditional multis +.for otype in MULTI GROUP SINGLE RADIO +. for m in ${OPTIONS_${otype}} +. if empty(${m}_DESC) + @${ECHO_MSG} "====> Options available for the ${otype:L} ${m}${${otype}_EOL}" . else - @${ECHO_MSG} -n " ${opt}=on" -. endif -. if !empty(${opt}_DESC) - @${ECHO_MSG} -n ": "${${opt}_DESC:Q} + @${ECHO_MSG} "====> ${${m}_DESC}${${otype}_EOL}" . 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}) +. for opt in ${OPTIONS_${otype}_${m}} +. if empty(PORT_OPTIONS:M${opt}) @${ECHO_MSG} -n " ${opt}=off" -. else +. else @${ECHO_MSG} -n " ${opt}=on" -. endif -. if !empty(${opt}_DESC) +. endif +. if !empty(${opt}_DESC) @${ECHO_MSG} -n ": "${${opt}_DESC:Q} -. endif +. endif @${ECHO_MSG} "" +. endfor . endfor .endfor -.undef multi -.undef single -.undef radio -.undef group +.undef otype +.undef m .undef opt @${ECHO_MSG} "===> Use 'make config' to modify these settings" .endif