From 6f6617ad0912002cdee59c93e1c3079fff989e8e Mon Sep 17 00:00:00 2001 From: Satoshi Asami Date: Thu, 20 Nov 1997 05:31:44 +0000 Subject: [PATCH] Add new target "checksubdirs". It will warn about any subdirectories that are not in the SUBDIR list. It also knows about the "standard" directories that are to be ignored ("CVS", "distfiles", etc.). --- share/mk/bsd.port.subdir.mk | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/share/mk/bsd.port.subdir.mk b/share/mk/bsd.port.subdir.mk index 00cf49fad682..2c70232418dc 100644 --- a/share/mk/bsd.port.subdir.mk +++ b/share/mk/bsd.port.subdir.mk @@ -1,5 +1,5 @@ # from: @(#)bsd.subdir.mk 5.9 (Berkeley) 2/1/91 -# $Id: bsd.port.subdir.mk,v 1.21 1997/11/06 02:20:27 fenner Exp $ +# $Id: bsd.port.subdir.mk,v 1.22 1997/11/10 00:35:25 wosch Exp $ # # The include file contains the default targets # for building ports subdirectories. @@ -97,6 +97,34 @@ afterinstall: realinstall realinstall: beforeinstall _SUBDIRUSE .endif +IGNOREDIR= CVS distfiles packages pkg templates + +.if !target(checksubdirs) +.if defined(PORTSTOP) +checksubdirs: checksubdir _SUBDIRUSE +.else +checksubdirs: checksubdir +.endif +.endif + +.if !target(checksubdir) +checksubdir: + @for d in *; do \ + if [ -d "$$d" ]; then \ + found=0; \ + for s in ${SUBDIR} ${IGNOREDIR}; do \ + if [ "x$$s" = "x$$d" ]; then \ + found=1; \ + break; \ + fi; \ + done; \ + if [ $$found = 0 ]; then \ + ${ECHO} "Warning: directory $$d not in SUBDIR"; \ + fi; \ + fi; \ + done +.endif + .if !target(readmes) readmes: readme _SUBDIRUSE .endif