Page MenuHomeFreeBSD

sys.mk: Improve ports compatibility hack guard
ClosedPublic

Authored by brooks on Tue, Mar 4, 6:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Mar 17, 6:08 PM
Unknown Object (File)
Sat, Mar 15, 1:05 AM
Unknown Object (File)
Sat, Mar 8, 3:35 AM
Unknown Object (File)
Thu, Mar 6, 8:51 AM
Unknown Object (File)
Thu, Mar 6, 8:02 AM
Unknown Object (File)
Thu, Mar 6, 7:40 AM
Unknown Object (File)
Thu, Mar 6, 4:54 AM
Unknown Object (File)
Thu, Mar 6, 4:33 AM
Subscribers

Details

Summary

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 come to match something in share/mk.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

brooks requested review of this revision.Tue, Mar 4, 6:16 PM

FWIW, I looked into what it would take to retire this hunk of code the do the include to bsd.port.mk and it's a bit annoying due to a lack of guards on bsd.cpu.mk. I think it might work to have it included twice anyway, but it would probably be best to add some include guards, MFC them and wait for branches without them to drop out of support.

This revision is now accepted and ready to land.Tue, Mar 4, 6:50 PM

add some include guards, MFC them and wait for branches without them to drop out of support

That sounds good to me