summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorseb <seb>2003-08-12 14:55:42 +0000
committerseb <seb>2003-08-12 14:55:42 +0000
commit731dd93284756a113663577d2eb9a8ecaf9a4a4c (patch)
treec362e234880d75e67934763e148d74d2f27fb873 /mk
parent6a94f346fcdc3b18adff38b342ffe1e9124dcd73 (diff)
downloadpkgsrc-731dd93284756a113663577d2eb9a8ecaf9a4a4c.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')
-rw-r--r--mk/bsd.pkg.mk46
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: