help-make
[Top][All Lists]
Advanced

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

Re: Question WHY is gnu make does not stop on error on rule


From: Paul Smith
Subject: Re: Question WHY is gnu make does not stop on error on rule
Date: Thu, 08 Dec 2022 08:49:36 -0500
User-agent: Evolution 3.46.1 (by Flathub.org)

On Thu, 2022-12-08 at 11:18 +0100, aotto wrote:
> Problem: the "$(c_Meta)" failed with error but MAKE continue… why??

Make uses the exit code of the process to determine whether the command
should be considered to have succeeded (exits with 0) or failed (exits
with any code other than 0).

> $(csmkkernel_meta) $(csmqmsgque_meta) $(cslcconfig_meta):
>     @$(call green,$(c_Meta) -meta $@ -header $<)
>     @$(c_Meta) -meta $@ -header $< && touch $@

The very first thing you should always do when trying to figure out
makefile issues is REMOVE all the "@" tokens that hide the output make
would use to show you what it is doing.

Using "@" is like trying to debug your program in a terminal window
with black foreground on black background, or sending all the logging
to /dev/null.

Personally I don't use "@" at all in any command that does actual work.
If you want to have the option to show or not consider something like:
https://make.mad-scientist.net/managing-recipe-echoing/

Once you see the commands that are being invoked if you still don't
understand the problem please provide that detail to us.

Secondly please be sure to include the operating system and version,
and version of GNU make that you're using when asking for help.

Cheers!



reply via email to

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