git: ba4d333364ea - main - dirdeps.mk for host* DEP_TARGET_SPEC is just DEP_MACHINE

From: Simon J. Gerraty <sjg_at_FreeBSD.org>
Date: Thu, 04 May 2023 18:29:40 UTC
The branch main has been updated by sjg:

URL: https://cgit.FreeBSD.org/src/commit/?id=ba4d333364ea7b4f8bccce3e5f35bd989b707c6a

commit ba4d333364ea7b4f8bccce3e5f35bd989b707c6a
Author:     Simon J. Gerraty <sjg@FreeBSD.org>
AuthorDate: 2023-05-04 18:29:33 +0000
Commit:     Simon J. Gerraty <sjg@FreeBSD.org>
CommitDate: 2023-05-04 18:29:33 +0000

    dirdeps.mk for host* DEP_TARGET_SPEC is just DEP_MACHINE
    
    This helps avoid ugly noise in dirdeps.cache on Linux.
---
 share/mk/dirdeps.mk | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/share/mk/dirdeps.mk b/share/mk/dirdeps.mk
index 6fedd00310e9..83b620044aa5 100644
--- a/share/mk/dirdeps.mk
+++ b/share/mk/dirdeps.mk
@@ -1,4 +1,4 @@
-# $Id: dirdeps.mk,v 1.157 2023/04/22 21:07:51 sjg Exp $
+# $Id: dirdeps.mk,v 1.158 2023/05/04 18:26:17 sjg Exp $
 
 # SPDX-License-Identifier: BSD-2-Clause
 #
@@ -333,6 +333,14 @@ DEP_${TARGET_SPEC_VARS:[$i]} := ${_tspec:[$i]}
 DEP_MACHINE := ${_DEP_TARGET_SPEC}
 .endif
 
+# host is special
+.if ${DEP_MACHINE:Mhost*} != ""
+DEP_TARGET_SPEC = ${DEP_MACHINE}
+.for v in ${TARGET_SPEC_VARS:O:u:NMACHINE}
+.undef DEP_$v
+.endfor
+.endif
+
 # reset each time through
 _build_all_dirs =
 _build_xtra_dirs =