From f383cfc03bbf89516135d67dcd6018a6be1b9533 Mon Sep 17 00:00:00 2001 From: Brooks Davis Date: Tue, 4 Mar 2025 20:50:32 +0000 Subject: [PATCH] sys.mk: Improve ports compatibility hack guard Back in 9ca543438039 and include of bsd.cpu.mk in sys.mk was added as a hack for ports Makefiles. This works fine in general (for values of fine that include not being able to use MK_ variables in bsd.cpu.mk), but has surprising effects on MacOS with a case insensitive filesystems. There we build things in paths like share/docs/IPv6 where ../../Mk/bsd.port.mk matches share/mk/bsd.port.mk. Fix this issue by checking for ../../Mk/Uses which seems highly unlikely to match something in share/mk. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D49232 (cherry picked from commit e62ff34a6761025203b77ffb241c926ac8d218c8) --- share/mk/sys.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/mk/sys.mk b/share/mk/sys.mk index 8cdaae4a3de..b668e4b3a75 100644 --- a/share/mk/sys.mk +++ b/share/mk/sys.mk @@ -326,7 +326,7 @@ __MAKE_SHELL?=/bin/sh # the ports files are modernized, and a reasonable transition # period has passed, include it while we're in a ports tree here # to preserve historic behavior. -.if exists(${.CURDIR}/../../Mk/bsd.port.mk) +.if exists(${.CURDIR}/../../Mk/Uses) .include .endif