-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
78 lines (69 loc) · 1.72 KB
/
Makefile
File metadata and controls
78 lines (69 loc) · 1.72 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Makefile for microhttp-rs
# Default target
.PHONY: help
help:
@echo "Available commands:"
@echo " make test - Run all tests"
@echo " make test-verbose - Run all tests with verbose output"
@echo " make build - Build the project"
@echo " make clean - Clean the project"
@echo " make examples - Build all examples"
@echo " make doc - Generate documentation"
@echo " make lint - Run the linter (clippy)"
@echo " make lint-fix - Run the linter and fix issues where possible"
# Run all tests
.PHONY: test
test:
@echo "Running all tests..."
@cargo test
# Run all tests with verbose output
.PHONY: test-verbose
test-verbose:
@echo "Running all tests with verbose output..."
@cargo test -- --nocapture
# Build the project
.PHONY: build
build:
@echo "Building the project..."
@cargo build
# Clean the project
.PHONY: clean
clean:
@echo "Cleaning the project..."
@cargo clean
# Build all examples
.PHONY: examples
examples:
@echo "Building all examples..."
@cargo build --examples
# Generate documentation
.PHONY: doc
doc:
@echo "Generating documentation..."
@cargo doc --no-deps
# Run the linter (clippy)
.PHONY: lint
lint:
@echo "Running linter..."
@cargo clippy --all-targets -- \
-D warnings \
-D dead_code \
-D unused_imports \
-D unused_variables \
-D unused_assignments \
-D missing_docs \
-D unsafe_code \
-D clippy::all
# Run the linter and fix issues where possible
.PHONY: lint-fix
lint-fix:
@echo "Running linter and fixing issues..."
@cargo clippy --fix --allow-dirty --all-targets -- \
-D warnings \
-D dead_code \
-D unused_imports \
-D unused_variables \
-D unused_assignments \
-D missing_docs \
-D unsafe_code \
-D clippy::all