Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Aug 2012 15:02:17 GMT
From:      "A.J. Kehoe IV (Nanoman)" <m7k60pkr@nanoman.ca>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/171161: [patch] Target pre-config Only Once During config-conditional in Mk/bsd.port.mk
Message-ID:  <201208291502.q7TF2Hap043975@red.freebsd.org>
Resent-Message-ID: <201208291510.q7TFA21i087174@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208291502.q7TF2Hap043975>