Support the "install.debug" and "reinstall.debug" targets for kernel modules.

Small tweaks to kldxref may be necessary to avoid the surprising (but harm-
less) behaviour of 'kldload foo' loading foo.ko.debug instead of foo.ko if
it is present in the kernel directory.

Approved by:	a week of silence on -arch
MFC after:	2 weeks
This commit is contained in:
des 2001-10-27 00:52:50 +00:00
parent e8310efb48
commit e7de1cbdf8
8 changed files with 24 additions and 19 deletions

View File

@ -88,7 +88,8 @@ ${SUBDIR}::
.for __target in all all-man checkdpadd clean cleandepend cleandir depend lint \
maninstall obj objlink regress tags
maninstall obj objlink regress tags \
install.debug reinstall.debug
.if !target(${__target})
${__target}: _SUBDIRUSE
.endif

View File

@ -340,11 +340,11 @@ modules-cleandir:
modules-tags:
cd $S/modules ; env ${MKMODULESENV} ${MAKE} tags
modules-install modules-install.debug:
modules-install modules-reinstall:
cd $S/modules ; env ${MKMODULESENV} ${MAKE} install
modules-reinstall modules-reinstall.debug:
cd $S/modules ; env ${MKMODULESENV} ${MAKE} install
modules-install.debug modules-reinstall.debug:
cd $S/modules ; env ${MKMODULESENV} ${MAKE} install.debug
config.o:
${NORMAL_C}

View File

@ -298,11 +298,11 @@ modules-cleandir:
modules-tags:
cd $S/modules ; env ${MKMODULESENV} ${MAKE} tags
modules-install modules-install.debug:
modules-install modules-reinstall:
cd $S/modules ; env ${MKMODULESENV} ${MAKE} install
modules-reinstall modules-reinstall.debug:
cd $S/modules ; env ${MKMODULESENV} ${MAKE} install
modules-install.debug modules-reinstall.debug:
cd $S/modules ; env ${MKMODULESENV} ${MAKE} install.debug
config.o:
${NORMAL_C}

View File

@ -310,11 +310,11 @@ modules-cleandir:
modules-tags:
cd $S/modules ; env ${MKMODULESENV} ${MAKE} tags
modules-install modules-install.debug:
modules-install modules-reinstall:
cd $S/modules ; env ${MKMODULESENV} ${MAKE} install
modules-reinstall modules-reinstall.debug:
cd $S/modules ; env ${MKMODULESENV} ${MAKE} install
modules-install.debug modules-reinstall.debug:
cd $S/modules ; env ${MKMODULESENV} ${MAKE} install.debug
config.o:
${NORMAL_C}

View File

@ -302,11 +302,11 @@ modules-cleandir:
modules-tags:
cd $S/modules ; env ${MKMODULESENV} ${MAKE} tags
modules-install modules-install.debug:
modules-install modules-reinstall:
cd $S/modules ; env ${MKMODULESENV} ${MAKE} install
modules-reinstall modules-reinstall.debug:
cd $S/modules ; env ${MKMODULESENV} ${MAKE} install
modules-install.debug modules-reinstall.debug:
cd $S/modules ; env ${MKMODULESENV} ${MAKE} install.debug
config.o:
${NORMAL_C}

View File

@ -307,11 +307,11 @@ modules-cleandir:
modules-tags:
cd $S/modules ; env ${MKMODULESENV} ${MAKE} tags
modules-install modules-install.debug:
modules-install modules-reinstall:
cd $S/modules ; env ${MKMODULESENV} ${MAKE} install
modules-reinstall modules-reinstall.debug:
cd $S/modules ; env ${MKMODULESENV} ${MAKE} install
modules-install.debug modules-reinstall.debug:
cd $S/modules ; env ${MKMODULESENV} ${MAKE} install.debug
config.o:
${NORMAL_C}

View File

@ -312,11 +312,11 @@ modules-cleandir:
modules-tags:
cd $S/modules ; env ${MKMODULESENV} ${MAKE} tags
modules-install modules-install.debug:
modules-install modules-reinstall:
cd $S/modules ; env ${MKMODULESENV} ${MAKE} install
modules-reinstall modules-reinstall.debug:
cd $S/modules ; env ${MKMODULESENV} ${MAKE} install
modules-install.debug modules-reinstall.debug:
cd $S/modules ; env ${MKMODULESENV} ${MAKE} install.debug
config.o:
${NORMAL_C}

View File

@ -212,6 +212,10 @@ _INSTALLFLAGS:= ${INSTALLFLAGS}
_INSTALLFLAGS:= ${_INSTALLFLAGS${ie}}
.endfor
install.debug: _SUBDIR
${INSTALL} ${COPY} -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \
${_INSTALLFLAGS} ${FULLPROG} ${DESTDIR}${KMODDIR}/
realinstall: _SUBDIR
${INSTALL} ${COPY} -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \
${_INSTALLFLAGS} ${PROG} ${DESTDIR}${KMODDIR}/