FreeBSD 11.2で make packagesがエラーになる

# make TARGET=arm TARGET_ARCH=armv6 DESTDIR=/FreeBSD/rpi2 KERNCONF=RPI2 packages
make[1]: "/FreeBSD/releng/11.2/Makefile.inc1" line 1517: Unassociated shell command "@cd ${KSTAGEDIR}/${DISTDIR} ;  awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk  -v kernel=yes -v _kernconf=${INSTALLKERNEL}  ${KSTAGEDIR}/kernel.meta ;  cap_arg=`cd ${SRCDIR}/etc ; ${MAKE} -VCAP_MKDB_ENDIAN` ;  pwd_arg=`cd ${SRCDIR}/etc ; ${MAKE} -VPWD_MKDB_ENDIAN` ;  sed -e "s/%VERSION%/${PKG_VERSION}/"  -e "s/%PKGNAME%/kernel-${INSTALLKERNEL:tl}${:U""}/"  -e "s/%KERNELDIR%/kernel/"  -e "s/%COMMENT%/FreeBSD ${INSTALLKERNEL} kernel ${:U""}/"  -e "s/%DESC%/FreeBSD ${INSTALLKERNEL} kernel ${:U""}/"  -e "s/%CAP_MKDB_ENDIAN%/$${cap_arg}/g"  -e "s/%PWD_MKDB_ENDIAN%/$${pwd_arg}/g"  ${SRCDIR}/release/packages/kernel.ucl  > ${KSTAGEDIR}/${DISTDIR}/kernel.${INSTALLKERNEL}${:U""}.ucl ;  awk -F\" '  /name/ { printf("===> Creating %s-", $$2); next }  /version/ {print $$2; next } '  ${KSTAGEDIR}/${DISTDIR}/kernel.${INSTALLKERNEL}${:U""}.ucl ;  ${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh -o ALLOW_BASE_SHLIBS=yes  create -M ${KSTAGEDIR}/${DISTDIR}/kernel.${INSTALLKERNEL}${:U""}.ucl  -p ${KSTAGEDIR}/${DISTDIR}/kernel.${INSTALLKERNEL}${:U""}.plist  -r ${KSTAGEDIR}/${DISTDIR}  -o ${REPODIR}/$$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)/${PKG_VERSION}"
make[1]: "/FreeBSD/releng/11.2/Makefile.inc1" line 1517: Unassociated shell command "@cd ${KSTAGEDIR}/${DISTDIR} ;  awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk  -v kernel=yes -v _kernconf=${INSTALLKERNEL}  ${KSTAGEDIR}/kernel.meta ;  cap_arg=`cd ${SRCDIR}/etc ; ${MAKE} -VCAP_MKDB_ENDIAN` ;  pwd_arg=`cd ${SRCDIR}/etc ; ${MAKE} -VPWD_MKDB_ENDIAN` ;  sed -e "s/%VERSION%/${PKG_VERSION}/"  -e "s/%PKGNAME%/kernel-${INSTALLKERNEL:tl}${:U-debug}/"  -e "s/%KERNELDIR%/kernel/"  -e "s/%COMMENT%/FreeBSD ${INSTALLKERNEL} kernel ${:U-debug}/"  -e "s/%DESC%/FreeBSD ${INSTALLKERNEL} kernel ${:U-debug}/"  -e "s/%CAP_MKDB_ENDIAN%/$${cap_arg}/g"  -e "s/%PWD_MKDB_ENDIAN%/$${pwd_arg}/g"  ${SRCDIR}/release/packages/kernel.ucl  > ${KSTAGEDIR}/${DISTDIR}/kernel.${INSTALLKERNEL}${:U-debug}.ucl ;  awk -F\" '  /name/ { printf("===> Creating %s-", $$2); next }  /version/ {print $$2; next } '  ${KSTAGEDIR}/${DISTDIR}/kernel.${INSTALLKERNEL}${:U-debug}.ucl ;  ${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh -o ALLOW_BASE_SHLIBS=yes  create -M ${KSTAGEDIR}/${DISTDIR}/kernel.${INSTALLKERNEL}${:U-debug}.ucl  -p ${KSTAGEDIR}/${DISTDIR}/kernel.${INSTALLKERNEL}${:U-debug}.plist  -r ${KSTAGEDIR}/${DISTDIR}  -o ${REPODIR}/$$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)/${PKG_VERSION}"
make[1]: Fatal errors encountered -- cannot continue
make[1]: stopped in /FreeBSD/releng/11.2
*** Error code 1

Stop.
make: stopped in /FreeBSD/releng/11.2
原因
create-kernel-packages: _pkgbootstrap .PHONY
.if exists(${KSTAGEDIR}/kernel.meta)
.if ${MK_DEBUG_FILES} != "no"
_debug=-debug
.endif
.for flavor in "" ${_debug}
Makefileのtargetの後に代入文を書けない(この場合は _debug=-debug)。 よって MK_DEBUG_FILES=noをつけてmakeをするか以下のようにMakefileを修正する。
Index: Makefile.inc1
===================================================================
--- Makefile.inc1       (revision 338621)
+++ Makefile.inc1       (working copy)
@@ -1485,11 +1485,11 @@
                        -o ${REPODIR}/$$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)/${PKG_VERSION} ; \
        done

-create-kernel-packages:        _pkgbootstrap .PHONY
-.if exists(${KSTAGEDIR}/kernel.meta)
 .if ${MK_DEBUG_FILES} != "no"
 _debug=-debug
 .endif
+create-kernel-packages:        _pkgbootstrap .PHONY
+.if exists(${KSTAGEDIR}/kernel.meta)
 .for flavor in "" ${_debug}
        @cd ${KSTAGEDIR}/${DISTDIR} ; \
        awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk \
Posted by issei

カテゴリ: BSD