tools/Config:Fix some error call DELFILE/DELDIR/CATFILE/CLEAN in Windows native build
tools/Config:Fix some error call DELFILE/DELDIR/CATFILE  in Windows native build
@@ -450,8 +450,12 @@ endef
# DELFILE - Delete one file
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
+define NEWLINE
+
+
+endef
define DELFILE
- $(Q) if exist $1 (del /f /q $1)
+ $(foreach FILE, $(1), $(NEWLINE) $(Q) if exist $(FILE) (del /f /q $(FILE)))
endef
else
define DELFILE
@@ -463,7 +467,7 @@ endif
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
define DELDIR
- $(Q) if exist $1 (rmdir /q /s $1)
+ $(Q) if exist $1 (rmdir /q /s $1) $(NEWLINE)
endef
else
define DELDIR
@@ -501,7 +505,7 @@ endif
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
define CATFILE
- $(Q) type $(2) > $1
+ $(foreach FILE, $(2), $(NEWLINE) $(Q) type $(FILE) >> $1)
endef
else
define CATFILE
@@ -529,20 +533,14 @@ ifeq ($(CONFIG_ARCH_COVERAGE),y)
endif
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
-
-define NEWLINE
-
-
-endef
-
define CLEAN
$(Q) if exist *$(OBJEXT) (del /f /q *$(OBJEXT))
$(Q) if exist *$(LIBEXT) (del /f /q *$(LIBEXT))
$(Q) if exist *~ (del /f /q *~)
$(Q) if exist (del /f /q .*.swp)
- $(foreach OBJ, $(OBJS), $(NEWLINE) $(call DELFILE,$(OBJ)))
- $(Q) if exist $(BIN) (del /f /q $(BIN))
- $(Q) if exist $(EXTRA) (del /f /q $(EXTRA))
+ $(call DELFILE,$(subst /,\,$(OBJS)))
+ $(Q) if exist $(BIN) (del /f /q $(subst /,\,$(BIN)))
+ $(Q) if exist $(EXTRA) (del /f /q $(subst /,\,$(EXTRA)))
endef
else
define CLEAN
