summaryrefslogtreecommitdiffstats
path: root/sys/conf/kmod.mk
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2005-10-25 09:05:07 +0000
committerru <ru@FreeBSD.org>2005-10-25 09:05:07 +0000
commit8bd59b71f57599ff5cd91b807994fbc8222cacf0 (patch)
tree617d23c99af5767601462992b8acd32eac8ac344 /sys/conf/kmod.mk
parentfc5c353586e6e3c787f2fde21ebd9e4332c44c11 (diff)
downloadFreeBSD-src-8bd59b71f57599ff5cd91b807994fbc8222cacf0.zip
FreeBSD-src-8bd59b71f57599ff5cd91b807994fbc8222cacf0.tar.gz
Refactor (some more) installation of kernel and module objects.
Try to make everyone happy: David (to have debug kernels installed by default), Warner (to be able to override that), and myself (for actually making it all work and to be consistent). Now, if kernel was configured for debugging (through DEBUG=-g in the kernel config file or "config -g"), doing "make install" will install debug versions of kernel and module objects with their canonical names, kernel.debug -> /boot/kernel/kernel if_fxp.ko.debug -> /boot/kernel/if_fxp.ko Installing a kernel not configured for debugging, or debug kernel with INSTALL_NODEBUG variable defined, will install non-debug kernel and module objects. Also, restore the install.debug and reinstall.debug targets that are part of the existing API (they cause some additional gdb(1) scripts to be installed).
Diffstat (limited to 'sys/conf/kmod.mk')
-rw-r--r--sys/conf/kmod.mk11
1 files changed, 3 insertions, 8 deletions
diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk
index a1c48d2..0f010e8 100644
--- a/sys/conf/kmod.mk
+++ b/sys/conf/kmod.mk
@@ -236,21 +236,17 @@ _INSTALLFLAGS:= ${INSTALLFLAGS}
_INSTALLFLAGS:= ${_INSTALLFLAGS${ie}}
.endfor
-.if !target(install.debug) && defined(DEBUG_FLAGS)
-install.debug:
- cd ${.CURDIR}; ${MAKE} -DINSTALL_DEBUG install
-.endif
-
.if !target(realinstall)
realinstall: _kmodinstall
.ORDER: beforeinstall _kmodinstall
_kmodinstall:
-.if defined(DEBUG_FLAGS) && defined(INSTALL_DEBUG)
+.if defined(DEBUG_FLAGS) && !defined(INSTALL_NODEBUG)
${INSTALL} -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \
- ${_INSTALLFLAGS} ${FULLPROG} ${DESTDIR}${KMODDIR}
+ ${_INSTALLFLAGS} ${FULLPROG} ${DESTDIR}${KMODDIR}/${PROG}
.else
${INSTALL} -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \
${_INSTALLFLAGS} ${PROG} ${DESTDIR}${KMODDIR}
+.endif
.include <bsd.links.mk>
@@ -264,7 +260,6 @@ _kldxref:
kldxref ${DESTDIR}${KMODDIR}; \
fi
.endif
-.endif
.endif # !target(realinstall)
.endif # !target(install)
OpenPOWER on IntegriCloud