Bug 286081 - devel/py3c: don't let MAKEFLAGS pollute gmake invocation
Summary: devel/py3c: don't let MAKEFLAGS pollute gmake invocation
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Lev A. Serebryakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-13 20:59 UTC by John Hein
Modified: 2025-04-15 15:51 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (lev)


Attachments
[patch] use SETENVI to clear MAKEFLAGS before sub-gmake (610 bytes, patch)
2025-04-13 21:08 UTC, John Hein
jcfyecrayz: maintainer-approval? (lev)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Hein 2025-04-13 20:59:41 UTC
Arguments passed to make for the top level port build for devel/py3c 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.
Comment 1 John Hein 2025-04-13 21:08:24 UTC
Created attachment 259529 [details]
[patch] use SETENVI to clear MAKEFLAGS before sub-gmake

- don't let MAKEFLAGS from ports 'make' pollute the build gmake.
- generally, don't mute install commands

This patch clears the environment (specifically for MAKEFLAGS) before calling gmake in 'stage'.  This change just catches up to the same change from bsd.port.mk's do-install in ports 572f2361692640bc27729191b1267aa3fcc354a7

Also see 20240229 entry in UPDATING.

QA:
 poudriere testport - ok
 portlint - ok
 portclippy - ok
Comment 2 commit-hook freebsd_committer freebsd_triage 2025-04-15 15:51:14 UTC
A commit in branch main references this bug:

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

commit c619967f1b7f85d38ef42e82b910c613b699567d
Author:     Lev A. Serebryakov <lev@FreeBSD.org>
AuthorDate: 2025-04-15 15:49:47 +0000
Commit:     Lev A. Serebryakov <lev@FreeBSD.org>
CommitDate: 2025-04-15 15:49:47 +0000

    devel/py3c: don't let MAKEFLAGS pollute gmake invocation

    PR:             286081
    Reported by:    John Hein <jcfyecrayz@liamekaens.com>

 devel/py3c/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 3 Lev A. Serebryakov freebsd_committer freebsd_triage 2025-04-15 15:51:53 UTC
Committed, thnx!