> Date: Tue, 08 Mar 2022 21:37:51 +0000 > Cc: <help-make@gnu.org> > From: "Peter0x44" <peter0...@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.