diff options
author | obrien <obrien@FreeBSD.org> | 2005-09-11 00:22:21 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2005-09-11 00:22:21 +0000 |
commit | 197b328733aa7e843f31b76da2f9db4eda154e2f (patch) | |
tree | 552676d9810629549ce222491a82c9c46ebd819d /sys/conf/kern.post.mk | |
parent | 63c6575f860383f41a6fb197fe5bb43d76c06e75 (diff) | |
download | FreeBSD-src-197b328733aa7e843f31b76da2f9db4eda154e2f.zip FreeBSD-src-197b328733aa7e843f31b76da2f9db4eda154e2f.tar.gz |
For HEAD, install a kernel with debug information if DEBUG is a kernel
config option. It is too easy to loose the build directory and not have
symbols for kgdb to read.
Diffstat (limited to 'sys/conf/kern.post.mk')
-rw-r--r-- | sys/conf/kern.post.mk | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk index f42c7d5..7b66891 100644 --- a/sys/conf/kern.post.mk +++ b/sys/conf/kern.post.mk @@ -63,12 +63,7 @@ modules-all modules-depend: modules-obj .endif .endif -.if !defined(DEBUG) -FULLKERNEL= ${KERNEL_KO} -.else -FULLKERNEL= ${KERNEL_KO}.debug -${KERNEL_KO}: ${FULLKERNEL} - ${OBJCOPY} --strip-debug ${FULLKERNEL} ${KERNEL_KO} +.if defined(DEBUG) install.debug reinstall.debug: gdbinit cd ${.CURDIR}; ${MAKE} -DINSTALL_DEBUG ${.TARGET:R} @@ -83,7 +78,7 @@ gdbinit: .endif .endif -${FULLKERNEL}: ${SYSTEM_DEP} vers.o +${KERNEL_KO}: ${SYSTEM_DEP} vers.o @rm -f ${.TARGET} @echo linking ${.TARGET} ${SYSTEM_LD} @@ -109,7 +104,7 @@ ${mfile:T:S/.m$/.h/}: ${mfile} kernel-clean: rm -f *.o *.so *.So *.ko *.s eddep errs \ - ${FULLKERNEL} ${KERNEL_KO} linterrs makelinks tags vers.c \ + ${KERNEL_KO} linterrs makelinks tags vers.c \ vnode_if.c vnode_if.h vnode_if_newproto.h vnode_if_typedef.h \ ${MFILES:T:S/.m$/.c/} ${MFILES:T:S/.m$/.h/} \ ${CLEAN} @@ -186,7 +181,7 @@ kernel-install: kernel-install-check .endif kernel-install: - @if [ ! -f ${FULLKERNEL} ] ; then \ + @if [ ! -f ${KERNEL_KO} ] ; then \ echo "You must build a kernel first." ; \ exit 1 ; \ fi @@ -205,19 +200,11 @@ kernel-install: fi .endif mkdir -p ${DESTDIR}${KODIR} -.if defined(DEBUG) && defined(INSTALL_DEBUG) - ${INSTALL} -p -m 555 -o root -g wheel ${FULLKERNEL} ${DESTDIR}${KODIR} -.else ${INSTALL} -p -m 555 -o root -g wheel ${KERNEL_KO} ${DESTDIR}${KODIR} -.endif kernel-reinstall: @-chflags -R noschg ${DESTDIR}${KODIR} -.if defined(DEBUG) && defined(INSTALL_DEBUG) - ${INSTALL} -p -m 555 -o root -g wheel ${FULLKERNEL} ${DESTDIR}${KODIR} -.else ${INSTALL} -p -m 555 -o root -g wheel ${KERNEL_KO} ${DESTDIR}${KODIR} -.endif config.o env.o hints.o vers.o vnode_if.o: ${NORMAL_C} |