Skip to content

Commit 28d8e4a

Browse files
committed
Only use $(OS) to ensure MSYS2
1 parent 8ebe581 commit 28d8e4a

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

Makefile

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
# --------------------------------------------------------------
33
# SPDX-License-Identifier: GPL-3.0-or-later
44
# --------------------------------------------------------------
5-
# Build File : Makefile
6-
# File Authors : Aoran Zeng <[email protected]>
7-
# Contributors : Yangmoooo <[email protected]>
5+
# Build File : Makefile
6+
# File Authors : 曾奥然 <[email protected]>
7+
# Contributors : Yangmoooo <[email protected]>
88
# | sanchuanhehe <[email protected]>
99
# |
1010
# Created On : <2023-08-28>
11-
# Last Modified : <2025-07-22>
11+
# Last Modified : <2025-10-15>
1212
#
1313
# 请阅读 ./doc/01-开发与构建.md 来使用
1414
# --------------------------------------------------------------
@@ -26,10 +26,12 @@ ifeq ($(shell uname), Darwin)
2626
On-macOS = 1
2727
endif
2828

29-
# 只有Windows会定义$(OS)变量
29+
# 只有 MSYS2 会定义 $(OS) 变量
3030
ifeq ($(OS), Windows_NT)
3131
On-Windows = 1
3232
endif
33+
# 注意, 原生 Windows 会定义 $(ComSpec) 变量,且区分大小写
34+
# 但是 MSYS2 并不会定义
3335
#=====================================
3436

3537

@@ -196,6 +198,7 @@ test-cli: $(DevMode-Target-Name)
196198

197199
clean:
198200
-@rm *.exe 2>/dev/null
201+
-@rm *.res 2>/dev/null
199202
-@rm xy 2>/dev/null
200203
-@rm fw 2>/dev/null
201204
-@rm README.md.bak* 2>/dev/null

justfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ test-cli:
148148

149149
clean:
150150
-@{{BIN_rm}} *.exe
151+
-@{{BIN_rm}} *.res
151152
-@{{BIN_rm}} xy
152153
-@{{BIN_rm}} fw
153154
-@{{BIN_rm}} chsrc

0 commit comments

Comments
 (0)