make showconfig: set MACHINE and MACHINE_ARCH

Previously these were not set for the showconfig target, so took the
host's value rather than the target.  As a result some machine-dependent
kernel options were not reported with correct defaults in the src.conf
manpage.

PR:		269994
Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D38926
This commit is contained in:
Ed Maste 2023-03-06 10:56:13 -05:00
parent 713264f6b8
commit d7a491dd30

View File

@ -3390,7 +3390,7 @@ check-old: check-old-files check-old-libs check-old-dirs .PHONY
# showconfig - show build configuration.
#
showconfig: .PHONY
@(${MAKE} -n -f ${.CURDIR}/sys/conf/kern.opts.mk -V dummy -dg1 UPDATE_DEPENDFILE=no NO_OBJ=yes; \
@(${MAKE} -n -f ${.CURDIR}/sys/conf/kern.opts.mk -V dummy -dg1 UPDATE_DEPENDFILE=no NO_OBJ=yes MACHINE=${TARGET} MACHINE_ARCH=${TARGET_ARCH}; \
${MAKE} -n -f ${.CURDIR}/share/mk/src.opts.mk -V dummy -dg1 UPDATE_DEPENDFILE=no NO_OBJ=yes) 2>&1 | grep ^MK_ | sort -u
.if !empty(KRNLOBJDIR) && !empty(KERNCONF)