help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Which make-related variables are passed to subprocesses


From: Paul Smith
Subject: Re: Which make-related variables are passed to subprocesses
Date: Fri, 20 Apr 2018 13:46:15 -0400

On Fri, 2018-04-20 at 11:41 +0200, Sébastien Hinderer wrote:
> Am I correct that variables like MAKEFLAGS and MAKEOVERRIDE are passed
> to any subshell called by make, whereas MAKE is not?
> 
> May I ask why this is so?

The MAKE variable is set to the currently-executing make program.  It
doesn't make sense to inherit that value from the parent process.

You can figure out which variables are passed down to the sub-makes
using something like:

   echo 'all:;-env | sort' | make -f- FOO=bar

You can compare that with the variables exported from the current
shell, or grep for 'MAKE' to see variables related to make (I think all
the default ones contain that string).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]