diff --git a/tools/Makefile.unix b/tools/Makefile.unix index 3e0c9dbc891..23eac198e19 100644 --- a/tools/Makefile.unix +++ b/tools/Makefile.unix @@ -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) diff --git a/tools/Makefile.win b/tools/Makefile.win index 180f62d68dc..a3b5f6d58fa 100644 --- a/tools/Makefile.win +++ b/tools/Makefile.win @@ -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)