mailpot/Makefile

32 lines
914 B
Makefile
Raw Normal View History

2023-04-19 17:39:39 +03:00
.POSIX:
.SUFFIXES:
HTML_FILES := $(shell find web/src/templates -type f -print0 | tr '\0' ' ')
2023-04-19 17:39:39 +03:00
2022-08-24 12:22:44 +03:00
.PHONY: check
check:
2023-04-19 17:39:39 +03:00
@cargo check --all-features --all --tests --examples --benches --bins
2022-08-24 12:22:44 +03:00
.PHONY: fmt
fmt:
2023-04-19 17:39:39 +03:00
@cargo +nightly fmt --all || cargo fmt --all
@cargo sort -w || printf "cargo-sort binary not found in PATH.\n"
2023-06-09 16:36:23 +03:00
@djhtml $(HTML_FILES) || printf "djhtml binary not found in PATH.\n"
2022-08-24 12:22:44 +03:00
.PHONY: lint
lint:
2023-04-19 17:39:39 +03:00
@cargo clippy --no-deps --all-features --all --tests --examples --benches --bins
.PHONY: test
test: check lint
2023-04-19 17:39:39 +03:00
@cargo test --all --no-fail-fast --all-features
2023-04-25 17:02:24 +03:00
.PHONY: rustdoc
rustdoc:
@RUSTDOCFLAGS="--html-before-content ./.github/doc_extra.html" cargo doc --workspace --all-features --no-deps --document-private-items
2023-05-05 16:58:48 +03:00
.PHONY: rustdoc-open
rustdoc-open:
@RUSTDOCFLAGS="--html-before-content ./.github/doc_extra.html" cargo doc --workspace --all-features --no-deps --document-private-items --open