From 82efdf97d41a96f9757157e3f381b6d8913be19c Mon Sep 17 00:00:00 2001 From: Aoran Zeng Date: Thu, 19 Jun 2025 19:39:19 +0800 Subject: [PATCH] `just clean` --- justfile | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/justfile b/justfile index d2d7bb0..da1ba10 100644 --- a/justfile +++ b/justfile @@ -12,9 +12,13 @@ # just (build) # just debug # just test +# just clean # # just STATIC=1 # 静态链接 # just DEBUG=1 # 编译出 debug 版 +# +# 该文件主要用于在原生Windows上执行项目的基本任务,而不借助于 +# GNU make 以及相应的 MSYS2、Cygwin 环境 # -------------------------------------------------------------- set windows-shell := ['cmd', '/c'] @@ -68,6 +72,7 @@ CFLAGS_only_promp_for_dev := CFLAGS_base + ' ' + CFLAGS_debug + CFLAGS_static + BIN_xy := if os() == 'windows' {'xy.exe'} else {'./xy'} BIN_fw := if os() == 'windows' {'fw.exe'} else {'./fw'} +BIN_rm := if os() == 'windows' {'del'} else {'rm'} #======================= alias b := build alias d := debug @@ -106,8 +111,8 @@ test-cli: @perl ./test/cli.pl clean: - -@rm *.exe 2>/dev/null - -@rm xy 2>/dev/null - -@rm fw 2>/dev/null - -@rm chsrc 2>/dev/null - -@rm README.md.bak* 2>/dev/null + -@{{BIN_rm}} *.exe + -@{{BIN_rm}} xy + -@{{BIN_rm}} fw + -@{{BIN_rm}} chsrc + -@{{BIN_rm}} README.md.bak*