From owner-svn-ports-head@FreeBSD.ORG Mon Jul 16 22:36:45 2012 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5B52D106564A; Mon, 16 Jul 2012 22:36:45 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 461B88FC12; Mon, 16 Jul 2012 22:36:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6GMajqa089663; Mon, 16 Jul 2012 22:36:45 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6GMajsC089660; Mon, 16 Jul 2012 22:36:45 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201207162236.q6GMajsC089660@svn.freebsd.org> From: Baptiste Daroussin Date: Mon, 16 Jul 2012 22:36:45 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r300983 - head/Mk X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.5 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, 16 Jul 2012 22:36:45 -0000 Author: bapt Date: Mon Jul 16 22:36:44 2012 New Revision: 300983 URL: http://svn.freebsd.org/changeset/ports/300983 Log: compare options loading from /var/db/port/options and make.conf against the complete list of options. COMPLETE_OPTIONS_LIST being OPTIONS_DEFINE + all the OPTIONS_SINGLE_* + all the OPTIONS_MULTI_* Modified: head/Mk/bsd.options.mk head/Mk/bsd.port.mk Modified: head/Mk/bsd.options.mk ============================================================================== --- head/Mk/bsd.options.mk Mon Jul 16 20:42:38 2012 (r300982) +++ head/Mk/bsd.options.mk Mon Jul 16 22:36:44 2012 (r300983) @@ -117,6 +117,15 @@ PORT_OPTIONS:= ${PORT_OPTIONS:N${O}} ALL_OPTIONS:= ${ALL_OPTIONS:O:u} +# complete list +COMPLETE_OPTIONS_LIST= ${ALL_OPTIONS} +.for single in ${OPTIONS_SINGLE} +COMPLETE_OPTIONS_LIST+= ${OPTIONS_SINGLE_${single}} +.endfor +.for multi in ${OPTIONS_MULTI} +COMPLETE_OPTIONS_LIST+= ${OPTIONS_MULTI_${multi}} +.endfor + ## Now create the list of activated options .if defined(OPTIONS_OVERRIDE) # Special case $OPTIONS_OVERRIDE; if it is defined forget about anything done @@ -132,7 +141,7 @@ PORT_OPTIONS:= ${PORT_OPTIONS:O:u} ## Set system-wide defined options (set by user in make.conf) . for opt in ${OPTIONS_SET} -. if !empty(OPTIONS_DEFINE:M${opt}) +. if !empty(COMPLETE_OPTIONS_LIST:M${opt}) PORT_OPTIONS+= ${opt} . endif . endfor @@ -145,7 +154,7 @@ PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} ## Set the options specified per-port (set by user in make.conf) . for opt in ${${UNIQUENAME}_SET} -. if !empty(OPTIONS_DEFINE:M${opt}) +. if !empty(COMPLETE_OPTIONS_LIST:M${opt}) PORT_OPTIONS+= ${opt} . endif . endfor @@ -177,7 +186,7 @@ PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} ## Finish by using the options set by the port config dialog, if any . for opt in ${OPTIONS_FILE_SET} -. if !empty(OPTIONS_DEFINE:M${opt}) +. if !empty(COMPLETE_OPTIONS_LIST:M${opt}) PORT_OPTIONS+= ${opt} . endif . endfor Modified: head/Mk/bsd.port.mk ============================================================================== --- head/Mk/bsd.port.mk Mon Jul 16 20:42:38 2012 (r300982) +++ head/Mk/bsd.port.mk Mon Jul 16 22:36:44 2012 (r300983) @@ -6004,7 +6004,6 @@ sanity-config: _check-config .if !target(pre-config) pre-config: -_COMPLETE_OPTIONS_LIST:= ${ALL_OPTIONS} .for opt in ${ALL_OPTIONS} . if empty(PORT_OPTIONS:M${opt}) DEFOPTIONS+= ${opt} ""${${opt}_DESC:Q} off @@ -6014,7 +6013,6 @@ DEFOPTIONS+= ${opt} ""${${opt}_DESC:Q} o .endfor .for multi in ${OPTIONS_MULTI} . for opt in ${OPTIONS_MULTI_${multi}} -_COMPLETE_OPTIONS_LIST+= ${opt} . if empty(PORT_OPTIONS:M${opt}) DEFOPTIONS+= ${opt} "M(${multi}): "${${opt}_DESC:Q} off . else @@ -6024,7 +6022,6 @@ DEFOPTIONS+= ${opt} "M(${multi}): "${ .endfor .for single in ${OPTIONS_SINGLE} . for opt in ${OPTIONS_SINGLE_${single}} -_COMPLETE_OPTIONS_LIST+= ${opt} . if empty(PORT_OPTIONS:M${opt}) DEFOPTIONS+= ${opt} "S(${single}): "${${opt}_DESC:Q} off . else @@ -6032,8 +6029,6 @@ DEFOPTIONS+= ${opt} "S(${single}): "${${ . endif . endfor .endfor - -_COMPLETE_OPTIONS_LIST:= ${_COMPLETE_OPTIONS_LIST:u} .undef multi .undef single .undef opt @@ -6073,8 +6068,8 @@ config: pre-config ${ECHO_CMD} "# This file is auto-generated by 'make config'." > $${TMPOPTIONSFILE}; \ ${ECHO_CMD} "# Options for ${PKGNAME}" >> $${TMPOPTIONSFILE}; \ ${ECHO_CMD} "_OPTIONS_READ=${PKGNAME}" >> $${TMPOPTIONSFILE}; \ - ${ECHO_CMD} "_FILE_COMPLETE_OPTIONS_LIST=${_COMPLETE_OPTIONS_LIST}" >> $${TMPOPTIONSFILE}; \ - for i in ${_COMPLETE_OPTIONS_LIST}; do \ + ${ECHO_CMD} "_FILE_COMPLETE_OPTIONS_LIST=${COMPLETE_OPTIONS_LIST}" >> $${TMPOPTIONSFILE}; \ + for i in ${COMPLETE_OPTIONS_LIST}; do \ if ${ECHO_CMD} $${SELOPTIONS} | ${GREP} -qw $${i}; then \ ${ECHO_CMD} "OPTIONS_FILE_SET+=$${i}" >> $${TMPOPTIONSFILE}; \ else \