eq = $(if $(or $(1),$(2)),$(and $(findstring $(1),$(2)),\
$(findstring $(2),$(1))),1)
.PHONY : \
doc \
fmt \
clippy \
test \
audit \
git.sync \
build \
push \
shell \
run \
start \
stop \
rm \
release
build :
cargo build
doc :
ifeq ($(clean),yes)
@rm -rf target/doc/
endif
cargo doc --all-features --package router \
$(if $(call eq,$(private),no),,--document-private-items) \
$(if $(call eq,$(open),no),,--open)
fmt :
cargo fmt --all $(if $(call eq,$(writing),yes),,-- --check)
clippy :
cargo clippy --all-features --all-targets -- -D warnings
test :
cargo test --all-features
precommit : fmt clippy test