Date: Thu, 28 Jun 2018 13:49:00 +0000 (UTC) From: Brad Davis <brd@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335762 - in head: . etc release/packages share/mk share/termcap usr.bin/vgrind Message-ID: <201806281349.w5SDn0Ir014586@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: brd Date: Thu Jun 28 13:48:59 2018 New Revision: 335762 URL: https://svnweb.freebsd.org/changeset/base/335762 Log: Simplify using bsd.endian.mk and have it provide CAP_MKDB_ENDIAN, since it is the most common usage. Approved by: bapt (mentor) Modified: head/Makefile.inc1 head/etc/Makefile head/release/packages/generate-ucl.sh head/share/mk/bsd.endian.mk head/share/termcap/Makefile head/usr.bin/vgrind/Makefile Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Jun 28 12:55:05 2018 (r335761) +++ head/Makefile.inc1 Thu Jun 28 13:48:59 2018 (r335762) @@ -1803,13 +1803,11 @@ create-kernel-packages-flavor${flavor:C,^""$,${_defaul 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,^""$,${_ 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 ; \ Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Thu Jun 28 12:55:05 2018 (r335761) +++ head/etc/Makefile Thu Jun 28 13:48:59 2018 (r335762) @@ -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} Modified: head/release/packages/generate-ucl.sh ============================================================================== --- head/release/packages/generate-ucl.sh Thu Jun 28 12:55:05 2018 (r335761) +++ head/release/packages/generate-ucl.sh Thu Jun 28 13:48:59 2018 (r335762) @@ -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}/" \ Modified: head/share/mk/bsd.endian.mk ============================================================================== --- head/share/mk/bsd.endian.mk Thu Jun 28 12:55:05 2018 (r335761) +++ head/share/mk/bsd.endian.mk Thu Jun 28 13:48:59 2018 (r335762) @@ -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 Modified: head/share/termcap/Makefile ============================================================================== --- head/share/termcap/Makefile Thu Jun 28 12:55:05 2018 (r335761) +++ head/share/termcap/Makefile Thu Jun 28 13:48:59 2018 (r335762) @@ -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} Modified: head/usr.bin/vgrind/Makefile ============================================================================== --- head/usr.bin/vgrind/Makefile Thu Jun 28 12:55:05 2018 (r335761) +++ head/usr.bin/vgrind/Makefile Thu Jun 28 13:48:59 2018 (r335762) @@ -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}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806281349.w5SDn0Ir014586>