[Top][All Lists]

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

Re: makefile line number when errors

From: Eli Zaretskii
Subject: Re: makefile line number when errors
Date: Fri, 06 May 2011 18:25:11 +0300

> Date: Thu, 5 May 2011 22:30:04 +0100
> From: Jon Grant <address@hidden>
> c:\>make -f test.mk
> unknown-exe
> process_begin: CreateProcess(NULL, unknown-exe, ...) failed.
> make (e=2): The system cannot find the file specified.
> make: [build] Error 2 (ignored)
> On GNU+Linux this looks like:
> $ make -f test.mk
> unknown-exe
> make: unknown-exe: Command not found
> make: [build] Error 127 (ignored)
> Would be great if it could output:
> "make: test.mk:5 unknown-exe: Command not found"

It can't do that without losing important functionality.  Unlike Unix,
Windows has too many subtle ways of invoking programs that Make
doesn't support (e.g., via file association).  By passing the command
through CreateProcess, we give the OS the last chance to run the
command if it knows how.  If it doesn't, you will see this text, which
comes from the error code 2.

Why does the exact text bother you?  Are you perhaps working with some
script that makes unduly stringent assumptions about Make error
messages?  It shouldn't: the exact error messages are system

reply via email to

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