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

Eli Zaretskii <[email protected]>
Newsgroups gmane.comp.gnu.make.general
Message-ID <[email protected]>
> Date: Tue, 08 Mar 2022 21:37:51 +0000
> Cc: <[email protected]>
> From: "Peter0x44" <[email protected]>
> 
> > > 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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.