-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
64 lines (48 loc) · 1.23 KB
/
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
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
-include .config.mk
# Provide standard defaults - set overrides in .config.mk
SHELL=/bin/bash -o pipefail
# Source in repository specific environment variables
MAKEFILE_LIB=.makefiles
MAKEFILE_INCLUDES=$(wildcard $(MAKEFILE_LIB)/*.mk)
include $(MAKEFILE_INCLUDES)
# This helper function makes debugging much easier.
.PHONY:debug-%
debug-%: ## Debug a variable by calling `make debug-VARIABLE`
@echo $(*) = $($(*))
.PHONY:help
.SILENT:help
help: ## Show this help, includes list of all actions.
@awk 'BEGIN {FS = ":.*?## "}; /^.+: .*?## / && !/awk/ {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' ${MAKEFILE_LIST}
.PHONY:build-release
build-release:
cargo build --release
.PHONY:build-debug
build-debug:
cargo build
.PHONY:build
build:: build-release
.PHONY:clean
clean:: ## Cleanup the local checkout
-rm -rf *.backup tmp/ output/ target/
cargo clean
.PHONY:clean-all
clean-all:: clean ## Full cleanup of all artifacts
-git clean -Xdf
.PHONY:lint
lint: lint-fmt lint-clippy lint-audit
.PHONY:lint-fmt
lint-fmt:
cargo fmt --all
.PHONY:lint-clippy
lint-clippy:
cargo clippy
.PHONY:lint-audit
lint-audit:
cargo audit
.PHONY:publish
publish::
.PHONY:test
test::
cargo test
.PHONY:version
version::