From 7117c6a7203165bee87b3fd0ffd2c995f0b754b1 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sun, 22 Oct 2017 15:32:37 +0200 Subject: [PATCH] Makefile: add explicit rule for Makefile to not "update" it (#2071) Typically the implicit rule below will trigger a "make -C build Makefile" run, whenever build/Makefile is newer than our Makefile. Ref: https://www.gnu.org/software/make/manual/html_node/Remaking-Makefiles.html --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index c63b073a5..c4d5af957 100644 --- a/Makefile +++ b/Makefile @@ -35,6 +35,9 @@ distclean: $(RM) -r $(BUILDDIR) $(TARGETS) $(ECHO) " done" +# Use an explicit rule to not "update" the Makefile via the implicit rule below. +Makefile: ; + %: $(BUILDDIR)/Makefile $(ECHO) "Running make $@ in $(BUILDDIR)…" $(MAKE) -C $(BUILDDIR) $@