From owner-freebsd-ports Wed Jul 7 7:20:10 1999 Delivered-To: freebsd-ports@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id F312915486 for ; Wed, 7 Jul 1999 07:20:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id HAA10260; Wed, 7 Jul 1999 07:20:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from numeri.campus.luth.se (numeri.campus.luth.se [130.240.197.103]) by hub.freebsd.org (Postfix) with ESMTP id B3B3F15004 for ; Wed, 7 Jul 1999 07:13:20 -0700 (PDT) (envelope-from k@numeri.campus.luth.se) Received: (from k@localhost) by numeri.campus.luth.se (8.9.3/8.9.3) id QAA47170; Wed, 7 Jul 1999 16:13:19 +0200 (CEST) (envelope-from k) Message-Id: <199907071413.QAA47170@numeri.campus.luth.se> Date: Wed, 7 Jul 1999 16:13:19 +0200 (CEST) From: Johan Karlsson Reply-To: k@numeri.campus.luth.se To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: ports/12548: New 'fecth-recursive(-list)' targets in ports Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 12548 >Category: ports >Synopsis: New 'fecth-recursive(-list)' targets in ports >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Jul 7 07:20:01 PDT 1999 >Closed-Date: >Last-Modified: >Originator: Johan Karlsson >Release: FreeBSD 4.0-CURRENT i386 >Organization: >Environment: >Description: Sometimes I would like to be able to fetch the distfiles for a port AND all its dependencies before actually building. I have written a new target for the bsd.port.mk file which fetch all distfiles for the port and for all direct and indirect dependencies. This is usefull if you only have a modem connection to Internet or for a mobile computer. eg. connect to Internet cd $(PORT) make fetch-recursive disconnect make all install In the target fetch-recursive I use ${MAKE} -k fetch to do the fetching. -k is used since I want the fetch to continue even if there are some problems with one of the distfiles. eg. fetch for $(PORTS)/java/java-doc You have to fetch the documentation from http://java.sun.com/products/jdk/1.1/docs.html Put jdk118-doc.tar.gz in in /usr/ports/distfiles/ and run make again. All this hassle is because of the license and export restrictions as described in http://java.sun.com/feedback/faq/downloading.html *** Error code 1 The user then only has to fetch the problematic ones manually. The targets 'fetch-recursive(-list)' should also be added to the bsd.port.subdir.mk file. >How-To-Repeat: >Fix: Add the following to $(PORTS)/Mk/bsd.port.mk # fetch-recursive - Retrieves ${DISTFILES} (and ${PATCHFILES} if defined), # for port and dependencies, into ${DISTDIR} as necessary. # fetch-recursive-list - Show list of files that would be # retrieved by fetch-recursive fetch-recursive: @${ECHO_MSG} "===> Fetching all distfiles for ${PKGNAME} and dependencies" @setvar dirs "`${MAKE} all-depends-recursive-list`";\ setvar dirs "${.CURDIR} $$dirs";\ for dir in $$dirs; do\ cd $$dir && ${MAKE} -k fetch;\ done fetch-recursive-list: @setvar dirs "`${MAKE} all-depends-recursive-list`";\ setvar dirs "${.CURDIR} $$dirs";\ for dir in $$dirs; do\ cd $$dir && ${MAKE} fetch-list;\ done # Internal targets used by fetch-recursive(-list) all-depends-list: @setvar builddirs "`${MAKE} build-depends-list`";\ setvar rundirs "`${MAKE} run-depends-list`";\ setvar dirs "`${ECHO} $$builddirs $$rundirs`";\ ${ECHO} $$dirs all-depends-recursive-list: @setvar dirs "";\ setvar _dirs "`${MAKE} all-depends-list`";\ while [ "$$_dirs" ]; do\ setvar __dirs "$$_dirs";\ setvar _dirs "";\ for dir in $$__dirs; do\ if ! (echo $$dirs | grep $$dir)>/dev/null; then\ setvar dirs "$$dirs $$dir";\ setvar _dirs "$$_dirs `cd $$dir && ${MAKE} all-depends-list`";\ fi;\ done;\ done;\ ${ECHO} $$dirs >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message