tools/Config.mk: implement a simple version of TESTANDREPLACEFILE for Windows

This commit is contained in:
Xiang Xiao 2020-03-23 17:34:01 +08:00 committed by Gregory Nutt
parent 1848e83257
commit aaa32156df
1 changed files with 5 additions and 1 deletions

View File

@ -346,7 +346,11 @@ endif
# args: $1 - newfile: Temporary file to test # args: $1 - newfile: Temporary file to test
# $2 - oldfile: File to replace # $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 define TESTANDREPLACEFILE
if [ -f $2 ]; then \ if [ -f $2 ]; then \
if cmp $1 $2; then \ if cmp $1 $2; then \