Date: Fri, 14 Jan 2005 14:03:58 -0600 (CST) From: Chris Dillon <cdillon@wolves.k12.mo.us> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/76254: PATCH: Add config-recursive to bsd.port.mk Message-ID: <20050114200358.A748F1FE2D@mail.wolves.k12.mo.us> Resent-Message-ID: <200501142010.j0EKAVNq037825@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050114200358.A748F1FE2D>