Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • 2
    I just tested, and it appears that under GNU make, if the command contains no shell metacharacters, it's executed directly, with no shell at all! Commented Jul 20, 2015 at 19:54
  • 2
    @ it is the words “as if” that are important. The spec is about behaviour (semantics), not about implementation. Commented Jul 20, 2015 at 20:38
  • A comment only for running GoW make on Windows: - The default SHELL in windows is usually cmd.exe - In Windows SHELL environment variable might be set outside makefile thus altering the makefile behavior - It is recommended to add "SHELL = cmd.exe" or similar in the beginning of makefile to force a known shell syntax for the execution of the makefile Commented Apr 30, 2019 at 13:24
  • Hey Michael, what exactly is that documentation that you've linked for sh? When talking about Linux stuff, it is very common for me to see somebody linking a doc and I do not understand what exactly is that documentation. Is it official documentation for make, for sh, or else? I'm trying to understand what exactly I'm reading there. Commented Jun 12, 2020 at 16:36
  • 1
    @RafaelEyng: Four years late, but any URL beginning with pubs.opengroup.org is (most of the time) a link to the POSIX standard. Technically, it's not documentation at all, but the vast majority of Unix-like systems are at least mostly conformant to POSIX, so it is helpful as a baseline for what you can expect on a wide variety of different operating systems. Commented Aug 1, 2024 at 3:26