summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2002-05-14 07:49:12 +0000
committerru <ru@FreeBSD.org>2002-05-14 07:49:12 +0000
commit9cf99ff7cfcc12a629fe8fa33d2d0bec2a5a0d29 (patch)
treeac52ef7b7f52880a1878d71a829d86ff68b70750 /sys
parent93d6d2e8c29b8f054bd4b71cdeb582a7dc283d8b (diff)
downloadFreeBSD-src-9cf99ff7cfcc12a629fe8fa33d2d0bec2a5a0d29.zip
FreeBSD-src-9cf99ff7cfcc12a629fe8fa33d2d0bec2a5a0d29.tar.gz
Check that kldxref(8) exists before running it.
Diffstat (limited to 'sys')
-rw-r--r--sys/conf/kmod.mk9
-rw-r--r--sys/modules/Makefile5
2 files changed, 8 insertions, 6 deletions
diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk
index 7119824..d73af89 100644
--- a/sys/conf/kmod.mk
+++ b/sys/conf/kmod.mk
@@ -170,10 +170,6 @@ ${KMOD}.kld: ${OBJS}
.endif
.endif
-.if !exists(/usr/sbin/kldxref)
-NO_XREF=yes
-.endif
-
_ILINKS=@ machine
all: objwarn ${PROG}
@@ -260,7 +256,10 @@ realinstall:
done; true
.endif
.if !defined(NO_XREF)
- -kldxref ${DESTDIR}${KMODDIR}
+ @if type kldxref >/dev/null 2>&1; then \
+ ${ECHO} kldxref ${DESTDIR}${KMODDIR}; \
+ kldxref ${DESTDIR}${KMODDIR}; \
+ fi
.endif
.endif
diff --git a/sys/modules/Makefile b/sys/modules/Makefile
index 45f1225..6378490 100644
--- a/sys/modules/Makefile
+++ b/sys/modules/Makefile
@@ -216,7 +216,10 @@ SUBDIR=${MODULES_OVERRIDE}
.if !defined(NO_XREF)
.MAKEFLAGS:= ${.MAKEFLAGS} -DNO_XREF
afterinstall:
- -kldxref ${DESTDIR}${KMODDIR}
+ @if type kldxref >/dev/null 2>&1; then \
+ ${ECHO} kldxref ${DESTDIR}${KMODDIR}; \
+ kldxref ${DESTDIR}${KMODDIR}; \
+ fi
.endif
.include <bsd.subdir.mk>
OpenPOWER on IntegriCloud