automake
[Top][All Lists]
Advanced

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

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


From: aotto
Subject: Question WHY is gnu make does not stop on error on rule
Date: Thu, 8 Dec 2022 11:18:46 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1

Hi,

I use "automake" to setup a "gnu make" build-environment and I have the 
following rule to create a special file:

Problem: the "$(c_Meta)" failed with error but MAKE continue… why??

=====================================================

csmkkernel_meta  :=  $(srcdir)/.LibMkKernel_cs.meta
csmqmsgque_meta  :=  $(srcdir)/.LibMqMsgque_cs.meta

$(csmkkernel_meta): LibMkKernel_cs.h ../libmkkernel/inline_mk.h 
$(libmkkernel_meta)
$(csmqmsgque_meta): LibMqMsgque_cs.h ../libmqmsgque/inline_mq.h 
$(libmqmsgque_meta)
$(cslcconfig_meta): LibLcConfig_cs.h ../liblcconfig/inline_lc.h 
$(liblcconfig_meta)

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

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

that create the following debugging output:

=====================================================

Considering target file 'MqS.mq.cs'.
File 'MqS.mq.cs' does not exist.
Considering target file '.../NHI1/theLink/csmsgque/.LibMqMsgque_cs.meta'.
 File '.../NHI1/theLink/csmsgque/.LibMqMsgque_cs.meta' does not exist.
  Considering target file 'LibMqMsgque_cs.h'.
   Looking for an implicit rule for 'LibMqMsgque_cs.h'.
   No implicit rule found for 'LibMqMsgque_cs.h'.
   Finished prerequisites of target file 'LibMqMsgque_cs.h'.
  No need to remake target 'LibMqMsgque_cs.h'; using VPATH name 
'.../NHI1/theLink/csmsgque/LibMqMsgque_cs.h'.
  Considering target file '../libmqmsgque/inline_mq.h'.
   Looking for an implicit rule for '../libmqmsgque/inline_mq.h'.
   No implicit rule found for '../libmqmsgque/inline_mq.h'.
   Finished prerequisites of target file '../libmqmsgque/inline_mq.h'.
  No need to remake target '../libmqmsgque/inline_mq.h'; using VPATH name 
'.../NHI1/theLink/csmsgque/../libmqmsgque/inline_mq.h'.
 Finished prerequisites of target file 
'.../NHI1/theLink/csmsgque/.LibMqMsgque_cs.meta'.
Must remake target '.../NHI1/theLink/csmsgque/.LibMqMsgque_cs.meta'.
Makefile:959: update target '.../NHI1/theLink/csmsgque/.LibMqMsgque_cs.meta' due to: .../NHI1/theLink/csmsgque/LibMqMsgque_cs.h .../NHI1/theLink/csmsgque/../libmqmsgque/inline_mq.h
echo "  make: .../NHI1/theLink/csmsgque/.LibMqMsgque_cs.meta 
-header.../NHI1/theLink/csmsgque/LibMqMsgque_cs.h"
Putting child 0x55901938a2b0 (.../NHI1/theLink/csmsgque/.LibMqMsgque_cs.meta) 
PID 26075 on the chain.
Live child 0x55901938a2b0 (.../NHI1/theLink/csmsgque/.LibMqMsgque_cs.meta) PID 
26075
make: .../NHI1/sbin/meta/c_Meta.tcl -meta .../NHI1/theLink/csmsgque/.LibMqMsgque_cs.meta -header .../NHI1/theLink/csmsgque/LibMqMsgque_cs.h
Reaping winning child 0x55901938a2b0 PID 26075
.../NHI1/sbin/meta/c_Meta.tcl -meta .../NHI1/theLink/csmsgque/.LibMqMsgque_cs.meta -header .../NHI1/theLink/csmsgque/LibMqMsgque_cs.h && touch .../NHI1/theLink/csmsgque/.LibMqMsgque
_cs.meta
Live child 0x55901938a2b0 (.../NHI1/theLink/csmsgque/.LibMqMsgque_cs.meta) PID 
26076

...
pInit                                    -> api<Meta>, 
imeta<.../NHI1/theLink/csmsgque/.LibMqMsgque_cs.meta>,
ProcessParseC                            -> 
inf<.../NHI1/theLink/csmsgque/LibMqMsgque_cs.h>, argv<>,
ProcessParseC                            -> list<incdir>, list<cppargs>, 
list<defs>,
....
ProcessParseC                            -> ERROR: preprocessor failed -> large<cmd>, 
large<buf>,
large = cmd
  | cpp -P -x c -DPARSE_C_HEADER_TO_META -D_DEBUG -D__has_parser__ -D__thread= -Dregister= -Dextern= -Dsigned= -DLONG_MAX=2147483647L -DMETA_HAS_THREAD=1 -DMETA_HAS_PTHREAD=1 -DMETA_HAVE_LIBCONFIG=1 -include msgque_config.h -I.../NHI 1/theLink/csmsgque -I.../NHI1/theLink/libmkkernel -I/dev/shm/dev1usr/Main/x86_64-suse-linux-gnu/debug -Dtypedef=§typedef§ -Dstruct=§struct§ -Dunion=§union§ -Denum=§enum§ -Dconst=§const§ -Dunsigned=§unsigned§ .../NHI1/
theLink/csmsgque/LibMqMsgque_cs.h
large = buf
  | .../NHI1/theLink/csmsgque/LibMqMsgque_cs.h:12:10: fatal error: msgque_mq.h: 
No such file or directory
  |    12 | #include "msgque_mq.h"
  |       |          ^~~~~~~~~~~~~
  | compilation terminated.
  | child process exited abnormally
  while executing
"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 1441)
Reaping losing child 0x55901938a2b0 PID 26076
Removing child 0x55901938a2b0 PID 26076 from chain.
Successfully remade target file 
'.../NHI1/theLink/csmsgque/.LibMqMsgque_cs.meta'.

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

analyze:

1. the "c_Meta.tcl ..." return with errocode
2. Reaping losing child 0x55901938a2b0 PID 26076
3. Removing child 0x55901938a2b0 PID 26076 from chain.
4. !! Successfully remade target file 
'.../NHI1/theLink/csmsgque/.LibMqMsgque_cs.meta'.
5. file: .../NHI1/theLink/csmsgque/.LibMqMsgque_cs.meta does NOT exists
6. the "touch" at the end only runs on success
7. the "@$(call green,$(c_Meta) -meta $@ -header $<)" only create fancy 
debugging output


sincerely

ao




reply via email to

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