Date: Tue, 5 Sep 2000 18:36:11 -0700 (PDT) From: asami@freebsd.org (Satoshi Asami) To: ports@freebsd.org Subject: fetch-recursive/checksum-recursive Message-ID: <200009060136.e861aBU17761@silvia.hip.berkeley.edu>
next in thread | raw e-mail | index | archive | help
Hi, What do people say about the following? It will implement the likes of fetch-recursive, as requested by PR ports/12548. === Index: bsd.port.mk =================================================================== RCS file: /usr/cvs/ports/Mk/bsd.port.mk,v retrieving revision 1.348 diff -u -r1.348 bsd.port.mk --- bsd.port.mk 2000/08/25 19:50:45 1.348 +++ bsd.port.mk 2000/09/05 23:21:43 @@ -288,7 +290,11 @@ # # fetch - Retrieves ${DISTFILES} (and ${PATCHFILES} if defined) # into ${DISTDIR} as necessary. -# fetch-list - Show list of files that would be retrieved by fetch +# fetch-list - Show list of files that would be retrieved by fetch. +# 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. # extract - Unpacks ${DISTFILES} into ${WRKDIR}. # patch - Apply any provided patches to the source. # configure - Runs either GNU configure, one or more local configure @@ -305,7 +311,8 @@ # give incorrect results if multiple patches deal with # the same file. # checksum - Use files/md5 to ensure that your distfiles are valid. +# checksum-recursive - Run checksum in this port and all dependencies. # makesum - Generate files/md5 (only do this for your own ports!). # # Default sequence for "all" is: fetch checksum extract patch configure build # @@ -2219,7 +2263,7 @@ @(cd ${_DISTDIR}; \ for file in ${PATCHFILES}; do \ if [ ! -f $$file -a ! -f `${BASENAME} $$file` ]; then \ - for site in ${SORTED_PATCH_SITES_CMD}; do \ + for site in `${SORTED_PATCH_SITES_CMD}`; do \ DIR=${DIST_SUBDIR}; \ CKSIZE=`${GREP} "^SIZE ($${DIR:+$$DIR/}$$file)" ${MD5_FILE} | ${AWK} '{print $$4}'`; \ case $${file} in \ @@ -2495,9 +2539,9 @@ # Clean dependency lists: build and runtime. Print out directory names. clean-depends-list: - @${CLEAN-DEPENDS-LIST} + @${ALL-DEPENDS-LIST} -CLEAN-DEPENDS-LIST= \ +ALL-DEPENDS-LIST= \ checked="${PARENT_CHECKED}"; \ for dir in $$(${ECHO} "${FETCH_DEPENDS} ${BUILD_DEPENDS} ${LIB_DEPENDS} ${RUN_DEPENDS}" | ${TR} '\040' '\012' | ${SED} -e 's/^[^:]*://' -e 's/:.*//') $$(${ECHO} ${DEPENDS} | ${TR} '\040' '\012' | ${SED} -e 's/:.*//'); do \ if [ -d $$dir ]; then \ @@ -2514,15 +2558,38 @@ .if !target(clean-depends) clean-depends: - @for dir in $$(${CLEAN-DEPENDS-LIST}); do \ + @for dir in $$(${ALL-DEPENDS-LIST}); do \ (cd $$dir; ${MAKE} NOCLEANDEPENDS=yes clean); \ done .endif .if !target(deinstall-depends) deinstall-depends: - @for dir in $$(${CLEAN-DEPENDS-LIST}); do \ - (cd $$dir; ${MAKE} NOCLEANDEPENDS=yes deinstall); \ + @for dir in $$(${ALL-DEPENDS-LIST}); do \ + (cd $$dir; ${MAKE} deinstall); \ + done +.endif + +.if !target(fetch-recursive) +fetch-recursive: + @${ECHO_MSG} "===> Fetching all distfiles for ${PKGNAME} and dependencies" + @for dir in ${.CURDIR} $$(${ALL-DEPENDS-LIST}); do \ + (cd $$dir; ${MAKE} fetch); \ + done +.endif + +.if !target(fetch-recursive-list) +fetch-recursive-list: + @for dir in ${.CURDIR} $$(${ALL-DEPENDS-LIST}); do \ + (cd $$dir; ${MAKE} fetch-list); \ + done +.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); \ done .endif === It also fixes the typo I introduced in fetch-list. Satoshi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200009060136.e861aBU17761>