On Thu, 2021-05-06 at 17:27 +0100, Shareef Jalloq wrote:
> OK, just to clarify sorry, the issue here is that MAKEFLAGS are
> propagated down to any sub-shells from my main command line?  So I
> can work around this by just clearing MAKEFLAGS in my call to
> subprocess.run() when I pass in the env.  Is that the only way to run
> a "clean" make command from a sub-shell?

Sorry, I don't understand the question.

In general you should not modify MAKEFLAGS, unless you have a very good
reason.

If someone invokes "make FOO=bar" then that setting of FOO will
override any setting of FOO in the makefile (unless overridden).

That command line setting will also be passed down to any sub-makes
that are invoked, just like most other make options are passed down.
 This is generally what you want.

If there's a reason you DON'T want a specific command-line variable
override to be passed down then the safest way to handle that is by
changing the MAKEOVERRIDES variable.

All the details are in the manual as Martin mentioned:

https://www.gnu.org/software/make/manual/html_node/Options_002fRecursion.html

If, after reading that, you still have problems or questions let us
know.

Cheers!


Reply via email to