diff options
author | asami <asami@FreeBSD.org> | 1997-11-20 05:31:44 +0000 |
---|---|---|
committer | asami <asami@FreeBSD.org> | 1997-11-20 05:31:44 +0000 |
commit | b520e8c172d52e26b828212589ce96401eb635b8 (patch) | |
tree | 3e355cb6161b360f1e256dd02040d540e75e4c99 /share | |
parent | 55205429c101c289769de3f38d9c8561df4dac17 (diff) | |
download | FreeBSD-src-b520e8c172d52e26b828212589ce96401eb635b8.zip FreeBSD-src-b520e8c172d52e26b828212589ce96401eb635b8.tar.gz |
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 'share')
-rw-r--r-- | share/mk/bsd.port.subdir.mk | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/share/mk/bsd.port.subdir.mk b/share/mk/bsd.port.subdir.mk index 00cf49f..2c70232 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 <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 |