Change how DESTKERNNAME is handled:
authorThomas Nikolajsen <thomas@dragonflybsd.org>
Mon, 15 Sep 2008 20:09:03 +0000 (20:09 +0000)
committerThomas Nikolajsen <thomas@dragonflybsd.org>
Mon, 15 Sep 2008 20:09:03 +0000 (20:09 +0000)
don't prepend `boot/' to DESTKERNNAME definition,
but prepend it on use.

sys/conf/kern.post.mk
sys/conf/kern.pre.mk

index 53bca8c..96dc4e2 100644 (file)
@@ -1,4 +1,4 @@
-# $DragonFly: src/sys/conf/kern.post.mk,v 1.14 2008/09/01 19:39:47 dillon Exp $
+# $DragonFly: src/sys/conf/kern.post.mk,v 1.15 2008/09/15 20:09:03 thomas Exp $
 # 
 # This Makefile covers the bottom part of the MI build instructions
 #
@@ -111,31 +111,31 @@ kernel-install: kernel-installable
                echo "You must build a kernel first." ; \
                exit 1 ; \
        fi
-.  if exists(${DESTDIR}/${DESTKERNNAME})
+.  if exists(${DESTDIR}/boot/${DESTKERNNAME})
 .ifndef NOFSCHG
-       -chflags noschg ${DESTDIR}/${DESTKERNNAME}
+       -chflags noschg ${DESTDIR}/boot/${DESTKERNNAME}
 .endif
 .    ifdef NO_KERNEL_OLD_STRIP
-       cp -p ${DESTDIR}/${DESTKERNNAME} ${DESTDIR}/${DESTKERNNAME}.old
+       cp -p ${DESTDIR}/boot/${DESTKERNNAME} ${DESTDIR}/boot/${DESTKERNNAME}.old
 .    else
-       ${OBJCOPY} --strip-debug ${DESTDIR}/${DESTKERNNAME} ${DESTDIR}/${DESTKERNNAME}.old
+       ${OBJCOPY} --strip-debug ${DESTDIR}/boot/${DESTKERNNAME} ${DESTDIR}/boot/${DESTKERNNAME}.old
 .    endif
 .  endif
 .ifdef NOFSCHG
        ${INSTALL} -m 555 -o root -g wheel \
-               ${SELECTEDKERNEL} ${DESTDIR}/${DESTKERNNAME}
+               ${SELECTEDKERNEL} ${DESTDIR}/boot/${DESTKERNNAME}
 .else
        ${INSTALL} -m 555 -o root -g wheel -fschg \
-               ${SELECTEDKERNEL} ${DESTDIR}/${DESTKERNNAME}
+               ${SELECTEDKERNEL} ${DESTDIR}/boot/${DESTKERNNAME}
 .endif
 
 kernel-reinstall: kernel-installable
 .ifdef NOFSCHG
        ${INSTALL} -m 555 -o root -g wheel \
-               ${SELECTEDKERNEL} ${DESTDIR}/${DESTKERNNAME}
+               ${SELECTEDKERNEL} ${DESTDIR}/boot/${DESTKERNNAME}
 .else
        ${INSTALL} -m 555 -o root -g wheel -fschg \
-               ${SELECTEDKERNEL} ${DESTDIR}/${DESTKERNNAME}
+               ${SELECTEDKERNEL} ${DESTDIR}/boot/${DESTKERNNAME}
 .endif
 
 # Require DESTDIR to be manually specified when installing a
@@ -148,7 +148,7 @@ kernel-installable:
        @exit 1
 .endif
 .endif
-       @if [ -f ${DESTDIR}/${CHECKKERNNAME} ]; then \
+       @if [ -f ${DESTDIR}/${DESTKERNNAME} ]; then \
                echo "You need to make buildworld, installworld, and upgrade"; \
                echo "before you can install a new kernel, because the"; \
                echo "kernel and modules have moved to /boot"; \
index 9d12875..9208675 100644 (file)
@@ -1,4 +1,4 @@
-# $DragonFly: src/sys/conf/kern.pre.mk,v 1.6 2008/09/01 19:39:47 dillon Exp $
+# $DragonFly: src/sys/conf/kern.pre.mk,v 1.7 2008/09/15 20:09:03 thomas Exp $
 #
 # This Makefile covers the top part of the MI kernel build instructions
 #
@@ -103,8 +103,7 @@ SELECTEDKERNEL= ${KERNEL}.debug
 FULLKERNEL=    ${KERNEL}.nodebug
 SELECTEDKERNEL= ${KERNEL}.stripped
 .endif
-DESTKERNNAME?= boot/${KERNEL}
-CHECKKERNNAME?=        ${KERNEL}
+DESTKERNNAME?= ${KERNEL}
 
 
 MKMODULESENV=  MAKEOBJDIRPREFIX=${.OBJDIR} BUILDING_WITH_KERNEL=${.OBJDIR}