-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
33 lines (29 loc) · 915 Bytes
/
Makefile
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
.PHONY: help
help:
@echo 'Usage: make [target]'
@echo ''
@echo 'Targets:'
@echo ' install Install release version of the binary'
@echo ' check Check with `cargo check` and `cargo clippy`'
@echo ' clean Remove Cargo.lock and target/'
@echo ' format Format rust code'
@echo ' help Show this help'
.PHONY: install
install:
@cargo install --path ./cli --force --jobs 4
.PHONY: format
format:
@cargo fmt --manifest-path ./src/Cargo.toml --all --check
@cargo fmt --manifest-path ./cli/Cargo.toml --all --check
.PHONY: check
check:
@cargo check --manifest-path ./src/Cargo.toml --workspace
@cargo check --manifest-path ./cli/Cargo.toml --workspace
@cargo clippy --manifest-path ./src/Cargo.toml --workspace
@cargo clippy --manifest-path ./cli/Cargo.toml --workspace
.PHONY: clean
clean:
@rm -rf ./src/Cargo.lock
@rm -rf ./src/target/
@rm -rf ./cli/Cargo.lock
@rm -rf ./cli/target/