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
This commit is contained in:
Daniel Hahler 2017-10-22 15:32:37 +02:00 committed by GitHub
parent 57b18df56c
commit 7117c6a720
1 changed files with 3 additions and 0 deletions

View File

@ -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) $@