From owner-svn-ports-all@FreeBSD.ORG Mon Jun 10 06:30:30 2013 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id C2769EBE; Mon, 10 Jun 2013 06:30:30 +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 9A7281D5A; Mon, 10 Jun 2013 06:30:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5A6UU2N053042; Mon, 10 Jun 2013 06:30:30 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5A6UUF9053041; Mon, 10 Jun 2013 06:30:30 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201306100630.r5A6UUF9053041@svn.freebsd.org> From: Baptiste Daroussin Date: Mon, 10 Jun 2013 06:30:30 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r320436 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2013 06:30:30 -0000 Author: bapt Date: Mon Jun 10 06:30:30 2013 New Revision: 320436 URL: http://svnweb.freebsd.org/changeset/ports/320436 Log: Factorise make pretty-print-config code Modified: head/Mk/bsd.port.mk Modified: head/Mk/bsd.port.mk ============================================================================== --- head/Mk/bsd.port.mk Mon Jun 10 06:22:49 2013 (r320435) +++ head/Mk/bsd.port.mk Mon Jun 10 06:30:30 2013 (r320436) @@ -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