From aaa32156dfb4e377547b39004403886fd9afd2c8 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Mon, 23 Mar 2020 17:34:01 +0800 Subject: [PATCH] tools/Config.mk: implement a simple version of TESTANDREPLACEFILE for Windows --- tools/Config.mk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/Config.mk b/tools/Config.mk index 1b3f826e52..32ba80dd8d 100644 --- a/tools/Config.mk +++ b/tools/Config.mk @@ -346,7 +346,11 @@ endif # args: $1 - newfile: Temporary file to test # $2 - oldfile: File to replace -ifneq ($(CONFIG_WINDOWS_NATIVE),y) +ifeq ($(CONFIG_WINDOWS_NATIVE),y) +define TESTANDREPLACEFILE + $(Q) move /Y $1 $2 +endef +else define TESTANDREPLACEFILE if [ -f $2 ]; then \ if cmp $1 $2; then \