From be1d673d24eb7656c01123fc89be9c224eb25383 Mon Sep 17 00:00:00 2001 From: Ruslan Ermilov Date: Tue, 14 May 2002 07:49:12 +0000 Subject: Check that kldxref(8) exists before running it. --- sys/conf/kmod.mk | 9 ++++----- sys/modules/Makefile | 5 ++++- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'sys') diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk index 7119824465a0..d73af895cc23 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 45f122558ac0..63784908b9c7 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 -- cgit v1.3