From 5edb9141e4367c87247f9dad05d3c11a4da86e15 Mon Sep 17 00:00:00 2001 From: zouboan Date: Sat, 5 Nov 2022 18:14:57 +0800 Subject: [PATCH] tools:fix distclean error in Windows native build --- tools/Unix.mk | 2 +- tools/Win.mk | 2 +- tools/cxd56/Makefile.host | 9 +++++++-- tools/pic32/Makefile.host | 9 +++++++-- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/tools/Unix.mk b/tools/Unix.mk index 86abf0e579..9660e0cc31 100644 --- a/tools/Unix.mk +++ b/tools/Unix.mk @@ -702,12 +702,12 @@ ifeq ($(CONFIG_ARCH_HAVE_BOOTLOADER),y) $(Q) $(MAKE) clean_bootloader endif $(Q) $(MAKE) clean_context + $(Q) $(MAKE) -C tools -f Makefile.host clean $(call DELFILE, Make.defs) $(call DELFILE, defconfig) $(call DELFILE, .config) $(call DELFILE, .config.old) $(call DELFILE, .gdbinit) - $(Q) $(MAKE) -C tools -f Makefile.host clean # Application housekeeping targets. The APPDIR variable refers to the user # application directory. A sample apps/ directory is included with NuttX, diff --git a/tools/Win.mk b/tools/Win.mk index 5119ad88bf..857246f7fe 100644 --- a/tools/Win.mk +++ b/tools/Win.mk @@ -661,11 +661,11 @@ ifeq ($(CONFIG_ARCH_HAVE_BOOTLOADER),y) $(Q) $(MAKE) clean_bootloader endif $(Q) $(MAKE) clean_context + $(Q) $(MAKE) -C tools -f Makefile.host clean $(call DELFILE, Make.defs) $(call DELFILE, defconfig) $(call DELFILE, .config) $(call DELFILE, .config.old) - $(Q) $(MAKE) -C tools -f Makefile.host clean # Application housekeeping targets. The APPDIR variable refers to the user # application directory. A sample apps\ directory is included with NuttX, diff --git a/tools/cxd56/Makefile.host b/tools/cxd56/Makefile.host index a72bc2861c..daa095b728 100644 --- a/tools/cxd56/Makefile.host +++ b/tools/cxd56/Makefile.host @@ -18,6 +18,7 @@ # ############################################################################ +include $(TOPDIR)/Make.defs all: mkspk default: mkspk .PHONY: clean @@ -32,5 +33,9 @@ mkspk: @gcc $(CFLAGS) -o mkspk mkspk.c clefia.c clean: - @rm -f *.o *.a *.dSYM *~ .*.swp - @rm -f mkspk mkspk.exe +ifneq ($(CONFIG_WINDOWS_NATIVE),y) + $(Q) rm -rf *.dSYM +endif + $(call DELFILE, mkspk) + $(call DELFILE, mkspk.exe) + $(call CLEAN) diff --git a/tools/pic32/Makefile.host b/tools/pic32/Makefile.host index fbf936e1a2..a4fbff86c1 100644 --- a/tools/pic32/Makefile.host +++ b/tools/pic32/Makefile.host @@ -18,6 +18,7 @@ # ############################################################################ +include $(TOPDIR)/Make.defs all: mkpichex default: mkpichex .PHONY: clean @@ -32,5 +33,9 @@ mkpichex: mkpichex.c @gcc $(CFLAGS) -o mkpichex mkpichex.c clean: - @rm -f *.o *.a *.dSYM *~ .*.swp - @rm -f mkpichex mkpichex.exe +ifneq ($(CONFIG_WINDOWS_NATIVE),y) + $(Q) rm -rf *.dSYM +endif + $(call DELFILE, mkpichex) + $(call DELFILE, mkpichex.exe) + $(call CLEAN)