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:
parent
57b18df56c
commit
7117c6a720
3
Makefile
3
Makefile
|
@ -35,6 +35,9 @@ distclean:
|
||||||
$(RM) -r $(BUILDDIR) $(TARGETS)
|
$(RM) -r $(BUILDDIR) $(TARGETS)
|
||||||
$(ECHO) " done"
|
$(ECHO) " done"
|
||||||
|
|
||||||
|
# Use an explicit rule to not "update" the Makefile via the implicit rule below.
|
||||||
|
Makefile: ;
|
||||||
|
|
||||||
%: $(BUILDDIR)/Makefile
|
%: $(BUILDDIR)/Makefile
|
||||||
$(ECHO) "Running make $@ in $(BUILDDIR)…"
|
$(ECHO) "Running make $@ in $(BUILDDIR)…"
|
||||||
$(MAKE) -C $(BUILDDIR) $@
|
$(MAKE) -C $(BUILDDIR) $@
|
||||||
|
|
Loading…
Reference in New Issue