aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.inc14
-rw-r--r--etc/Makefile7
-rwxr-xr-xrelease/packages/generate-ucl.sh2
-rw-r--r--share/mk/bsd.endian.mk2
-rw-r--r--share/termcap/Makefile7
-rw-r--r--usr.bin/vgrind/Makefile7
6 files changed, 3 insertions, 26 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index 1fc9027ee0f4..2d03ce29cf6f 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -1803,13 +1803,11 @@ create-kernel-packages-flavor${flavor:C,^""$,${_default_flavor},}: _pkgbootstrap
env -i LC_COLLATE=C sort ${KSTAGEDIR}/kernel.meta | \
awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk \
-v kernel=yes -v _kernconf=${INSTALLKERNEL} ; \
- cap_arg=`cd ${SRCDIR}/etc ; ${MAKE} -VCAP_MKDB_ENDIAN` ; \
sed -e "s/%VERSION%/${PKG_VERSION}/" \
-e "s/%PKGNAME%/kernel-${INSTALLKERNEL:tl}${flavor}/" \
-e "s/%KERNELDIR%/kernel/" \
-e "s/%COMMENT%/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}/" \
${SRCDIR}/release/packages/kernel.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 | \
awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk \
-v kernel=yes -v _kernconf=${_kernel} ; \
- cap_arg=`cd ${SRCDIR}/etc ; ${MAKE} -VCAP_MKDB_ENDIAN` ; \
sed -e "s/%VERSION%/${PKG_VERSION}/" \
-e "s/%PKGNAME%/kernel-${_kernel:tl}${flavor}/" \
-e "s/%KERNELDIR%/kernel.${_kernel}/" \
-e "s/%COMMENT%/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}/" \
${SRCDIR}/release/packages/kernel.ucl \
> ${KSTAGEDIR}/kernel.${_kernel}/kernel.${_kernel}${flavor}.ucl ; \
diff --git a/etc/Makefile b/etc/Makefile
index d8c1c0ab590a..008def751ef5 100644
--- a/etc/Makefile
+++ b/etc/Makefile
@@ -178,13 +178,6 @@ distribute:
${_+_}cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION}
.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)
METALOG.add?= cat -l >> ${METALOG}
diff --git a/release/packages/generate-ucl.sh b/release/packages/generate-ucl.sh
index b9798b226185..bcf71e9919f6 100755
--- a/release/packages/generate-ucl.sh
+++ b/release/packages/generate-ucl.sh
@@ -131,7 +131,7 @@ main() {
[ -z "${desc}" ] && desc="${outname} package"
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}/" \
-e "s/%PKGNAME%/${origname}/" \
-e "s/%COMMENT%/${comment}/" \
diff --git a/share/mk/bsd.endian.mk b/share/mk/bsd.endian.mk
index eac92c6838f7..d98bd4f936cf 100644
--- a/share/mk/bsd.endian.mk
+++ b/share/mk/bsd.endian.mk
@@ -7,6 +7,7 @@
${MACHINE_CPUARCH} == "riscv" || \
${MACHINE_ARCH:Mmips*el*} != ""
TARGET_ENDIANNESS= 1234
+CAP_MKDB_ENDIAN= -l
.elif ${MACHINE_ARCH} == "powerpc" || \
${MACHINE_ARCH} == "powerpc64" || \
${MACHINE_ARCH} == "powerpcspe" || \
@@ -14,4 +15,5 @@ TARGET_ENDIANNESS= 1234
(${MACHINE} == "arm" && ${MACHINE_ARCH:Marm*eb*} != "") || \
${MACHINE_ARCH:Mmips*} != ""
TARGET_ENDIANNESS= 4321
+CAP_MKDB_ENDIAN= -b
.endif
diff --git a/share/termcap/Makefile b/share/termcap/Makefile
index 6cb2ab752f78..d9041076fd71 100644
--- a/share/termcap/Makefile
+++ b/share/termcap/Makefile
@@ -12,13 +12,6 @@ FILESDIR= ${BINDIR}/misc
CLEANFILES+= termcap.db
.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
cap_mkdb ${CAP_MKDB_ENDIAN} -f ${.TARGET:R} ${.ALLSRC}
diff --git a/usr.bin/vgrind/Makefile b/usr.bin/vgrind/Makefile
index a7dc9a185322..38a2a3193991 100644
--- a/usr.bin/vgrind/Makefile
+++ b/usr.bin/vgrind/Makefile
@@ -19,13 +19,6 @@ SCRIPTSDIR=/usr/bin
CLEANFILES= vgrindefs.src.db
.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
cap_mkdb ${CAP_MKDB_ENDIAN} -f vgrindefs.src ${.ALLSRC}