-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (28 loc) · 1.05 KB
/
Makefile
File metadata and controls
38 lines (28 loc) · 1.05 KB
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
SHELL := /bin/bash
.PHONY: help
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-15s\033[0m %s\n", $$1, $$2}'
clean: ## Clean the project using cargo
cargo clean
build: ## Build the project using cargo
cargo build
lint: ## Lint the project using cargo
@rustup component add clippy 2> /dev/null
cargo clippy
fmt: ## Format the project using cargo
@rustup component add rustfmt 2> /dev/null
cargo fmt
test: ## Run tests using cargo
cargo test
doc: ## Generate documentation using cargo
cargo doc --no-deps --open
run-example: ## Run an example with the specified argument (usage: make run-example-1)
@echo "Usage: make run-example-<number>"
@echo "Example: make run-example-1"
@echo "Available examples: example-1, example-2, example-3, example-4, example-5, example-6, example-7, example-8"
run-example-%: ## Run a specific example (usage: make run-example-1)
@echo "Running example: example-$*"
cargo run --bin example-$*
# This allows Make to accept any target name as an argument
%:
@: