Arguments passed to make for the top level port build for devel/gprbuild can be consumed by gmake used to build the actual upstream project (vs the ports infrastructure 'make' operations). For instance, 'make -DNO_DEPENDS stage' will pass "MAKEFLAGS= -D NO_DEPENDS ..." in the environment to the gmake invocation. gmake chokes on that with the following: : invalid option -- D Usage: gmake [options] [target] ... Options: -b, -m Ignored for compatibility. -B, --always-make Unconditionally make all targets. . . A fix for that is to clear the environment as with the ports 572f2361692640bc27729191b1267aa3fcc354a7 commit that added SETENVI and WRK_ENV.
Created attachment 253435 [details] [patch] use SETENVI to clear MAKEFLAGS before sub-gmake This patch clears the environment (specifically for MAKEFLAGS) before calling gmake in 'stage'. The do-install in devel/gprbuild/Makefile was nearly a copy of do-install from bsd.port.mk. This change just catches up to the same change from bsd.port.mk's do-install in ports 572f2361692640bc27729191b1267aa3fcc354a7 QA: poudriere testport - ok portlint - no errors, no new warnings portclippy - no new out of order directives
No maintainer, but CC'd recent committer. No need for PORTREVISION bump.
Committed, thanks!
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=b1e0fa4c74455d9a71d57d3d1107ecd8380deab0 commit b1e0fa4c74455d9a71d57d3d1107ecd8380deab0 Author: John Hein <jcfyecrayz@liamekaens.com> AuthorDate: 2025-01-12 11:13:37 +0000 Commit: Thierry Thomas <thierry@FreeBSD.org> CommitDate: 2025-01-12 15:25:26 +0000 devel/gprbuild: don't let MAKEFLAGS pollute gprbuild gmake invocation PR: 281373 Reported by: John Hein <jcfyecrayz (at) liamekaens.com> devel/gprbuild/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)