makefile: let clean_context in distclean command

In multi-jobs build, `distclean` may be faster than `clean_context`,
Fix the case `distclean` use the dirctorys that have been
removed by `clean_context` in board/xtensa with xt-xcc
This commit is contained in:
zhuyanlin 2021-09-01 10:11:39 +08:00 committed by Xiang Xiao
parent 8af91aae3d
commit 5c5975d887
2 changed files with 4 additions and 2 deletions

View File

@ -568,10 +568,11 @@ $(foreach SDIR, $(CLEANDIRS), $(eval $(call SDIR_template,$(SDIR),distclean)))
subdir_distclean: $(foreach SDIR, $(CLEANDIRS), $(SDIR)_distclean)
distclean: clean subdir_distclean clean_context
distclean: clean subdir_distclean
ifeq ($(CONFIG_BUILD_2PASS),y)
$(Q) $(MAKE) -C $(CONFIG_PASS1_BUILDIR) distclean
endif
$(Q) $(MAKE) clean_context
$(call DELFILE, Make.defs)
$(call DELFILE, defconfig)
$(call DELFILE, .config)

View File

@ -517,10 +517,11 @@ $(foreach SDIR, $(CLEANDIRS), $(eval $(call SDIR_template,$(SDIR),distclean)))
subdir_distclean: $(foreach SDIR, $(CLEANDIRS), $(SDIR)_distclean)
distclean: clean subdir_distclean clean_context
distclean: clean subdir_distclean
ifeq ($(CONFIG_BUILD_2PASS),y)
$(Q) $(MAKE) -C $(CONFIG_PASS1_BUILDIR) distclean
endif
$(Q) $(MAKE) clean_context
$(call DELFILE, Make.defs)
$(call DELFILE, defconfig)
$(call DELFILE, .config)