-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (42 loc) · 1.05 KB
/
Makefile
File metadata and controls
52 lines (42 loc) · 1.05 KB
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
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) build --locked $(CARGO_FLAGS) --workspace \
--exclude treeedbgen-souffle-python \
--exclude treeedbgen-souffle-ruby
$(CARGO) test --locked $(CARGO_FLAGS) --workspace \
--exclude treeedbgen-souffle-python \
--exclude treeedbgen-souffle-ruby
.PHONY: all
all: build check fmt lint test