diff options
author | Brooks Davis <brooks@FreeBSD.org> | 2023-04-19 15:58:06 +0000 |
---|---|---|
committer | Brooks Davis <brooks@FreeBSD.org> | 2023-04-19 15:58:06 +0000 |
commit | 1a2249ff0bd3ce88c50bf64a573874fbe75d6026 (patch) | |
tree | 7225fdd55476133637b770115ea5575313b718ce /include | |
parent | 12e99b63d2fae07fc54e53d9187a3995a2005ec9 (diff) | |
download | src-1a2249ff0bd3ce88c50bf64a573874fbe75d6026.tar.gz src-1a2249ff0bd3ce88c50bf64a573874fbe75d6026.zip |
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
Diffstat (limited to 'include')
-rw-r--r-- | include/Makefile | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/Makefile b/include/Makefile index 24f2ed6c2a64..20d735394d9d 100644 --- a/include/Makefile +++ b/include/Makefile @@ -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 |