forked from langston-barrett/treeedb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (37 loc) · 852 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
CARGO = cargo
CARGO_FLAGS =
DL = $(shell ls ./**/*.dl)
RS = $(shell ls ./**/*.rs)
TOML = $(shell ls ./**/*.toml)
.PHONY: build
build:
$(CARGO) $(CARGO_FLAGS) --locked build
.PHONY: check
check:
$(CARGO) check --locked $(CARGO_FLAGS)
.PHONY: entr
entr:
ls Makefile $(DL) $(RS) $(TOML) | \
entr -c -s "make -j fmt check lint && make build && make test"
.PHONY: fmt
fmt:
$(CARGO) fmt $(CARGO_FLAGS)
.PHONY: lint
lint:
$(CARGO) clippy $(CARGO_FLAGS) -- \
-D warnings \
-D clippy::unnecessary_wraps
# requires: apt-get install -y musl-tools
# requires: rustup target add x86_64-unknown-linux-musl
.PHONY: static
static:
$(CARGO) build $(CARGO_FLAGS) \
--bins \
--locked \
--release \
--target=x86_64-unknown-linux-musl
.PHONY: test
test:
$(CARGO) test --locked $(CARGO_FLAGS)
.PHONY: all
all: build check fmt lint test