From 5164cdcfe6852b6be34869482656f472ed4b5a17 Mon Sep 17 00:00:00 2001 From: Alex Fabijanic Date: Mon, 16 Oct 2023 12:27:55 +0200 Subject: [PATCH] fix(make): make clean and distclean should not trigger dependencies creation #4129 --- build/rules/compile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/build/rules/compile b/build/rules/compile index afaf1bfb01..06faa2224e 100644 --- a/build/rules/compile +++ b/build/rules/compile @@ -113,25 +113,41 @@ $(OBJPATH_RELEASE_SHARED)/%.o: $(GENDIR)/%.c $(DEPPATH)/%.d $(POCO_BASE)/build/c # Regular sources rules $(DEPPATH)/%.d: $(SRCDIR)/%.cpp +ifneq ($(MAKECMDGOALS),clean) +ifneq ($(MAKECMDGOALS),distclean) @echo "** Creating dependency info for" $^ $(MKDIR) $(DEPPATH) $(DEP) $(SRCDIR)/$(patsubst %.d,%.cpp,$(notdir $@)) $@ $(OBJPATH_DEBUG_STATIC) $(OBJPATH_RELEASE_STATIC) $(OBJPATH_DEBUG_SHARED) $(OBJPATH_RELEASE_SHARED) $(INCLUDE) $(CXXFLAGS) +endif +endif $(DEPPATH)/%.d: $(SRCDIR)/%.c +ifneq ($(MAKECMDGOALS),clean) +ifneq ($(MAKECMDGOALS),distclean) @echo "** Creating dependency info for" $^ $(MKDIR) $(DEPPATH) $(DEP) $(SRCDIR)/$(patsubst %.d,%.c,$(notdir $@)) $@ $(OBJPATH_DEBUG_STATIC) $(OBJPATH_RELEASE_STATIC) $(OBJPATH_DEBUG_SHARED) $(OBJPATH_RELEASE_SHARED) $(INCLUDE) $(CFLAGS) +endif +endif # Generated sources rules $(DEPPATH)/%.d: $(GENDIR)/%.cpp +ifneq ($(MAKECMDGOALS),clean) +ifneq ($(MAKECMDGOALS),distclean) @echo "** Creating dependency info for" $^ $(MKDIR) $(DEPPATH) $(DEP) $(GENDIR)/$(patsubst %.d,%.cpp,$(notdir $@)) $@ $(OBJPATH_DEBUG_STATIC) $(OBJPATH_RELEASE_STATIC) $(OBJPATH_DEBUG_SHARED) $(OBJPATH_RELEASE_SHARED) $(INCLUDE) $(CXXFLAGS) +endif +endif $(DEPPATH)/%.d: $(GENDIR)/%.c +ifneq ($(MAKECMDGOALS),clean) +ifneq ($(MAKECMDGOALS),distclean) @echo "** Creating dependency info for" $^ $(MKDIR) $(DEPPATH) $(DEP) $(GENDIR)/$(patsubst %.d,%.c,$(notdir $@)) $@ $(OBJPATH_DEBUG_STATIC) $(OBJPATH_RELEASE_STATIC) $(OBJPATH_DEBUG_SHARED) $(OBJPATH_RELEASE_SHARED) $(INCLUDE) $(CFLAGS) +endif +endif depend: $(addprefix $(DEPPATH)/,$(addsuffix .d,$(objects)))