bug-make
[Top][All Lists]
Advanced

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

[bug #60595] make doesn't always restart when a makefile is rebuilt


From: Paul D. Smith
Subject: [bug #60595] make doesn't always restart when a makefile is rebuilt
Date: Mon, 31 May 2021 09:06:08 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36

Follow-up Comment #4, bug #60595 (project make):

Thanks for the description.  Here's a much simpler repro case:


all: ; @echo RESTARTS=$(MAKE_RESTARTS)

m1.d: ; touch $@

m2.d: m1.d ; test -f $< || touch $@

include m2.d m1.d


If you run this makefile with:


rm -f m?.d && make


it will correctly restart make and print RESTARTS=1.

If you change the last line to reverse the order of include:


include m1.d m2.d


then it will not restart make and print RESTARTS=.

As a note when we do fix this problem the above makefile will fail on the
"include" line after the restart because the rule that says it built m2.d
actually didn't.  I assume in your real makefile you've accounted for this and
something does build the target makefile (or maybe you include it with
"-include").

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?60595>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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