From 28d8e4ad0c1b0af646a38430bd7de918b7bac6d7 Mon Sep 17 00:00:00 2001 From: Aoran Zeng Date: Wed, 15 Oct 2025 18:33:21 +0800 Subject: [PATCH] Only use `$(OS)` to ensure MSYS2 --- Makefile | 13 ++++++++----- justfile | 1 + 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 5f8ab71..1345d17 100755 --- a/Makefile +++ b/Makefile @@ -2,13 +2,13 @@ # -------------------------------------------------------------- # SPDX-License-Identifier: GPL-3.0-or-later # -------------------------------------------------------------- -# Build File : Makefile -# File Authors : Aoran Zeng -# Contributors : Yangmoooo +# Build File : Makefile +# File Authors : 曾奥然 +# Contributors : Yangmoooo # | sanchuanhehe # | # Created On : <2023-08-28> -# Last Modified : <2025-07-22> +# Last Modified : <2025-10-15> # # 请阅读 ./doc/01-开发与构建.md 来使用 # -------------------------------------------------------------- @@ -26,10 +26,12 @@ ifeq ($(shell uname), Darwin) On-macOS = 1 endif -# 只有Windows会定义$(OS)变量 +# 只有 MSYS2 会定义 $(OS) 变量 ifeq ($(OS), Windows_NT) On-Windows = 1 endif +# 注意, 原生 Windows 会定义 $(ComSpec) 变量,且区分大小写 +# 但是 MSYS2 并不会定义 #===================================== @@ -196,6 +198,7 @@ test-cli: $(DevMode-Target-Name) clean: -@rm *.exe 2>/dev/null + -@rm *.res 2>/dev/null -@rm xy 2>/dev/null -@rm fw 2>/dev/null -@rm README.md.bak* 2>/dev/null diff --git a/justfile b/justfile index f9de64c..016986d 100644 --- a/justfile +++ b/justfile @@ -148,6 +148,7 @@ test-cli: clean: -@{{BIN_rm}} *.exe + -@{{BIN_rm}} *.res -@{{BIN_rm}} xy -@{{BIN_rm}} fw -@{{BIN_rm}} chsrc