diff options
author | seb <seb@pkgsrc.org> | 2003-08-12 14:55:42 +0000 |
---|---|---|
committer | seb <seb@pkgsrc.org> | 2003-08-12 14:55:42 +0000 |
commit | 6baa7c1a792c19c5d2129352ed9aa337cf838bd2 (patch) | |
tree | c362e234880d75e67934763e148d74d2f27fb873 /mk/bsd.pkg.mk | |
parent | cb9090cc7231f79a48da5dffe77190f2f6820a53 (diff) | |
download | pkgsrc-6baa7c1a792c19c5d2129352ed9aa337cf838bd2.tar.gz |
As is clean-depends-list is subject to dependencies loops (uncovered
by the loops introduced by tools.mk) causing make failures.
But show-all-depends-dirs and show-all-depends-dirs-excl are not.
So use show-all-depends-dirs-excl in clean-depends target and remove
clean-depends-list altogether.
Besides this remove a bit of clutter and redundancy from this
already monstrous file.
Diffstat (limited to 'mk/bsd.pkg.mk')
-rw-r--r-- | mk/bsd.pkg.mk | 46 |
1 files changed, 2 insertions, 44 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index d39dd95dbbf..070c9a020d2 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.1235 2003/08/12 11:35:03 agc Exp $ +# $NetBSD: bsd.pkg.mk,v 1.1236 2003/08/12 14:55:42 seb Exp $ # # This file is in the public domain. # @@ -3381,7 +3381,7 @@ clean: pre-clean clean-depends: . if defined(BUILD_DEPENDS) || defined(DEPENDS) ${_PKG_SILENT}${_PKG_DEBUG} \ - for i in `${MAKE} ${MAKEFLAGS} CLEAN_DEPENDS_LIST_TOP=YES clean-depends-list | ${SED} -e 's;\.\./[^ ]*; ;g' | ${TR} -s "[:space:]" "\n" | ${SORT} -u` ;\ + for i in `${MAKE} ${MAKEFLAGS} show-all-depends-dirs-excl` ;\ do \ cd ${.CURDIR}/../../$$i && \ ${MAKE} ${MAKEFLAGS} CLEANDEPENDS=NO clean; \ @@ -3389,48 +3389,6 @@ clean-depends: . endif .endif - -# The clean-depends-list target will produce a list of all -# BUILD_DEPENDS and DEPENDS packages. -# As each *DEPENDS package is visited, it is added to the -# CLEAN_DEPENDS_LIST_SEEN variable. Once a pkg is in the list -# it will not be visited again. This prevents traversing the same -# part of the dependency tree multiple times. Each depending package -# ends up in the list twice. Once as the relative path from the depending -# package and once as the path from pkgsrc. Eg, "../../foo/bar foo/bar" -# The "../../foo/bar" version is later removed from the list in the -# clean-depends target. The remaining bit of redundancy is that some -# packages list their depends as "../bar" instead of "../../foo/bar" -# In this case its possible for a dependency to be visited twice. - -.PHONY: clean-depends-list -.if !target(clean-depends-list) -clean-depends-list: -. if defined(BUILD_DEPENDS) || defined(DEPENDS) - @for dir in `${ECHO} ${BUILD_DEPENDS:C/^[^:]*://:C/:.*//} \ - ${DEPENDS:C/^[^:]*://:C/:.*//} | \ - ${TR} '\040' '\012' `; do \ - case "$$CLEAN_DEPENDS_LIST_SEEN" in \ - *" "$$dir" "*) ;; \ - *) \ - CLEAN_DEPENDS_LIST_SEEN=" $$dir `cd ${.CURDIR} ; cd $$dir && ${MAKE} ${MAKEFLAGS} CLEAN_DEPENDS_LIST_SEEN="$$CLEAN_DEPENDS_LIST_SEEN" CLEAN_DEPENDS_LIST_TOP=NO clean-depends-list`";\ - ;; \ - esac \ - done ; \ - if [ "${CLEAN_DEPENDS_LIST_TOP}" != "YES" ]; then \ - ${ECHO} " ${PKGPATH} $$CLEAN_DEPENDS_LIST_SEEN"; \ - else \ - ${ECHO} " $$CLEAN_DEPENDS_LIST_SEEN"; \ - fi -. else - @if [ "${CLEAN_DEPENDS_LIST_TOP}" != "YES" ]; then \ - ${ECHO} " ${PKGPATH} $$CLEAN_DEPENDS_LIST_SEEN"; \ - else \ - ${ECHO} " $$CLEAN_DEPENDS_LIST_SEEN"; \ - fi -. endif -.endif - .PHONY: pre-distclean .if !target(pre-distclean) pre-distclean: |