Add "cleandepend" target (clean *.d).
@@ -135,7 +135,7 @@ endef
$(foreach prog, $(PROGRAMS), $(eval $(call build_program,$(prog))))
-ifeq ($(filter print-% clean,$(MAKECMDGOALS)),)
+ifeq ($(filter print-% clean cleandepend,$(MAKECMDGOALS)),)
-include $(sort $(DEPFILES))
endif
@@ -159,6 +159,7 @@ endif
# clean
.PHONY: clean pre-clean do-clean post-clean
+.PHONY: cleandepend
pre-clean:
@@ -171,6 +172,10 @@ post-clean: do-clean
clean: post-clean
+cleandepend:
+ $(foreach d,$(SUBDIR),$(call execute_command,$(Q) $(MAKE) -C $d cleandepend))
+ $(Q) $(RM) $(DEPFILES)
+
##############################################################################
# implicit rules
