.DEFAULT_GOAL := help
.PHONY: help
help:
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-20s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
.PHONY: build
build:
cargo build
.PHONY: build-release
build-release:
cargo build --release
.PHONY: build-lib
build-lib:
cargo build --no-default-features
.PHONY: fmt
fmt:
cargo fmt --all
.PHONY: fmt-check
fmt-check:
cargo fmt --all -- --check
.PHONY: clippy
clippy:
cargo clippy --all-targets --all-features -- -D warnings -W clippy::pedantic -A clippy::module_name_repetitions
.PHONY: test
test:
cargo test --all-features
.PHONY: quality
quality: fmt clippy test
.PHONY: check
check:
cargo check --all-features
.PHONY: clean
clean:
cargo clean
.PHONY: doc
doc:
cargo doc --no-deps --all-features --open
.PHONY: bench
bench:
cargo bench --all-features
.PHONY: bench-quick
bench-quick:
cargo bench --bench named_conf --bench zone_file
.PHONY: bench-stress
bench-stress:
cargo bench --bench named_conf_stress
.PHONY: bench-compile
bench-compile:
cargo bench --no-run --all-features
.PHONY: coverage-lcov
coverage-lcov:
cargo llvm-cov --all-features --lcov --output-path lcov.info
.PHONY: coverage-html
coverage-html:
cargo llvm-cov --all-features --html
.PHONY: publish
publish:
cargo publish
.PHONY: docs
docs:
cd docs && poetry run mkdocs build
DOCS_PORT ?= 8000
.PHONY: docs-serve
docs-serve:
cd docs && poetry run mkdocs serve --dirtyreload --dev-addr 127.0.0.1:$(DOCS_PORT)
.PHONY: docs-serve-dev
docs-serve-dev:
cd docs && ENABLED_GIT_DATES=false poetry run mkdocs serve --dirtyreload --dev-addr 127.0.0.1:$(DOCS_PORT)
.PHONY: docs-install
docs-install:
cd docs && poetry install --no-interaction --no-ansi