-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
68 lines (57 loc) · 1.78 KB
/
Makefile
File metadata and controls
68 lines (57 loc) · 1.78 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
# Mo Compiler Makefile
# Convenient targets for common development tasks
.PHONY: help test coverage clean build lint format
# Default target
all: build test
# Help target - shows available commands
help:
@echo "Mo Compiler Build Targets:"
@echo ""
@echo " build - Build all targets"
@echo " test - Run all tests"
@echo " coverage - Run tests with coverage reporting"
@echo " clean - Clean build artifacts"
@echo " lint - Run linting (if configured)"
@echo " format - Format code (if configured)"
@echo ""
@echo "Examples:"
@echo " make test"
@echo " make coverage"
@echo " make coverage TARGET=//tests:control_flow_test"
# Build all targets
build:
bazel build //...
# Run all tests
test:
bazel test //tests:all --test_output=errors
# Run tests with coverage reporting
coverage:
@echo "Running coverage analysis..."
@./scripts/coverage.sh $(TARGET)
# Clean build artifacts
clean:
bazel clean
rm -rf coverage_reports/
# Quick coverage for specific target
coverage-quick:
bazel coverage //tests:all --combined_report=lcov --instrumentation_filter="//src/..."
# Build and test in one command
check: build test
# Install dependencies (macOS)
install-deps:
@echo "Installing dependencies on macOS..."
@if ! command -v brew >/dev/null 2>&1; then \
echo "Please install Homebrew first: https://brew.sh/"; \
exit 1; \
fi
@echo "Installing lcov for coverage reporting..."
@brew install lcov || true
@echo "Dependencies installed!"
# Show coverage summary (requires lcov)
coverage-summary:
@if [ -f coverage_reports/coverage.lcov ]; then \
echo "=== Coverage Summary ==="; \
lcov --summary coverage_reports/coverage.lcov 2>/dev/null | grep -E "(lines|functions|branches)" || true; \
else \
echo "No coverage data found. Run 'make coverage' first."; \
fi