diff --git a/tools/Makefile.unix b/tools/Makefile.unix index 0ca2b32c191..2700cb4d7fb 100644 --- a/tools/Makefile.unix +++ b/tools/Makefile.unix @@ -561,10 +561,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) diff --git a/tools/Makefile.win b/tools/Makefile.win index f112634654a..396f5c5d420 100644 --- a/tools/Makefile.win +++ b/tools/Makefile.win @@ -510,10 +510,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)