-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMakefile
44 lines (32 loc) · 966 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
CARGO = cargo
CARGO_CCARGS =
CARGO_EXAMPLES = custom_engine \
custom_key \
handlebars \
minijinja \
nested \
tera
################################################################################
# Main goals
ci: CARGO_CCARGS = --all-features --verbose
ci: test build lint
test:
$(CARGO) test $(CARGO_CCARGS)
lint: lint/clippy lint/fmt
fmt:
$(CARGO) fmt
build: build/example build/crate
################################################################################
build/example: $(addprefix build/example/, $(CARGO_EXAMPLES))
build/example/%:
$(CARGO) build --example=$* $(CARGO_CCARGS)
build/crate:
$(CARGO) build $(CARGO_CCARGS)
lint/clippy:
$(CARGO) clippy $(CARGO_CCARGS)
lint/fmt:
$(CARGO) fmt --check
################################################################################
.PHONY: test ci \
$(filter build%, $(MAKECMDGOALS)) \
$(filter lint%, $(MAKECMDGOALS))