31 lines
780 B
Makefile
31 lines
780 B
Makefile
|
|
|
|
all: help
|
|
|
|
build: ## Build filekäfer
|
|
cargo build
|
|
|
|
check: build ## Run the tests for filekäfer
|
|
cargo test
|
|
|
|
clean: ## Clean up generated code
|
|
rm -f example.log
|
|
cargo clean
|
|
|
|
example.log:
|
|
while true; do date >> example.log; sleep 10; done;
|
|
|
|
run: build ## Run against example.log (run `make example.log` in another console)
|
|
./target/debug/filekäfer -w ./example.log
|
|
|
|
watch: ## Watch the "test" topic in Kafka with kafkacat
|
|
kafkacat -C -b localhost:9092 -t test
|
|
|
|
|
|
# Cute hack thanks to:
|
|
# https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
|
|
help: ## Display this help text
|
|
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
|
|
|
|
.PHONY: all build check clean run help watch
|