git: 0713649f5808 - main - index: respect `make -j X index`

From: Mathieu Arnold <mat_at_FreeBSD.org>
Date: Wed, 23 Jul 2025 12:40:25 UTC
The branch main has been updated by mat:

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

commit 0713649f5808039a4444f884f19d99f3a81625c7
Author:     Wolfram Schneider <wosch@FreeBSD.org>
AuthorDate: 2025-07-23 12:38:57 +0000
Commit:     Mathieu Arnold <mat@FreeBSD.org>
CommitDate: 2025-07-23 12:39:42 +0000

    index: respect `make -j X index`
    
    PR:     288349
---
 Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Makefile b/Makefile
index 9563c5c266ae..79ecd0deacd6 100644
--- a/Makefile
+++ b/Makefile
@@ -92,7 +92,11 @@ SETENV?=	/usr/bin/env
 FETCHINDEX?=	${SETENV} ${FETCH_ENV} fetch -am -o
 
 .if !defined(INDEX_JOBS)
+.  if defined(.MAKE.JOBS)
+INDEX_JOBS=	${.MAKE.JOBS}
+.  else
 INDEX_JOBS!=	${SYSCTL} -n kern.smp.cpus
+.  endif
 .endif
 
 .if !defined(INDEX_VERBOSE)