-# $OpenBSD: bsd.syspatch.mk,v 1.10 2017/06/05 09:46:25 robert Exp $
+# $OpenBSD: bsd.syspatch.mk,v 1.11 2017/06/05 09:47:54 robert Exp $
#
# Copyright (c) 2016-2017 Robert Nagy <robert@openbsd.org>
#
@echo '>> Building syspatch for ${ERRATA}'
.if ${BUILD:L:Msrc}
. for _t in clean obj build
- @su ${BUILDUSER} -c "cd ${SRCDIR} && /usr/bin/make SYSPATCH=Yes ${_t}"
+ @cd ${SRCDIR} && /usr/bin/make SYSPATCH=Yes ${_t}
. endfor
@su ${BUILDUSER} -c "cd ${SRCDIR} && make SYSPATCH=Yes DESTDIR=${FAKE} install"
.elif ${BUILD:L:Mxenocara}
. for _t in clean bootstrap obj build
- @su ${BUILDUSER} -c "cd ${SRCDIR} && /usr/bin/make SYSPATCH=Yes ${_t}"
+ @cd ${SRCDIR} && /usr/bin/make SYSPATCH=Yes ${_t}
. endfor
@su ${BUILDUSER} -c "cd ${SRCDIR} && make SYSPATCH=Yes DESTDIR=${FAKE} install"
.elif ${BUILD:L:Mkernel}
+. for _t in clean obj build
+ @cd ${SRCDIR} && /usr/bin/make SYSPATCH=Yes ${_t}
+. endfor
+ @su ${BUILDUSER} -c "cd ${SRCDIR} && make SYSPATCH=Yes DESTDIR=${FAKE} install"
. for _kern in GENERIC GENERIC.MP
@if cd ${SRCDIR}/sys/arch/${MACHINE_ARCH}/conf; then \
if config ${_kern}; then \
- if cd ../compile/${_kern} && make; then \
+ if cd ../compile/${_kern} && make clean && make ; then \
exit 0; \
fi; exit 1; \
fi; exit 1; \
fi;
@if [ ${_kern} = "GENERIC" ]; then \
su ${BUILDUSER} -c '${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${LOCALEGRP} \
- -m 0644 ${SRCDIR}/sys/arch/${MACHINE_ARCH}/compile/${_kern}/bsd \
+ -m 0644 ${SRCDIR}/sys/arch/${MACHINE_ARCH}/compile/${_kern}/obj/bsd \
${FAKE}/bsd' || \
{ echo "***> failed to install ${_kern}"; \
exit 1; }; \
elif [ ${_kern} = "GENERIC.MP" ]; then \
su ${BUILDUSER} -c '${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${LOCALEGRP} \
- -m 0644 ${SRCDIR}/sys/arch/${MACHINE_ARCH}/compile/${_kern}/bsd \
+ -m 0644 ${SRCDIR}/sys/arch/${MACHINE_ARCH}/compile/${_kern}/obj/bsd \
${FAKE}/bsd.mp' || \
{ echo "***> failed to install ${_kern}"; \
exit 1; }; \