[Midnightbsd-cvs] [MidnightBSD/mports] aee0fd: gmake.mk: clear MAKEFLAGS to prevent bmake flags l...

Lucas Holt noreply at github.com
Sun Apr 26 13:50:59 EDT 2026


  Branch: refs/heads/master
  Home:   https://github.com/MidnightBSD/mports
  Commit: aee0fd3785bb03fd7e7d6afe80bedc469218d581
      https://github.com/MidnightBSD/mports/commit/aee0fd3785bb03fd7e7d6afe80bedc469218d581
  Author: Lucas Holt <luke at foolishgames.com>
  Date:   2026-04-26 (Sun, 26 Apr 2026)

  Changed paths:
    M Mk/extensions/gmake.mk

  Log Message:
  -----------
  gmake.mk: clear MAKEFLAGS to prevent bmake flags leaking into gmake

When a gmake-using port is built as a dependency, do-depends.sh invokes
bmake with MAKEFLAGS set to bmake-specific flags (e.g. -DINSTALLS_DEPENDS).
The run-fake target in Mk/components/fake/targets.mk uses SETENV (env,
not env -i), so MAKEFLAGS is inherited by gmake. Since gmake does not
understand bmake's -D syntax it errors out.

Fix by adding MAKEFLAGS= to MAKE_ENV in gmake.mk, which resets the
variable before gmake is invoked in both DO_MAKE_BUILD and run-fake.

Tested by running: MAKEFLAGS="-DINSTALLS_DEPENDS" bmake fake
in devel/rlog (a USES=gmake port); fake stage now completes cleanly.

AI-Assisted-by: Claude Sonnet 4.6 <noreply at anthropic.com>
Signed-off-by: Lucas Holt <luke at foolishgames.com>



To unsubscribe from these emails, change your notification settings at https://github.com/MidnightBSD/mports/settings/notifications


More information about the Midnightbsd-cvs mailing list