From owner-ports-jp@jp.freebsd.org  Thu Nov 30 23:04:11 2000
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id XAA01757;
	Thu, 30 Nov 2000 23:04:11 +0900 (JST)
	(envelope-from owner-ports-jp@jp.FreeBSD.org)
Received: from mail.nobutaka.com (h-hiroshimax079.tiki.ne.jp [210.236.8.79])
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP id XAA01752
	for <ports-jp@jp.freebsd.org>; Thu, 30 Nov 2000 23:04:09 +0900 (JST)
	(envelope-from nobutaka@nobutaka.com)
Received: from mail.nobutaka.com (localhost [127.0.0.1])
	by mail.nobutaka.com (8.11.1/8.11.1) with ESMTP id eAUE3wU07121
	for <ports-jp@jp.freebsd.org>; Thu, 30 Nov 2000 23:04:02 +0900 (JST)
	(envelope-from nobutaka@nobutaka.com)
Date: Thu, 30 Nov 2000 23:03:58 +0900
Message-ID: <861yvta75d.wl@mail.nobutaka.com>
From: MANTANI Nobutaka <nobutaka@nobutaka.com>
To: ports-jp@jp.freebsd.org
In-Reply-To: <vqcr93ugw5b.fsf@silvia.hip.berkeley.edu>
References: <x57l5pbvvj.wl@hirose.tohoku.iij.ad.jp>
	<200011271510.AAA11175@shark.math.cst.nihon-u.ac.jp>
	<20001127171536798.ZLJQ.19952.t-mta2.odn.ne.jp@mta2.odn.ne.jp>
	<vqcr93ugw5b.fsf@silvia.hip.berkeley.edu>
User-Agent: Wanderlust/2.5.1 (Smooth) REMI/1.14.2 (=?ISO-8859-4?Q?Hokuhoku?=
 =?ISO-8859-4?Q?-=D2shima?=) Chao/1.14.1 (=?ISO-8859-4?Q?Rokujiz=F2?=)
 APEL/10.2 Emacs/20.7 (i386--freebsd) MULE/4.0 (HANANOEN)
MIME-Version: 1.0 (generated by REMI 1.14.2 - =?ISO-8859-4?Q?=22Hokuhoku-=D2?=
 =?ISO-8859-4?Q?shima=22?=)
Content-Type: text/plain; charset=ISO-2022-JP
Reply-To: ports-jp@jp.freebsd.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+000315
X-Sequence: ports-jp 10472
Subject: [ports-jp 10472] Re: make fetch-recursive
Errors-To: owner-ports-jp@jp.freebsd.org
Sender: owner-ports-jp@jp.freebsd.org
X-Originator: nobutaka@nobutaka.com

At Wed, 29 Nov 2000 16:07:28 -0800,
Satoshi - Ports Wraith - Asami wrote:
> 
>  * fetch-always-recursive($B5l(B fetch-recursive):
>  *     $B$=$N(B ports/packages $B$,(B install $B>uBV$K$+$+$o$i$:(B
>  *     $B0MB8$9$k$9$Y$F$N(B ports $B$N(B distfiles $B$r=&$&!#(B
>  * 
>  * fetch-recursive:
>  *     $B0MB8$9$k$9$Y$F$N(B ports $B$N(B distfiles $B$r=&$&!#(B
>  *     $B$?$@$7!"0MB8$9$k%P!<%8%g%s$N(B ports/packages $B$,(B
>  *     $B$9$G$K(B install $B$5$l$F$k$J$i!"$=$N(B distfiles $B$O=&$o$J$$!#(B
>  * 
>  * $B$H$$$&$N$G$O$I$&$G$7$g$&$+!)(B
> 
> $B$3$l$,$$$$$s$G$O$J$$$G$7$g$&$+!#C/$+%Q%C%A:n$C$F$/$@$5$$$^$;!#(B;)

$B:n$C$F$_$^$7$?!#(B:-)


-Nobutaka

--- bsd.port.mk.orig	Thu Nov 30 21:22:11 2000
+++ bsd.port.mk	Thu Nov 30 22:50:44 2000
@@ -2620,23 +2620,50 @@
 fetch-recursive:
 	@${ECHO_MSG} "===> Fetching all distfiles for ${PKGNAME} and dependencies"
 	@for dir in ${.CURDIR} $$(${ALL-DEPENDS-LIST}); do \
-		(cd $$dir; ${MAKE} fetch); \
+		(cd $$dir; \
+		  pkgname=`${MAKE} package-name`; \
+		  if [ "x${ALWAYS_RECURSIVE}" != "x" -o ! -d ${PKG_DBDIR}/$$pkgname ]; then \
+			${MAKE} fetch; \
+		  fi); \
 	done
 .endif
 
+.if !target(fetch-always-recursive)
+fetch-always-recursive:
+	@cd ${.CURDIR} && ${MAKE} ALWAYS_RECURSIVE=yes fetch-recursive
+.endif
+
 .if !target(fetch-recursive-list)
 fetch-recursive-list:
 	@for dir in ${.CURDIR} $$(${ALL-DEPENDS-LIST}); do \
-		(cd $$dir; ${MAKE} fetch-list); \
+		(cd $$dir; \
+		  pkgname=`${MAKE} package-name`; \
+		  if [ "x${ALWAYS_RECURSIVE}" != "x" -o ! -d ${PKG_DBDIR}/$$pkgname ]; then \
+		    ${MAKE} fetch-list; \
+		  fi); \
 	done
 .endif
 
+.if !target(fetch-always-recursive-list)
+fetch-always-recursive-list:
+	@cd ${.CURDIR} && ${MAKE} ALWAYS_RECURSIVE=yes fetch-recursive-list
+.endif
+
 .if !target(checksum-recursive)
 checksum-recursive:
 	@${ECHO_MSG} "===> Fetching and checking checksums for ${PKGNAME} and dependencies"
 	@for dir in ${.CURDIR} $$(${ALL-DEPENDS-LIST}); do \
-		(cd $$dir; ${MAKE} checksum); \
+		(cd $$dir; \
+		  pkgname=`${MAKE} package-name`; \
+		  if [ "x${ALWAYS_RECURSIVE}" != "x" -o ! -d ${PKG_DBDIR}/$$pkgname ]; then \
+			${MAKE} checksum; \
+		  fi); \
 	done
+.endif
+
+.if !target(checksum-always-recursive)
+checksum-always-recursive:
+	@cd ${.CURDIR} && ${MAKE} ALWAYS_RECURSIVE=yes checksum-recursive
 .endif
 
 # Dependency lists: build and runtime.  Print out directory names.
