From owner-freebsd-ports@FreeBSD.ORG Fri Sep 19 21:36:37 2008 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F1F1106567B for ; Fri, 19 Sep 2008 21:36:37 +0000 (UTC) (envelope-from ale@FreeBSD.org) Received: from lab.alexdupre.com (cl-506.trn-01.it.sixxs.net [IPv6:2001:1418:100:1f9::2]) by mx1.freebsd.org (Postfix) with ESMTP id 54B568FC13 for ; Fri, 19 Sep 2008 21:36:36 +0000 (UTC) (envelope-from ale@FreeBSD.org) Received: (qmail 62911 invoked from network); 19 Sep 2008 21:36:35 -0000 Received: from unknown (HELO athlon.alexdupre.com) (192.168.178.2) by lab.alexdupre.com with SMTP; 19 Sep 2008 21:36:35 -0000 Message-ID: <48D41B62.90603@FreeBSD.org> Date: Fri, 19 Sep 2008 23:36:34 +0200 From: Alex Dupre User-Agent: Thunderbird 2.0.0.16 (X11/20080726) MIME-Version: 1.0 To: John Baldwin References: <200809151036.19674.jhb@freebsd.org> <48D03248.1040109@FreeBSD.org> <48D0A683.9020802@FreeBSD.org> <200809171303.05759.jhb@freebsd.org> <48D2167F.3040203@FreeBSD.org> In-Reply-To: <48D2167F.3040203@FreeBSD.org> Content-Type: multipart/mixed; boundary="------------000009000709080705080502" Cc: ports@freebsd.org, Doug Barton Subject: Re: OPTIONS handling doesn't seem to work fully in dependencies anymore X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Sep 2008 21:36:37 -0000 This is a multi-part message in MIME format. --------------000009000709080705080502 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Alex Dupre wrote: > The attached patch should solve this erratic behavior. Another quick patch, that removes handling OPTIONS as a special case. -- Alex Dupre --------------000009000709080705080502 Content-Type: text/plain; name="bsd.port.mk.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="bsd.port.mk.diff" --- bsd.port.mk.orig 2008-09-19 23:15:37.000000000 +0200 +++ bsd.port.mk 2008-09-19 23:29:30.000000000 +0200 @@ -3229,17 +3229,6 @@ .endif ################################################################ -# -# Do preliminary work to detect if we need to run the config -# target or not. -# -################################################################ -.if (!defined(OPTIONS) || defined(CONFIG_DONE) || \ - defined(PACKAGE_BUILDING) || defined(BATCH)) -_OPTIONS_OK=yes -.endif - -################################################################ # The following are used to create easy dummy targets for # disabling some bit of default target behavior you don't want. # They still check to see if the target exists, and if so don't @@ -4114,7 +4103,7 @@ _SANITY_SEQ= ${_CHROOT_SEQ} pre-everything check-makefile check-categories \ check-makevars check-desktop-entries check-depends \ check-deprecated check-vulnerable buildanyway-message \ - options-message + options-message config-conditional _FETCH_DEP= check-sanity _FETCH_SEQ= fetch-depends pre-fetch pre-fetch-script \ do-fetch post-fetch post-fetch-script @@ -4165,12 +4154,8 @@ .for target in extract patch configure build install package -.if !target(${target}) && defined(_OPTIONS_OK) +.if !target(${target}) ${target}: ${${target:U}_COOKIE} -.elif !target(${target}) -${target}: config-conditional - @cd ${.CURDIR} && ${MAKE} CONFIG_DONE=1 ${__softMAKEFLAGS} ${${target:U}_COOKIE} -.elif target(${target}) && defined(IGNORE) .endif .if !exists(${${target:U}_COOKIE}) @@ -5936,7 +5921,7 @@ .if !target(config-conditional) config-conditional: -.if defined(OPTIONS) +.if defined(OPTIONS) && !defined(PACKAGE_BUILDING) && !defined(BATCH) .if exists(${OPTIONSFILE}) # scan saved options and invalidate them, if the set of options does not match @. ${OPTIONSFILE}; \ --------------000009000709080705080502--