-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (32 loc) · 933 Bytes
/
Makefile
File metadata and controls
43 lines (32 loc) · 933 Bytes
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
# filter out target and keep the rest as args
PRIMARY_TARGET := $(firstword $(MAKECMDGOALS))
ARGS := $(filter-out $(PRIMARY_TARGET), $(MAKECMDGOALS))
.PHONY: git-hooks
git-hooks:
git config core.hooksPath ./git-hooks;
.PHONY: init
init: git-hooks
.PHONY: fmt
fmt: init
cargo fmt
.PHONY: test-all
test-all: test test-release test-leak
.PHONY: test
test: init
RUST_BACKTRACE=1 cargo test ${ARGS} -- --nocapture --test-threads=1
.PHONY: test_release
test-release: init
RUST_BACKTRACE=1 cargo test ${ARGS} --release -- --nocapture --test-threads=1
test-leak:
RUST_BACKTRACE=1 RUSTFLAGS="-Zsanitizer=leak" cargo +nightly nextest run ${ARGS} -F trace_log -r --no-capture -j 1
.PHONY: build
build: init
cargo build
.PHONY: build_nostd
build_nostd: init
cargo build --no-default-features
.DEFAULT_GOAL = build
# Target name % means that it is a rule that matches anything, @: is a recipe;
# the : means do nothing
%:
@: