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.).
This commit is contained in:
parent
87eeff2e41
commit
6f6617ad09
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user