1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-10 09:42:26 +00:00

include: add a check-ldirs target

This target ensures all LDIRS, LSUBDIRS, and LSUBSUBDIRS actually exist.

Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D39006
This commit is contained in:
Brooks Davis 2023-04-19 16:58:06 +01:00
parent 12e99b63d2
commit 1a2249ff0b

View File

@ -486,3 +486,16 @@ HOST_MACHINE_ARCH!= uname -p
MACHINE:= ${HOST_MACHINE}
MACHINE_ARCH:= ${HOST_MACHINE_ARCH}
.endif
check-ldirs:
missing_dirs=""; \
for dir in ${LDIRS} ${LSUBDIRS} ${LSUBSUBDIRS}; do \
if [ ! -d ${SRCTOP}/sys/$$dir ]; then \
echo "${SRCTOP}/sys/$$dir"; \
missing_dirs="$$missing_dirs $$dir"; \
fi; \
done; \
if [ -n "$$missing_dirs" ]; then \
echo "Nonexistant directories:" $$missing_dirs; \
false; \
fi