Project

General

Profile

Bug #1140 » kern.post.mk.diff

stefan.johannesdal, 09/21/2008 03:51 AM

View differences:

kern.post.mk 2008-09-20 13:35:38 +0200
echo "You must build a kernel first." ; \
exit 1 ; \
fi
. if exists(${DESTDIR}/boot/${DESTKERNNAME})
. if exists(${DESTDIR}${DESTKERNDIR}/${DESTKERNNAME}${KERNPOSTFIX})
.ifndef NOFSCHG
-chflags noschg ${DESTDIR}/boot/${DESTKERNNAME}
-chflags noschg ${DESTDIR}${DESTKERNDIR}/${DESTKERNNAME}${KERNPOSTFIX}
.endif
. ifdef NO_KERNEL_OLD_STRIP
cp -p ${DESTDIR}/boot/${DESTKERNNAME} ${DESTDIR}/boot/${DESTKERNNAME}.old
cp -p ${DESTDIR}${DESTKERNDIR}/${DESTKERNNAME}${KERNPOSTFIX} ${DESTDIR}${DESTKERNDIR}/${DESTKERNNAME}${KERNPOSTFIX}.old
. else
${OBJCOPY} --strip-debug ${DESTDIR}/boot/${DESTKERNNAME} ${DESTDIR}/boot/${DESTKERNNAME}.old
${OBJCOPY} --strip-debug ${DESTDIR}${DESTKERNDIR}/${DESTKERNNAME}${KERNPOSTFIX} ${DESTDIR}${DESTKERNDIR}/${DESTKERNNAME}${KERNPOSTFIX}.old
. endif
. endif
.ifdef NOFSCHG
${INSTALL} -m 555 -o root -g wheel \
${SELECTEDKERNEL} ${DESTDIR}/boot/${DESTKERNNAME}
${SELECTEDKERNEL} ${DESTDIR}${DESTKERNDIR}/${DESTKERNNAME}${KERNPOSTFIX}
.else
${INSTALL} -m 555 -o root -g wheel -fschg \
${SELECTEDKERNEL} ${DESTDIR}/boot/${DESTKERNNAME}
${SELECTEDKERNEL} ${DESTDIR}${DESTKERNDIR}/${DESTKERNNAME}${KERNPOSTFIX}
.endif
kernel-reinstall: kernel-installable
.ifdef NOFSCHG
${INSTALL} -m 555 -o root -g wheel \
${SELECTEDKERNEL} ${DESTDIR}/boot/${DESTKERNNAME}
${SELECTEDKERNEL} ${DESTDIR}${DESTKERNDIR}/${DESTKERNNAME}${KERNPOSTFIX}
.else
${INSTALL} -m 555 -o root -g wheel -fschg \
${SELECTEDKERNEL} ${DESTDIR}/boot/${DESTKERNNAME}
${SELECTEDKERNEL} ${DESTDIR}${DESTKERNDIR}/${DESTKERNNAME}${KERNPOSTFIX}
.endif
# Require DESTDIR to be manually specified when installing a
......
#
kernel-installable:
.if ${P} == vkernel
.if !defined(DESTDIR)
.if ( !defined(DESTDIR) && ( !defined(DESTKERNDIR) || ${DESTKERNDIR} == /boot ) )
@echo "When installing a virtual kernel, DESTDIR must be manually specified"
@exit 1
.endif
......
modules-install:
.if !defined(NO_MODULES_OLD)
. ifdef NO_KERNEL_OLD_STRIP
set -- ${DESTDIR}/boot/modules/*; \
set -- ${DESTDIR}${DESTKERNDIR}/modules${KERNPOSTFIX}/*; \
if [ -f "$$1" ]; then \
mkdir -p ${DESTDIR}/boot/modules.old; \
mkdir -p ${DESTDIR}${DESTKERNDIR}/modules${KERNPOSTFIX}.old; \
for file; do \
cp -p $$file ${DESTDIR}/boot/modules.old; \
cp -p $$file ${DESTDIR}${DESTKERNDIR}/modules${KERNPOSTFIX}.old; \
done; \
fi
. else
set -- ${DESTDIR}/boot/modules/*; \
set -- ${DESTDIR}${DESTKERNDIR}/modules${KERNPOSTFIX}/*; \
if [ -f "$$1" ]; then \
mkdir -p ${DESTDIR}/boot/modules.old; \
mkdir -p ${DESTDIR}${DESTKERNDIR}/modules${KERNPOSTFIX}.old; \
for file; do \
${OBJCOPY} --strip-debug $$file ${DESTDIR}/boot/modules.old/$${file##*/}; \
${OBJCOPY} --strip-debug $$file ${DESTDIR}${DESTKERNDIR}/modules${KERNPOSTFIX}.old/$${file##*/}; \
done; \
fi
. endif
.endif
mkdir -p ${DESTDIR}/boot/modules # Ensure that the modules directory exists!
mkdir -p ${DESTDIR}${DESTKERNDIR}/modules${KERNPOSTFIX} # Ensure that the modules directory exists!
cd $S ; env ${MKMODULESENV} ${MAKE} -f Makefile.modules install
modules-reinstall:
(4-4/14)