From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Jan 14 20:10:35 2005 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 59D1716A4FC for ; Fri, 14 Jan 2005 20:10:35 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id B4B4243D53 for ; Fri, 14 Jan 2005 20:10:31 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id j0EKAVh8037826 for ; Fri, 14 Jan 2005 20:10:31 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id j0EKAVNq037825; Fri, 14 Jan 2005 20:10:31 GMT (envelope-from gnats) Resent-Date: Fri, 14 Jan 2005 20:10:31 GMT Resent-Message-Id: <200501142010.j0EKAVNq037825@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, Chris Dillon Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 436B716A4CE for ; Fri, 14 Jan 2005 20:04:02 +0000 (GMT) Received: from mail.wolves.k12.mo.us (duey.wolves.k12.mo.us [207.160.214.9]) by mx1.FreeBSD.org (Postfix) with ESMTP id 81B3143D4C for ; Fri, 14 Jan 2005 20:04:01 +0000 (GMT) (envelope-from root@wolves.k12.mo.us) Received: from localhost (localhost [127.0.0.1]) by mail.wolves.k12.mo.us (Postfix) with ESMTP id 2D56B1FE2E for ; Fri, 14 Jan 2005 14:04:01 -0600 (CST) Received: from mail.wolves.k12.mo.us ([127.0.0.1]) by localhost (mail.wolves.k12.mo.us [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 92560-01-49 for ; Fri, 14 Jan 2005 14:03:58 -0600 (CST) Received: by mail.wolves.k12.mo.us (Postfix, from userid 0) id A748F1FE2D; Fri, 14 Jan 2005 14:03:58 -0600 (CST) Message-Id: <20050114200358.A748F1FE2D@mail.wolves.k12.mo.us> Date: Fri, 14 Jan 2005 14:03:58 -0600 (CST) From: Chris Dillon To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: ports/76254: PATCH: Add config-recursive to bsd.port.mk X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Chris Dillon List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jan 2005 20:10:35 -0000 >Number: 76254 >Category: ports >Synopsis: PATCH: Add config-recursive to 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: Fri Jan 14 20:10:31 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Chris Dillon >Release: FreeBSD 4.11-STABLE i386 >Organization: >Environment: System: FreeBSD duey.wolves.k12.mo.us 4.11-STABLE FreeBSD 4.11-STABLE #0: Mon Dec 27 01:58:31 CST 2004 cdillon@duey.wolves.k12.mo.us:/usr/obj/usr/src/sys/DUEY i386 >Description: The attached patch adds config-recursive and rmconfig-recursive targets to bsd.port.mk, as well as another target called config-conditional which likely only config-recursive will use and is used to skip configuring ports which have already been configured. This allows, for example, the building of ports/x11/kde3 without needing to baby-sit it and wait for the configure menus to come up at various points in the build. With config-recursive, you can get all of that out of the way before you start the build. There is one caveat, however, and that is you must run config-recursive multiple times on ports with very large dependancy chains like KDE3 because you are likely to lengthen the dependancy chain in the act of configuring the current dependancies, and those new dependancies may themselves need to be configured. When I tested with ports/x11/kde3, it sufficed to run config-recursive twice to catch all of the dependancies I had configured. Maybe we can figure out how to it all in one pass later. >How-To-Repeat: >Fix: Patch is also available at: ftp://ftp.wolves.k12.mo.us/pub/stuff/config-recursive.patch --- config-recursive.patch begins here --- --- bsd.port.mk.orig Mon Jan 3 13:01:03 2005 +++ bsd.port.mk Fri Jan 14 13:26:29 2005 @@ -613,8 +613,10 @@ # config - Configure options for this port (using ${DIALOG}). # Automatically run prior to extract, patch, configure, build, # install, and package. +# config-recursive - Do a "make config" for this port and all dependencies. # showconfig - Display options config for this port # rmconfig - Remove the options config for this port +# rmconfig-recursive - Remove the options config for this port and all dependencies. # # Default sequence for "all" is: # @@ -4969,6 +4971,21 @@ .endif .endif +.if !target(config-recursive) +config-recursive: + @${ECHO_MSG} "===> Setting user-specified options for ${PKGNAME} and dependencies"; + @for dir in ${.CURDIR} $$(${ALL-DEPENDS-LIST}); do \ + (cd $$dir; ${MAKE} config-conditional); \ + done +.endif + +.if !target(config-conditional) +config-conditional: +.if defined(OPTIONS) && !exists(${_OPTIONSFILE}) + cd ${.CURDIR} && ${MAKE} config; +.endif +.endif + .if !target(showconfig) showconfig: .if defined(OPTIONS) && exists(${_OPTIONSFILE}) @@ -5017,6 +5034,14 @@ .else @${ECHO_MSG} "===> No user-specified options configured for ${PKGNAME}" .endif +.endif + +.if !target(rmconfig-recursive) +rmconfig-recursive: + @${ECHO_MSG} "===> Removing user-specified options for ${PKGNAME} and dependencies"; + @for dir in ${.CURDIR} $$(${ALL-DEPENDS-LIST}); do \ + (cd $$dir; ${MAKE} rmconfig); \ + done .endif .endif --- config-recursive.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: