From 7a4a520064cb7fbff79560113682d6fe1a1ae9ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Wed, 25 Jan 2023 18:03:10 +0100 Subject: [PATCH] Fix cross-build from STABLE or older CURRENT. Previously, zic and tzsetup were both listed as install tools and basic bootstrap tools. Actually, tzsetup is an install tool while zic is a non-basic bootstrap tool. Fixes: 783c318fd118 Sponsored by: Klara, Inc. Reviewed by: jrtc27, emaste Differential Revision: https://reviews.freebsd.org/D38195 --- Makefile.inc1 | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 1396a8e7a172..6435cadbd45c 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1319,10 +1319,6 @@ __installcheck_sh_check: .PHONY # # Required install tools to be saved in a scratch dir for safety. # -.if ${MK_ZONEINFO} != "no" -_zoneinfo= zic tzsetup -.endif - .if !defined(CROSSBUILD_HOST) _sysctl=sysctl .endif @@ -1330,14 +1326,19 @@ _sysctl=sysctl ITOOLS= [ awk cap_mkdb cat chflags chmod chown cmp cp \ date echo egrep find grep id install ${_install-info} \ ln make mkdir mtree mv pwd_mkdb \ - rm sed services_mkdb sh sort strip ${_sysctl} test time true uname wc \ - ${_zoneinfo} ${LOCAL_ITOOLS} + rm sed services_mkdb sh sort strip ${_sysctl} test time true uname wc + +.if ${MK_ZONEINFO} != "no" +ITOOLS+=tzsetup +.endif # Needed for share/man .if ${MK_MAN_UTILS} != "no" ITOOLS+=makewhatis .endif +ITOOLS+=${LOCAL_ITOOLS} + # # distributeworld # @@ -2238,6 +2239,11 @@ _strfile= usr.bin/fortune/strfile # C source for loader built in font (8x16.c). _vtfontcvt= usr.bin/vtfontcvt +# zic is used to compile timezone data +.if ${MK_ZONEINFO} != "no" +_zic= usr.sbin/zic +.endif + # If we are not building the bootstrap because BOOTSTRAPPING is sufficient # we symlink the host version to $WORLDTMP instead. By doing this we can also # detect when a bootstrap tool is being used without the required MK_FOO. @@ -2440,10 +2446,6 @@ _basic_bootstrap_tools+=usr.bin/jot _basic_bootstrap_tools+=sbin/md5 .endif -.if ${MK_ZONEINFO} != "no" -_basic_bootstrap_tools+=usr.sbin/zic usr.sbin/tzsetup -.endif - .if defined(BOOTSTRAP_ALL_TOOLS) _other_bootstrap_tools+=${_basic_bootstrap_tools} .for _subdir _links in ${_basic_bootstrap_tools_multilink} @@ -2528,6 +2530,7 @@ bootstrap-tools: ${_bt}-links .PHONY ${_localedef} \ ${_mkcsmapper} \ ${_mkesdb} \ + ${_zic} \ ${LOCAL_BSTOOL_DIRS} ${_bt}-${_tool}: ${_bt}-links .PHONY .MAKE ${_+_}@${ECHODIR} "===> ${_tool} (obj,all,install)"; \