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: Sébastien Hinderer
Subject: Re: Which make-related variables are passed to subprocesses
Date: Sat, 21 Apr 2018 07:30:56 +0200

Paul Smith (2018/04/20 22:53 -0400):
> On Fri, 2018-04-20 at 23:33 +0200, Sébastien Hinderer wrote:
> > Well, perhaps the way I designed things is wrong, but it turns out that
> > in my case it would make a lot of sense. I am developiing a test driver
> > which needs to invoke make to build some tests. Ideally it should invoke
> > the same make that was used to invoke it, that's why having the MAKE
> > variable would be useful. Well I passed it explicitly to things do work
> > now.
> 
> If you need to run a program that needs to invoke make, then yes you
> should pass it explicitly to that program.  Or you can ask make to
> export the MAKE variable by adding:
> 
>   export MAKE
> 
> to your makefile.
> 
> Normally, sub-makes are invoked directly, like:
> 
>   recurse:
>           $(MAKE) -C subdir
> 
> or whatever.  In this situation there's no need for the MAKE variable
> to be added to the environment of the sub-process by default.

Sure, all this makes perfect sense, thanks.

But then I'd say that my remaining question would be: why are the other
make-related varialbes exported to sub-shells running non-make commands?

Sébastien.



reply via email to

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