forked from twilson63/elmdb-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
89 lines (74 loc) · 2.21 KB
/
Makefile
File metadata and controls
89 lines (74 loc) · 2.21 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
79
80
81
82
83
84
85
86
87
88
89
# Makefile for elmdb-rs project
.PHONY: all compile test clean distclean docs examples help
# Default target
all: compile
# Compile the project
compile:
@echo "Compiling elmdb-rs..."
rebar3 compile
# Run all tests (EUnit)
test: compile
@echo "Running all EUnit tests..."
rebar3 eunit
# Run all tests with verbose output
test-verbose: compile
@echo "Running all tests with verbose output..."
rebar3 eunit -v
# Run benchmarks
benchmark: compile
@echo "Running benchmarks..."
rebar3 shell --eval "elmdb_benchmark:run(), halt()."
# Run tests with coverage
test-coverage: compile
@echo "Running tests with coverage..."
rebar3 eunit --cover
rebar3 cover --verbose
# Clean build artifacts
clean:
@echo "Cleaning build artifacts..."
rebar3 clean
rm -rf _build/
rm -rf logs/
rm -rf .rebar3/
# Complete clean including dependencies
distclean: clean
@echo "Cleaning everything including dependencies..."
rm -rf _build/
rm -rf deps/
# Run examples
examples: compile
@echo "Running examples..."
erl -pa _build/default/lib/elmdb/ebin -noshell -eval "elmdb_example:run_all_examples(), halt()."
# Generate documentation
docs:
@echo "Generating documentation..."
rebar3 edoc
# Start Erlang shell with project loaded
shell: compile
@echo "Starting Erlang shell..."
rebar3 shell
# Check syntax and run dialyzer
check: compile
@echo "Running dialyzer..."
rebar3 dialyzer
# Format code
format:
@echo "Formatting code..."
rebar3 fmt
# Show help
help:
@echo "Available targets:"
@echo " all - Compile the project (default)"
@echo " compile - Compile the project"
@echo " test - Run all EUnit tests"
@echo " test-verbose - Run all tests with verbose output"
@echo " test-coverage - Run tests with coverage analysis"
@echo " benchmark - Run performance benchmarks"
@echo " examples - Run example code"
@echo " docs - Generate documentation"
@echo " shell - Start Erlang shell with project loaded"
@echo " check - Run dialyzer for static analysis"
@echo " format - Format source code"
@echo " clean - Clean build artifacts"
@echo " distclean - Clean everything including dependencies"
@echo " help - Show this help message"