mirror of
https://github.com/RubyMetric/chsrc
synced 2025-06-17 17:17:00 +08:00
fix(makefile): 添加测试环境信息输出,更新测试目标
fix(xy.c): 注释掉对虚拟HOME环境的断言,待后续解决
This commit is contained in:
parent
74915f629d
commit
cac040efdf
33
Makefile
33
Makefile
@ -76,7 +76,25 @@ debug: CFLAGS += -g
|
||||
debug: all
|
||||
@$(DEBUGGER) ./chsrc
|
||||
|
||||
test: test-xy test-fw
|
||||
test: test-env test-xy test-fw
|
||||
|
||||
test-env:
|
||||
@echo "On-Linux: $(On-Linux)"
|
||||
@echo "On-Windows: $(On-Windows)"
|
||||
@echo "On-macOS: $(On-macOS)"
|
||||
@echo "CC: $(CC)"
|
||||
@echo "CFLAGS: $(CFLAGS)"
|
||||
@echo "Target-Name: $(Target-Name)"
|
||||
@echo "USER: $(whoami)"
|
||||
@echo "PWD: $(shell pwd)"
|
||||
@echo "UID: $(id -u)"
|
||||
@echo "GID: $(id -g)"
|
||||
# 检查HOME环境变量
|
||||
@if [ -z "$(HOME)" ]; then \
|
||||
echo "HOME environment variable is not set!"; \
|
||||
else \
|
||||
echo "HOME: $(HOME)"; \
|
||||
fi
|
||||
|
||||
test-xy:
|
||||
@$(CC) test/xy.c $(CFLAGS) -o xy
|
||||
@ -86,6 +104,19 @@ test-fw:
|
||||
@$(CC) test/fw.c $(CFLAGS) -o fw
|
||||
@./fw
|
||||
|
||||
# DEB package targets
|
||||
deb-prepare: $(Target-Name)
|
||||
@echo "Preparing for DEB package build..."
|
||||
|
||||
deb-build: deb-prepare
|
||||
@echo "Building DEB package..."
|
||||
@debuild -us -uc -b
|
||||
|
||||
deb-clean:
|
||||
@echo "Cleaning DEB build artifacts..."
|
||||
-@rm -rf debian/chsrc/
|
||||
-@rm -f ../chsrc_*.deb ../chsrc_*.changes ../chsrc_*.buildinfo
|
||||
|
||||
# AUR package 安装时将执行此 target
|
||||
fastcheck: $(Target-Name)
|
||||
@perl ./test/cli.pl fastcheck
|
||||
|
Loading…
x
Reference in New Issue
Block a user