|
From: | aotto |
Subject: | Re: Question WHY is gnu make does not stop on error on rule |
Date: | Thu, 8 Dec 2022 18:00:36 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 |
On 08.12.22 14:49, Paul Smith wrote:
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!
Hi, I found the reason, it was the "-silent" switch. -s, --silent, --quiet Silent operation; do not print the commands as they are executed. but in reality the "-silent" switch even disable the "fail-on-error" feature I log the debug-mode WITH and WITHOUT "-silent" switch 1. with "-silent" ========================================== "Error "preprocessor failed" cmd buf" (procedure "ProcessParseC" line 38) invoked from within "ProcessParseC" ("uplevel" body line 33) invoked from within "uplevel $script" (procedure "pMain" line 19) invoked from within "pMain { interp alias "" pWRIT "" pWRIT_stdout ## ## ==========================================================================================..." (file "NHI1/sbin/meta/c_Meta.tcl" line 1450) Reaping losing child 0x564324900c20 PID 18605 Removing child 0x564324900c20 PID 18605 from chain. Successfully remade target file 'NHI1/theLink/csmsgque/.LibMqMsgque_cs.meta'. Considering target file 'NHI1/sbin/meta/cs_MqC.tcl'. Looking for an implicit rule for 'NHI1/sbin/meta/cs_MqC.tcl'. No implicit rule found for 'NHI1/sbin/meta/cs_MqC.tcl'. Finished prerequisites of target file 'NHI1/sbin/meta/cs_MqC.tcl'. No need to remake target 'NHI1/sbin/meta/cs_MqC.tcl'. Considering target file 'NHI1/sbin/meta/lib_CS.tcl'. Looking for an implicit rule for 'NHI1/sbin/meta/lib_CS.tcl'. ... ============================================== 2. without "-silent" "Error "preprocessor failed" cmd buf" (procedure "ProcessParseC" line 38) invoked from within "ProcessParseC" ("uplevel" body line 33) invoked from within "uplevel $script" (procedure "pMain" line 19) invoked from within "pMain { interp alias "" pWRIT "" pWRIT_stdout ## ## ==========================================================================================..." (file "NHI1/sbin/meta/c_Meta.tcl" line 1450) Reaping losing child 0x5642b90abc20 PID 18622 make: *** [Makefile:961: NHI1/theLink/csmsgque/.LibMqMsgque_cs.meta] Error 1 Removing child 0x5642b90abc20 PID 18622 from chain. (finish) sincerely ao
[Prev in Thread] | Current Thread | [Next in Thread] |