aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authorasami <asami@FreeBSD.org>1997-11-20 13:31:44 +0800
committerasami <asami@FreeBSD.org>1997-11-20 13:31:44 +0800
commitfb0ac15dbc01899af8ca0ca1020921c5ba357ad7 (patch)
tree848f7f7f6dbe86de733f8f0ee10b4c5dae763f35 /Mk
parent0eaf6565ed4cacb5d5e8e1c902ecdbae8c0ff15d (diff)
downloadfreebsd-ports-gnome-fb0ac15dbc01899af8ca0ca1020921c5ba357ad7.tar.gz
freebsd-ports-gnome-fb0ac15dbc01899af8ca0ca1020921c5ba357ad7.tar.zst
freebsd-ports-gnome-fb0ac15dbc01899af8ca0ca1020921c5ba357ad7.zip
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.).
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.port.subdir.mk30
1 files changed, 29 insertions, 1 deletions
diff --git a/Mk/bsd.port.subdir.mk b/Mk/bsd.port.subdir.mk
index 00cf49fad682..2c70232418dc 100644
--- a/Mk/bsd.port.subdir.mk
+++ b/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 <bsd.port.subdir.mk> 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