diff options
author | imp <imp@FreeBSD.org> | 2005-10-24 23:54:39 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2005-10-24 23:54:39 +0000 |
commit | 8a23adf1e1e4c7e2ba64776dd5fc068308f92075 (patch) | |
tree | 26145de057f513fb1e9fe340497219bebe1e90ec /sys/conf/kern.post.mk | |
parent | 0bc1bed704cc7b7292be893f0c8c2b9f8f6a4b60 (diff) | |
download | FreeBSD-src-8a23adf1e1e4c7e2ba64776dd5fc068308f92075.zip FreeBSD-src-8a23adf1e1e4c7e2ba64776dd5fc068308f92075.tar.gz |
Back out most of 1.84. It was unwise to force debug kernels to always
be installed. It should have been optional to install a non-debug
one, just like it was formerly optional to install a debug one. In
order to do that, most of 1.84 had to go.
Instead, make installing the debug kernel the default, but create a
new option INSTALL_NODEBUG for those people that have small /
partitions and good source control habits.
This preserves the behavior of 1.84 while allowing it to be overriden
for people (like me) that do not have the time to upgrade to get a
bigger / and also don't have time for stupid makefile tricks when
upgrading their older system, but still want a kernel.debug around if
things go south.
Diffstat (limited to 'sys/conf/kern.post.mk')
-rw-r--r-- | sys/conf/kern.post.mk | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk index 7b66891..452d1f1 100644 --- a/sys/conf/kern.post.mk +++ b/sys/conf/kern.post.mk @@ -63,9 +63,12 @@ modules-all modules-depend: modules-obj .endif .endif -.if defined(DEBUG) -install.debug reinstall.debug: gdbinit - cd ${.CURDIR}; ${MAKE} -DINSTALL_DEBUG ${.TARGET:R} +.if !defined(DEBUG) +FULLKERNEL= ${KERNEL_KO} +.else +FULLKERNEL= ${KERNEL_KO}.debug +${KERNEL_KO}: ${FULLKERNEL} + ${OBJCOPY} --strip-debug ${FULLKERNEL} ${KERNEL_KO} # Install gdbinit files for kernel debugging. gdbinit: @@ -78,7 +81,7 @@ gdbinit: .endif .endif -${KERNEL_KO}: ${SYSTEM_DEP} vers.o +${FULLKERNEL}: ${SYSTEM_DEP} vers.o @rm -f ${.TARGET} @echo linking ${.TARGET} ${SYSTEM_LD} @@ -104,7 +107,7 @@ ${mfile:T:S/.m$/.h/}: ${mfile} kernel-clean: rm -f *.o *.so *.So *.ko *.s eddep errs \ - ${KERNEL_KO} linterrs makelinks tags vers.c \ + ${FULLKERNEL} ${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} @@ -181,7 +184,7 @@ kernel-install: kernel-install-check .endif kernel-install: - @if [ ! -f ${KERNEL_KO} ] ; then \ + @if [ ! -f ${FULLKERNEL} ] ; then \ echo "You must build a kernel first." ; \ exit 1 ; \ fi @@ -200,11 +203,19 @@ kernel-install: fi .endif mkdir -p ${DESTDIR}${KODIR} +.if defined(DEBUG) && !defined(INSTALL_NODEBUG) + ${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_NODEBUG) + ${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} |