summaryrefslogtreecommitdiff
path: root/mk/bsd.pkg.subdir.mk
diff options
context:
space:
mode:
authoragc <agc>1999-06-28 11:42:28 +0000
committeragc <agc>1999-06-28 11:42:28 +0000
commit030ae1bffeaa09d784db39d0dde089efd92fafd5 (patch)
tree7386f37c7e3c9e14f1c445583c414327694095a5 /mk/bsd.pkg.subdir.mk
parente7e0b3c78a8522a68abf64d3f2ff4b2e3e544e78 (diff)
downloadpkgsrc-030ae1bffeaa09d784db39d0dde089efd92fafd5.tar.gz
Add a "show-distfiles" target, used to show the distfiles and patchfiles
(including any subdir) for a package. If ${IGNORE} is set, for any reason, do not print anything. The output is relative to ${DISTDIR}. This target can be used to identify out of date distfiles and patchfiles in ${DISTDIR}, in conjunction with suitable filters.
Diffstat (limited to 'mk/bsd.pkg.subdir.mk')
-rw-r--r--mk/bsd.pkg.subdir.mk19
1 files changed, 18 insertions, 1 deletions
diff --git a/mk/bsd.pkg.subdir.mk b/mk/bsd.pkg.subdir.mk
index 57ad0586a26..211af5707bd 100644
--- a/mk/bsd.pkg.subdir.mk
+++ b/mk/bsd.pkg.subdir.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.subdir.mk,v 1.28 1999/05/17 23:34:37 tron Exp $
+# $NetBSD: bsd.pkg.subdir.mk,v 1.29 1999/06/28 11:42:29 agc Exp $
# Derived from: FreeBSD Id: bsd.port.subdir.mk,v 1.19 1997/03/09 23:10:56 wosch Exp
# from: @(#)bsd.subdir.mk 5.9 (Berkeley) 2/1/91
#
@@ -182,3 +182,20 @@ README.html: .PRECIOUS
.for subdir in ${SUBDIR}
@cd ${subdir} && ${MAKE} "_THISDIR_=${_THISDIR_}${.CURDIR:T}/" ${_README_TYPE}
.endfor
+
+.if !target(show-distfiles)
+show-distfiles:
+ @for entry in ${SUBDIR}; do \
+ if [ -d ${.CURDIR}/$${entry}.${MACHINE} ]; then \
+ edir=$${entry}.${MACHINE}; \
+ elif [ -d ${.CURDIR}/$${entry} ]; then \
+ edir=$${entry}; \
+ else \
+ OK="false"; \
+ ${ECHO_MSG} "===> ${_THISDIR_}$${entry} non-existent"; \
+ fi; \
+ if [ "$$OK" = "" ]; then \
+ cd ${.CURDIR}/$${edir} && ${MAKE} show-distfiles; \
+ fi; \
+ done
+.endif