Date: Thu, 20 Feb 2003 00:16:00 +0100 (CET) From: Erwin Lansing <erwin@lansing.dk> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/48473: add fetch-required(-list) targets to bsd.port.mk Message-ID: <20030219231600.66A0882C2@grizzly.droso.dk>
next in thread | raw e-mail | index | archive | help
>Number: 48473 >Category: ports >Synopsis: add fetch-required(-list) targets 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: Wed Feb 19 15:20:06 PST 2003 >Closed-Date: >Last-Modified: >Originator: Erwin Lansing >Release: FreeBSD 5.0-RELEASE i386 >Organization: pil.dk >Environment: System: FreeBSD grizzly.droso.net 5.0-RELEASE FreeBSD 5.0-RELEASE #0: Sat Feb 1 17:56:04 CET 2003 root@grizzly.droso.net:/usr/src/sys/i386/compile/GRIZZLY i386 >Description: Add fetch-required and fetch-required-list targets that fetches (or lists) the distfiles that need fetching for a port and dependencies that are not already installed. >How-To-Repeat: >Fix: --- bsd.port.mk-fetch-required.diff begins here --- Index: bsd.port.mk =================================================================== RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v retrieving revision 1.440 diff -u -r1.440 bsd.port.mk --- bsd.port.mk 16 Feb 2003 21:22:15 -0000 1.440 +++ bsd.port.mk 19 Feb 2003 19:55:21 -0000 @@ -390,6 +390,11 @@ # for port and dependencies into ${DISTDIR} as necessary. # fetch-recursive-list - Show list of files that would be retrieved by # fetch-recursive. +# fetch-required-list - Show list of files that would be retrieved by +# fetch-required. +# fetch-required - Retrieves ${DISTFILES} (and ${PATCHFILES} if defined), +# for port and dependencies that are not already installed +# into ${DISTDIR}. # extract - Unpacks ${DISTFILES} into ${WRKDIR}. # patch - Apply any provided patches to the source. # configure - Runs either GNU configure, one or more local configure @@ -3497,6 +3502,29 @@ fetch-recursive-list: @for dir in ${.CURDIR} $$(${ALL-DEPENDS-LIST}); do \ (cd $$dir; ${MAKE} fetch-list); \ + done +.endif + +.if !target(fetch-required) +fetch-required: + @${ECHO_MSG} "===> Fetching all required distfiles for ${PKGNAME} and dependencies" + @for dir in ${.CURDIR} $$(${ALL-DEPENDS-LIST}); do \ + (cd $$dir; \ + tmp=`${MAKE} -V PKGNAME`; \ + if [ ! -d ${PKG_DBDIR}/$${tmp} ]; then \ + ${MAKE} fetch; \ + fi ); \ + done +.endif + +.if !target(fetch-required-list) +fetch-required-list: + @for dir in ${.CURDIR} $$(${ALL-DEPENDS-LIST}); do \ + (cd $$dir; \ + tmp=`${MAKE} -V PKGNAME`; \ + if [ ! -d ${PKG_DBDIR}/$${tmp} ]; then \ + ${MAKE} fetch-list; \ + fi ); \ done .endif --- bsd.port.mk-fetch-required.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030219231600.66A0882C2>