git: fe3392ed8d42 - main - Mk/*: unconditionally use .MAKE.UID and .MAKE.GID

From: Christian Weisgerber <naddy_at_FreeBSD.org>
Date: Mon, 15 Jan 2024 16:17:39 UTC
The branch main has been updated by naddy:

URL: https://cgit.FreeBSD.org/ports/commit/?id=fe3392ed8d428ccb922ea60097e4cac7c95ad07a

commit fe3392ed8d428ccb922ea60097e4cac7c95ad07a
Author:     Christian Weisgerber <naddy@FreeBSD.org>
AuthorDate: 2024-01-11 14:53:35 +0000
Commit:     Christian Weisgerber <naddy@FreeBSD.org>
CommitDate: 2024-01-15 16:17:05 +0000

    Mk/*: unconditionally use .MAKE.UID and .MAKE.GID
    
    Since FreeBSD 12 has been EOLed, the built-in make(1) variables
    .MAKE.UID and .MAKE.GID are always available.
    
    PR:             276259
    Approved by:    arrowd
---
 Mk/Uses/uidfix.mk     | 4 +---
 Mk/bsd.port.mk        | 8 +-------
 Mk/bsd.port.subdir.mk | 4 +---
 3 files changed, 3 insertions(+), 13 deletions(-)

diff --git a/Mk/Uses/uidfix.mk b/Mk/Uses/uidfix.mk
index b8828d4a8a29..4fcce22846ef 100644
--- a/Mk/Uses/uidfix.mk
+++ b/Mk/Uses/uidfix.mk
@@ -8,9 +8,7 @@
 
 .if !defined(_INCLUDE_USES_UIDFIX_MK)
 _INCLUDE_USES_UIDFIX_MK=	yes
-.  if !defined(GID)
-GID!=	id -g
-.  endif
+GID?=	${.MAKE.GID}
 .  if ${UID} != 0
 MAKE_ENV+=	BINOWN=${UID} SHAREOWN=${UID} CONFOWN=${UID} LIBOWN=${UID}
 MAKE_ENV+=	BINGRP=${GID} SHAREGRP=${GID} CONFGRP=${GID} LIBGRP=${GID}
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 54390720912e..203b78749fd7 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -1448,13 +1448,7 @@ USES+=mysql:${USE_MYSQL}
 .include "${PORTSDIR}/Mk/bsd.wx.mk"
 .    endif
 
-.    if !defined(UID)
-.      if defined(.MAKE.UID)
-UID=	${.MAKE.UID}
-.      else
-UID!=	${ID} -u
-.      endif
-.    endif
+UID?=	${.MAKE.UID}
 
 DESTDIRNAME?=	DESTDIR
 
diff --git a/Mk/bsd.port.subdir.mk b/Mk/bsd.port.subdir.mk
index cc2cc81da01b..d83379a52feb 100644
--- a/Mk/bsd.port.subdir.mk
+++ b/Mk/bsd.port.subdir.mk
@@ -137,9 +137,7 @@ _JAVA_PORTS_INSTALLED!=		${MAKE} -V _JAVA_PORTS_INSTALLED USE_JAVA=1 -f ${PORTSD
 .  endif
 _EXPORTED_VARS+=	_JAVA_PORTS_INSTALLED
 
-.  if !defined(UID)
-UID!=	${ID} -u
-.  endif
+UID?=	${.MAKE.UID}
 _EXPORTED_VARS+=	UID
 
 .endif