forked from tw93/Kaku
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
83 lines (68 loc) · 2.41 KB
/
Copy pathMakefile
File metadata and controls
83 lines (68 loc) · 2.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
.PHONY: all fmt fmt-check build app dev check test install-tools install-hooks test-webgpu-fallback release dmg nightly
all: build
RUST_LOG ?= info
test:
cargo nextest run --locked -E 'not test(shapecache::test::ligatures_jetbrains)'
cargo nextest run --locked -p wezterm-escape-parser # no_std by default
check:
cargo check --locked
cargo check --locked -p wezterm-escape-parser
cargo check --locked -p wezterm-cell
cargo check --locked -p wezterm-surface
cargo check --locked -p wezterm-ssh
./scripts/check_prompts.sh
app:
PROFILE=debug ./scripts/build.sh --app-only 2>&1 | grep -v "ranlib: warning:.*has no symbols"; exit $${PIPESTATUS[0]}
dev:
@if ! command -v cargo-watch >/dev/null 2>&1; then \
echo "Installing cargo-watch..."; \
cargo install cargo-watch --locked; \
fi
RUST_LOG=$(RUST_LOG) cargo watch \
--skip-local-deps \
-w Cargo.toml \
-w kaku-gui \
-w window \
-w term \
-w mux \
-w config \
-w kaku \
-w lua-api-crates \
-i "dist/**" \
-i "deps/**" \
-x "run $(BUILD_OPTS) -p kaku-gui --"
build:
cargo build --locked $(BUILD_OPTS) -p kaku -p kaku-gui -p wezterm-mux-server-impl
fmt:
cargo +nightly fmt -p kaku -p kaku-gui -p mux -p wezterm-term -p termwiz -p config -p wezterm-font
fmt-check:
cargo +nightly fmt -p kaku -p kaku-gui -p mux -p wezterm-term -p termwiz -p config -p wezterm-font -- --check
@echo "Format check passed."
install-tools:
@if ! command -v cargo >/dev/null 2>&1 || ! command -v rustup >/dev/null 2>&1; then \
echo "Rust toolchain not found. Install rustup first, then re-run make install-tools."; \
echo "See CONTRIBUTING.md for the bootstrap steps."; \
exit 1; \
fi
cargo install cargo-nextest --locked
cargo install cargo-watch --locked
rustup toolchain install nightly --profile minimal --component rustfmt
@echo "Tools installed."
install-hooks:
@hooks_dir="$$(git rev-parse --git-path hooks 2>/dev/null)" && \
if [ -z "$$hooks_dir" ]; then \
echo "install-hooks must be run from a git checkout."; \
exit 1; \
fi && \
mkdir -p "$$hooks_dir" && \
printf '%s\n' '#!/usr/bin/env bash' 'set -euo pipefail' 'exec make fmt-check test' > "$$hooks_dir/pre-commit" && \
chmod +x "$$hooks_dir/pre-commit" && \
echo "Installed pre-commit hook at $$hooks_dir/pre-commit"
test-webgpu-fallback:
./scripts/test_webgpu_fallback.sh --strict
dmg:
./scripts/build.sh && ./scripts/notarize.sh
nightly:
./scripts/nightly.sh
release:
bash ./scripts/release.sh