git: ea9a92d21007 - main - Makefile.inc1: synthesize PKG_ABI from newvers.sh variables
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 11 Feb 2022 17:01:42 UTC
The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=ea9a92d21007de1d445dc0539331ad6632eb4ad3 commit ea9a92d21007de1d445dc0539331ad6632eb4ad3 Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2022-02-10 20:42:05 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2022-02-11 16:26:07 +0000 Makefile.inc1: synthesize PKG_ABI from newvers.sh variables Previously we inspected ${WSTAGEDIR}/usr/bin/uname to determine PKG_ABI, but the file will not exist in some cases - for example, if building only kernel packages. We can instead synthesize the PKG_ABI from information already provided by newvers.sh. Reviewed by: kevans, manu (both earlier rev) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D34249 --- Makefile.inc1 | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index d27a81d7904d..cbbb2bc83ffc 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -522,7 +522,7 @@ OSRELDATE= 0 .endif # Set VERSION for CTFMERGE to use via the default CTFFLAGS=-L VERSION. -.for _V in BRANCH REVISION +.for _V in BRANCH REVISION TYPE .if !defined(_${_V}) _${_V}!= eval $$(awk '/^${_V}=/{print}' ${SRCTOP}/sys/conf/newvers.sh); echo $$${_V} .export _${_V} @@ -1882,12 +1882,10 @@ _pkgbootstrap: .PHONY .endif # -# Allow overriding PKG_ABI, this allow to create kernel packages without having -# to build world first. -# If it's not provided resolv it from the uname binary in the world stage. +# Determine PKG_ABI from newvers.sh if not already set. # .if !defined(PKG_ABI) && (make(create-world-packages-jobs) || make(create-kernel-packages*) || make(real-update-packages) || make(sign-packages)) -PKG_ABI!=${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/usr/bin/uname config ABI +PKG_ABI=${_TYPE}:${_REVISION:S/\..*$//}:${TARGET_ARCH} .endif PKG_BIN_VERSION!=${PKG_CMD} --version </dev/null 2>/dev/null |\ awk -F. '/^[0-9.]+$$/ {print $$1 * 10000 + $$2 * 100 + $$3}'