From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Aug 29 15:10:02 2012 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E1FF106566B for ; Wed, 29 Aug 2012 15:10:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 418FA8FC1C for ; Wed, 29 Aug 2012 15:10:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q7TFA2sW087175 for ; Wed, 29 Aug 2012 15:10:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q7TFA21i087174; Wed, 29 Aug 2012 15:10:02 GMT (envelope-from gnats) Resent-Date: Wed, 29 Aug 2012 15:10:02 GMT Resent-Message-Id: <201208291510.q7TFA21i087174@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "A.J. Kehoe IV (Nanoman)" Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 46E361065677 for ; Wed, 29 Aug 2012 15:02:18 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 31D2E8FC1E for ; Wed, 29 Aug 2012 15:02:18 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q7TF2Hos043976 for ; Wed, 29 Aug 2012 15:02:17 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id q7TF2Hap043975; Wed, 29 Aug 2012 15:02:17 GMT (envelope-from nobody) Message-Id: <201208291502.q7TF2Hap043975@red.freebsd.org> Date: Wed, 29 Aug 2012 15:02:17 GMT From: "A.J. Kehoe IV (Nanoman)" To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/171161: [patch] Target pre-config Only Once During config-conditional in Mk/bsd.port.mk X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Aug 2012 15:10:02 -0000 >Number: 171161 >Category: ports >Synopsis: [patch] Target pre-config Only Once During config-conditional in Mk/bsd.port.mk >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Aug 29 15:10:01 UTC 2012 >Closed-Date: >Last-Modified: >Originator: A.J. Kehoe IV (Nanoman) >Release: 9.0 >Organization: Nanoman's Company >Environment: FreeBSD localhost 9.0-RELEASE-p3 FreeBSD 9.0-RELEASE-p3 #0: Tue Jun 12 02:52:29 UTC 2012 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 >Description: In Mk/bsd.port.mk, when "config-conditional" targets "config", the "pre-config" target is called a second time unnecessarily. This doesn't appear to be causing any problems, but it's a little inefficient. >How-To-Repeat: >Fix: I've attached a patch with the following changes: - rename "config" to "do-config" - remove "pre-config" from "do-config" - create a new "config" target that targets "pre-config" and then "do-config" - in "config-conditional", change "config" to "do-config" Patch attached with submission follows: --- ports/Mk/bsd.port.mk.old 2012-08-21 13:29:11.000000000 -0400 +++ ports/Mk/bsd.port.mk 2012-08-29 10:59:09.308544000 -0400 @@ -6056,8 +6056,8 @@ .undef opt .endif # pre-config -.if !target(config) -config: pre-config +.if !target(do-config) +do-config: .if empty(ALL_OPTIONS) && empty(OPTIONS_SINGLE) && empty(OPTIONS_MULTI) @${ECHO_MSG} "===> No options to configure" .else @@ -6108,6 +6108,10 @@ ${RM} -f $${TMPOPTIONSFILE} @cd ${.CURDIR} && ${MAKE} sanity-config .endif +.endif # do-config + +.if !target(config) +config: pre-config do-config .endif # config .if !target(config-recursive) @@ -6122,7 +6126,7 @@ config-conditional: pre-config .if defined(COMPLETE_OPTIONS_LIST) && !defined(NO_DIALOG) . if !defined(_FILE_COMPLETE_OPTIONS_LIST) || ${COMPLETE_OPTIONS_LIST:O} != ${_FILE_COMPLETE_OPTIONS_LIST:O} - @cd ${.CURDIR} && ${MAKE} config; + @cd ${.CURDIR} && ${MAKE} do-config; . endif .endif .endif # config-conditional >Release-Note: >Audit-Trail: >Unformatted: