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
SHELL := /bin/sh
CARGO ?= cargo
CRATE ?= gshell
.PHONY: help
help:
@printf "\n"
@printf "Targets:\n"
@printf " make check - cargo check\n"
@printf " make test - cargo test\n"
@printf " make fmt - cargo fmt\n"
@printf " make fmt-check - cargo fmt --check\n"
@printf " make clippy - cargo clippy with warnings denied\n"
@printf " make lint - fmt-check + clippy\n"
@printf " make validate - check + test + lint\n"
@printf " make run - cargo run\n"
@printf " make clean - cargo clean\n"
@printf " make bench - cargo bench\n"
@printf " make build-release - cargo build --release\n"
@printf " make validate-full - check + test + lint + release + bench\n"
@printf "\n"
.PHONY: check
check:
$(CARGO) check --all-targets --all-features
.PHONY: test
test:
$(CARGO) test --all-targets --all-features
.PHONY: fmt
fmt:
$(CARGO) fmt --all
.PHONY: fmt-check
fmt-check:
$(CARGO) fmt --all --check
.PHONY: clippy
clippy:
$(CARGO) clippy --all-targets --all-features -- -D warnings
.PHONY: lint
lint: fmt-check clippy
.PHONY: validate
validate: check test lint
.PHONY: run
run:
$(CARGO) run --bin $(CRATE)
.PHONY: clean
clean:
$(CARGO) clean
.PHONY: bench
bench:
$(CARGO) bench
.PHONY: build-release
build-release:
$(CARGO) build --release
.PHONY: validate-full
validate-full: check test lint build-release bench