bug-make
[Top][All Lists]
Advanced

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

Re: GNU make troubleshooting


From: Paul Smith
Subject: Re: GNU make troubleshooting
Date: Sun, 27 Aug 2023 09:49:04 -0400
User-agent: Evolution 3.48.4 (by Flathub.org)

On Sun, 2023-08-27 at 16:33 +0300, Eli Zaretskii wrote:
> That error code 2 means file not found, and -1 means a command was
> not found or completely failed to run.  It is easy to show a couple
> of examples for each one, we see those every day.

That might be true in Windows but it's not the case in POSIX systems:

$ make
make: foobar: No such file or directory
make: *** [Makefile:3: all] Error 127

And, even 127 is just a convention which is adopted by some shells;
there's no reason why a program couldn't exit with that code as well
for example.

As for -1, that's not a valid POSIX error code.

It's true that "2" is the exit code for a shell if it fails to parse
the shell script due to a syntax error or something; maybe that's worth
mentioning.

-- 
Paul D. Smith <psmith@gnu.org>            Find some GNU make tips at:
https://www.gnu.org                       http://make.mad-scientist.net
"Please remain calm...I may be mad, but I am a professional." --Mad
Scientist



reply via email to

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