[Top][All Lists]

[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: aotto
Subject: Re: Question WHY is gnu make does not stop on error on rule
Date: Thu, 8 Dec 2022 19:54:10 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1

On 08.12.22 18:25, Kaz Kylheku wrote:
On 2022-12-08 09:00, aotto wrote:
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
Rathern, I suspect yuo have something in the Makefile
which inspects the flags (MAKEFLAGS variable), and produces different

well, more research

1. it is an automake project with additional "hand-written" rules imported with 

grep  MAKEFLAGS Makefile
 sane_makeflags=$$MAKEFLAGS; \
   case $$MAKEFLAGSin \
       sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
             ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
       $(MAKE) $(AM_MAKEFLAGS) distdir-am
       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am

grep  silent Makefile
am__v_lt_0 = --silent

command executed: *make -silent*


MAKE_LNG        :=  cs$(MAKE_LNG): |$(MAKE_LNG).before$(MAKE_LNG).after$(MAKE_LNG).before: $(mqmsgque_meta) $(lng_MqC) $(lng_LIB) $(MqC_before) 
$(MqC_mq_before) $(lib_MqC)

mqmsgque_meta   := $(csmqmsgque_meta)

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

$(csmqmsgque_meta): LibMqMsgque_cs.h ../libmqmsgque/inline_mq.h 

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

MqC_mq_after    := csmqmsgque.dll

*PROBLEM*: the SECOND "|" command "$(MAKE_LNG).after" is executed if the 
"-silent" switch is active$(MAKE_LNG): |$(MAKE_LNG).before$(MAKE_LNG).after



reply via email to

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