help-make
[Top][All Lists]
Advanced

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

Re: Why does the shell I invoke Make with have an effect on its output?


From: Eli Zaretskii
Subject: Re: Why does the shell I invoke Make with have an effect on its output?
Date: Wed, 09 Mar 2022 05:25:32 +0200

> Date: Tue, 08 Mar 2022 21:37:51 +0000
> Cc: <help-make@gnu.org>
> From: "Peter0x44" <peter0x44@snopyta.org>
> 
> > > Is there a way to determine which shell the build rules of a Makefile are 
> > > being
> > > executed with?
> >
> > The answer in most cases is "none". GNU Make tries very hard to avoid
> > invoking the shell, so as to be faster, so it only goes through the
> > shell when something in the command line actually requires a shell,
> > like redirection or wildcards.
> >
> > But the rules Make applies are supposed to follow the semantics of the
> > shell that Make would have invoked. So if you have sh.exe on PATH, I
> > think Make will try to use the Posix shell semantics.
> So, there is there no way to tell which shell Make is trying to invoke/follow
> the semantics of in my Makefile?

I think the value of the SHELL variable should tell you that.  Did you
try it?

Btw, you never explained why do you need to know this.



reply via email to

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