Bug #543 » kern.post.mk.patch
kern.post.mk 28 Jan 2007 13:30:13 -0000 | ||
---|---|---|
rm -f tags1
|
||
sed -e 's, ../, ,' tags > tags1
|
||
# Note: when moving the existing kernel to .old, make sure it is stripped
|
||
# Note: when moving the existing kernel to .old, it is by default stripped
|
||
# so we do not have two full debug environments sitting in / eating up space.
|
||
#
|
||
kernel-install:
|
||
... | ... | |
exit 1 ; \
|
||
fi
|
||
.ifdef NOFSCHG
|
||
.if exists(${DESTDIR}/${KERNEL})
|
||
. if exists(${DESTDIR}/${KERNEL})
|
||
. ifdef NO_KERNEL_OLD_STRIP
|
||
mv -f ${DESTDIR}/${KERNEL} ${DESTDIR}/${KERNEL}.old
|
||
. else
|
||
${OBJCOPY} --strip-debug ${DESTDIR}/${KERNEL} ${DESTDIR}/${KERNEL}.old
|
||
.endif
|
||
. endif
|
||
. endif
|
||
${INSTALL} -m 555 -o root -g wheel \
|
||
${SELECTEDKERNEL} ${DESTDIR}/${KERNEL}
|
||
.else
|
||
.if exists(${DESTDIR}/${KERNEL})
|
||
. if exists(${DESTDIR}/${KERNEL})
|
||
-chflags noschg ${DESTDIR}/${KERNEL}
|
||
. ifdef NO_KERNEL_OLD_STRIP
|
||
mv -f ${DESTDIR}/${KERNEL} ${DESTDIR}/${KERNEL}.old
|
||
. else
|
||
${OBJCOPY} --strip-debug ${DESTDIR}/${KERNEL} ${DESTDIR}/${KERNEL}.old
|
||
.endif
|
||
. endif
|
||
. endif
|
||
${INSTALL} -m 555 -o root -g wheel -fschg \
|
||
${SELECTEDKERNEL} ${DESTDIR}/${KERNEL}
|
||
.endif
|
||
... | ... | |
modules-tags:
|
||
cd $S ; env ${MKMODULESENV} ${MAKE} -f Makefile.modules tags
|
||
# Note: when moving the existing modules to .old, make sure they are stripped
|
||
# Note: when moving the existing modules to .old, they are by default stripped
|
||
# so we do not have two full debug environments sitting in / eating up space.
|
||
#
|
||
modules-install:
|
||
.if !defined(NO_MODULES_OLD)
|
||
. ifdef NO_KERNEL_OLD_STRIP
|
||
set -- ${DESTDIR}/modules/*; \
|
||
if [ -f "$$1" ]; then \
|
||
mkdir -p ${DESTDIR}/modules.old; \
|
||
for file; do \
|
||
mv -f $$file ${DESTDIR}/modules.old; \
|
||
done; \
|
||
fi
|
||
. else
|
||
set -- ${DESTDIR}/modules/*; \
|
||
if [ -f "$$1" ]; then \
|
||
mkdir -p ${DESTDIR}/modules.old; \
|
||
... | ... | |
${OBJCOPY} --strip-debug $$file ${DESTDIR}/modules.old/$${file##*/}; \
|
||
done; \
|
||
fi
|
||
. endif
|
||
.endif
|
||
cd $S ; env ${MKMODULESENV} ${MAKE} -f Makefile.modules install
|
||