Simplify using bsd.endian.mk and have it provide CAP_MKDB_ENDIAN, since it is
the most common usage. Approved by: bapt (mentor)
This commit is contained in:
parent
6e081509db
commit
f59e535254
@ -1803,13 +1803,11 @@ create-kernel-packages-flavor${flavor:C,^""$,${_default_flavor},}: _pkgbootstrap
|
|||||||
env -i LC_COLLATE=C sort ${KSTAGEDIR}/kernel.meta | \
|
env -i LC_COLLATE=C sort ${KSTAGEDIR}/kernel.meta | \
|
||||||
awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk \
|
awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk \
|
||||||
-v kernel=yes -v _kernconf=${INSTALLKERNEL} ; \
|
-v kernel=yes -v _kernconf=${INSTALLKERNEL} ; \
|
||||||
cap_arg=`cd ${SRCDIR}/etc ; ${MAKE} -VCAP_MKDB_ENDIAN` ; \
|
|
||||||
sed -e "s/%VERSION%/${PKG_VERSION}/" \
|
sed -e "s/%VERSION%/${PKG_VERSION}/" \
|
||||||
-e "s/%PKGNAME%/kernel-${INSTALLKERNEL:tl}${flavor}/" \
|
-e "s/%PKGNAME%/kernel-${INSTALLKERNEL:tl}${flavor}/" \
|
||||||
-e "s/%KERNELDIR%/kernel/" \
|
-e "s/%KERNELDIR%/kernel/" \
|
||||||
-e "s/%COMMENT%/FreeBSD ${INSTALLKERNEL} kernel ${flavor}/" \
|
-e "s/%COMMENT%/FreeBSD ${INSTALLKERNEL} kernel ${flavor}/" \
|
||||||
-e "s/%DESC%/FreeBSD ${INSTALLKERNEL} kernel ${flavor}/" \
|
-e "s/%DESC%/FreeBSD ${INSTALLKERNEL} kernel ${flavor}/" \
|
||||||
-e "s/%CAP_MKDB_ENDIAN%/$${cap_arg}/g" \
|
|
||||||
-e "s/ %VCS_REVISION%/${VCS_REVISION}/" \
|
-e "s/ %VCS_REVISION%/${VCS_REVISION}/" \
|
||||||
${SRCDIR}/release/packages/kernel.ucl \
|
${SRCDIR}/release/packages/kernel.ucl \
|
||||||
> ${KSTAGEDIR}/${DISTDIR}/kernel.${INSTALLKERNEL}${flavor}.ucl ; \
|
> ${KSTAGEDIR}/${DISTDIR}/kernel.${INSTALLKERNEL}${flavor}.ucl ; \
|
||||||
@ -1837,13 +1835,11 @@ create-kernel-packages-extra-flavor${flavor:C,^""$,${_default_flavor},}-${_kerne
|
|||||||
env -i LC_COLLATE=C sort ${KSTAGEDIR}/kernel.${_kernel}.meta | \
|
env -i LC_COLLATE=C sort ${KSTAGEDIR}/kernel.${_kernel}.meta | \
|
||||||
awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk \
|
awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk \
|
||||||
-v kernel=yes -v _kernconf=${_kernel} ; \
|
-v kernel=yes -v _kernconf=${_kernel} ; \
|
||||||
cap_arg=`cd ${SRCDIR}/etc ; ${MAKE} -VCAP_MKDB_ENDIAN` ; \
|
|
||||||
sed -e "s/%VERSION%/${PKG_VERSION}/" \
|
sed -e "s/%VERSION%/${PKG_VERSION}/" \
|
||||||
-e "s/%PKGNAME%/kernel-${_kernel:tl}${flavor}/" \
|
-e "s/%PKGNAME%/kernel-${_kernel:tl}${flavor}/" \
|
||||||
-e "s/%KERNELDIR%/kernel.${_kernel}/" \
|
-e "s/%KERNELDIR%/kernel.${_kernel}/" \
|
||||||
-e "s/%COMMENT%/FreeBSD ${_kernel} kernel ${flavor}/" \
|
-e "s/%COMMENT%/FreeBSD ${_kernel} kernel ${flavor}/" \
|
||||||
-e "s/%DESC%/FreeBSD ${_kernel} kernel ${flavor}/" \
|
-e "s/%DESC%/FreeBSD ${_kernel} kernel ${flavor}/" \
|
||||||
-e "s/%CAP_MKDB_ENDIAN%/$${cap_arg}/g" \
|
|
||||||
-e "s/ %VCS_REVISION%/${VCS_REVISION}/" \
|
-e "s/ %VCS_REVISION%/${VCS_REVISION}/" \
|
||||||
${SRCDIR}/release/packages/kernel.ucl \
|
${SRCDIR}/release/packages/kernel.ucl \
|
||||||
> ${KSTAGEDIR}/kernel.${_kernel}/kernel.${_kernel}${flavor}.ucl ; \
|
> ${KSTAGEDIR}/kernel.${_kernel}/kernel.${_kernel}${flavor}.ucl ; \
|
||||||
|
@ -178,13 +178,6 @@ distribute:
|
|||||||
${_+_}cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION}
|
${_+_}cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION}
|
||||||
|
|
||||||
.include <bsd.endian.mk>
|
.include <bsd.endian.mk>
|
||||||
.if ${TARGET_ENDIANNESS} == "1234"
|
|
||||||
CAP_MKDB_ENDIAN?= -l
|
|
||||||
.elif ${TARGET_ENDIANNESS} == "4321"
|
|
||||||
CAP_MKDB_ENDIAN?= -b
|
|
||||||
.else
|
|
||||||
CAP_MKDB_ENDIAN?=
|
|
||||||
.endif
|
|
||||||
|
|
||||||
.if defined(NO_ROOT)
|
.if defined(NO_ROOT)
|
||||||
METALOG.add?= cat -l >> ${METALOG}
|
METALOG.add?= cat -l >> ${METALOG}
|
||||||
|
@ -131,7 +131,7 @@ main() {
|
|||||||
[ -z "${desc}" ] && desc="${outname} package"
|
[ -z "${desc}" ] && desc="${outname} package"
|
||||||
|
|
||||||
cp "${uclsource}" "${uclfile}"
|
cp "${uclsource}" "${uclfile}"
|
||||||
cap_arg="$(make -C ${srctree}/etc -VCAP_MKDB_ENDIAN)"
|
cap_arg="$( make -f ${srctree}/share/mk/bsd.endian.mk -VCAP_MKDB_ENDIAN )"
|
||||||
sed -i '' -e "s/%VERSION%/${PKG_VERSION}/" \
|
sed -i '' -e "s/%VERSION%/${PKG_VERSION}/" \
|
||||||
-e "s/%PKGNAME%/${origname}/" \
|
-e "s/%PKGNAME%/${origname}/" \
|
||||||
-e "s/%COMMENT%/${comment}/" \
|
-e "s/%COMMENT%/${comment}/" \
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
${MACHINE_CPUARCH} == "riscv" || \
|
${MACHINE_CPUARCH} == "riscv" || \
|
||||||
${MACHINE_ARCH:Mmips*el*} != ""
|
${MACHINE_ARCH:Mmips*el*} != ""
|
||||||
TARGET_ENDIANNESS= 1234
|
TARGET_ENDIANNESS= 1234
|
||||||
|
CAP_MKDB_ENDIAN= -l
|
||||||
.elif ${MACHINE_ARCH} == "powerpc" || \
|
.elif ${MACHINE_ARCH} == "powerpc" || \
|
||||||
${MACHINE_ARCH} == "powerpc64" || \
|
${MACHINE_ARCH} == "powerpc64" || \
|
||||||
${MACHINE_ARCH} == "powerpcspe" || \
|
${MACHINE_ARCH} == "powerpcspe" || \
|
||||||
@ -14,4 +15,5 @@ TARGET_ENDIANNESS= 1234
|
|||||||
(${MACHINE} == "arm" && ${MACHINE_ARCH:Marm*eb*} != "") || \
|
(${MACHINE} == "arm" && ${MACHINE_ARCH:Marm*eb*} != "") || \
|
||||||
${MACHINE_ARCH:Mmips*} != ""
|
${MACHINE_ARCH:Mmips*} != ""
|
||||||
TARGET_ENDIANNESS= 4321
|
TARGET_ENDIANNESS= 4321
|
||||||
|
CAP_MKDB_ENDIAN= -b
|
||||||
.endif
|
.endif
|
||||||
|
@ -12,13 +12,6 @@ FILESDIR= ${BINDIR}/misc
|
|||||||
CLEANFILES+= termcap.db
|
CLEANFILES+= termcap.db
|
||||||
|
|
||||||
.include <bsd.endian.mk>
|
.include <bsd.endian.mk>
|
||||||
.if ${TARGET_ENDIANNESS} == "1234"
|
|
||||||
CAP_MKDB_ENDIAN= -l
|
|
||||||
.elif ${TARGET_ENDIANNESS} == "4321"
|
|
||||||
CAP_MKDB_ENDIAN= -b
|
|
||||||
.else
|
|
||||||
CAP_MKDB_ENDIAN=
|
|
||||||
.endif
|
|
||||||
|
|
||||||
termcap.db: termcap
|
termcap.db: termcap
|
||||||
cap_mkdb ${CAP_MKDB_ENDIAN} -f ${.TARGET:R} ${.ALLSRC}
|
cap_mkdb ${CAP_MKDB_ENDIAN} -f ${.TARGET:R} ${.ALLSRC}
|
||||||
|
@ -19,13 +19,6 @@ SCRIPTSDIR=/usr/bin
|
|||||||
CLEANFILES= vgrindefs.src.db
|
CLEANFILES= vgrindefs.src.db
|
||||||
|
|
||||||
.include <bsd.endian.mk>
|
.include <bsd.endian.mk>
|
||||||
.if ${TARGET_ENDIANNESS} == "1234"
|
|
||||||
CAP_MKDB_ENDIAN= -l
|
|
||||||
.elif ${TARGET_ENDIANNESS} == "4321"
|
|
||||||
CAP_MKDB_ENDIAN= -b
|
|
||||||
.else
|
|
||||||
CAP_MKDB_ENDIAN=
|
|
||||||
.endif
|
|
||||||
|
|
||||||
vgrindefs.src.db: vgrindefs.src
|
vgrindefs.src.db: vgrindefs.src
|
||||||
cap_mkdb ${CAP_MKDB_ENDIAN} -f vgrindefs.src ${.ALLSRC}
|
cap_mkdb ${CAP_MKDB_ENDIAN} -f vgrindefs.src ${.ALLSRC}
|
||||||
|
Loading…
Reference in New Issue
Block a user