The branch main has been updated by brooks:

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

commit e62ff34a6761025203b77ffb241c926ac8d218c8
Author:     Brooks Davis <bro...@freebsd.org>
AuthorDate: 2025-03-04 20:50:32 +0000
Commit:     Brooks Davis <bro...@freebsd.org>
CommitDate: 2025-03-04 20:51:10 +0000

    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
---
 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 44db9266784f..26f31c104088 100644
--- a/share/mk/sys.mk
+++ b/share/mk/sys.mk
@@ -321,7 +321,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 <bsd.cpu.mk>
 .endif
 

Reply via email to