-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathMakefile
92 lines (76 loc) · 2.57 KB
/
Makefile
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
90
91
92
SHELL := /bin/bash
# include ROS app makefile targets (test-static, test-unit, test-launch, test-sitl)
include ros/gisnav/Makefile
# Default output protocol for mock GPS messages
PROTOCOL=nmea
.PHONY: docs
docs:
@cd docs/sphinx && sphinx-build -M markdown ./source ./build
@mkdir -p docs/vitepress/docs/reference && cp -r docs/sphinx/build/markdown/* docs/vitepress/docs/reference
@cd docs/vitepress && npm run docs:build
@cd docs/vitepress/docs/.vitepress/dist && touch .nojekyll # for GitHub Pages
.PHONY: docs\ preview
docs\ preview:
@cd docs/vitepress && npm run docs:preview
.PHONY: docs\ dev
docs\ dev:
@cd docs/vitepress && npm run docs:dev
.PHONY:
build:
@echo "Building the project..."
@$(MAKE) -C debian/gisnav $@
.PHONY:
dist: build
@echo "Creating distribution package..."
@$(MAKE) -C debian/gisnav $@
.PHONY: clean
clean: clean\ docs
@echo "Cleaning up..."
@$(MAKE) -C debian/gisnav $@
# TODO - build and dist
.PHONY: clean\ docs
clean\ docs:
@echo "Cleaning up documentation build files..."
@rm -rf docs/sphinx/build
@rm -rf docs/vitepress/docs/reference
@rm -rf docs/vitepress/docs/.vitepress/dist
.PHONY: install
install: dist
@echo "Installing the project and dependencies..."
@$(MAKE) -C debian/gisnav $@
.PHONY: test
test:
@echo "Running tests..."
# TODO - run unit and launch tests (do not run simulation tests)
.PHONY: lint
lint:
@echo "Running linter..."
@pre-commit run --all-files
# alias for lint - we do not have a "dry-run" option for lint, both
# lint and format may modify the files
.PHONY: format
format: lint
.PHONY: check
check: lint test
@echo "Running code quality checks..."
.PHONY: dev
dev:
@echo "Launching GISNav locally using $(PROTOCOL) protocol..."
@ros2 launch gisnav local.launch.py protocol:=$(PROTOCOL)
.PHONY: help
help:
@echo "Available targets:"
@echo " docs - Build the documentation"
@echo " docs preview - Preview the documentation"
@echo " docs dev - Run the documentation development server"
@echo " build - Build the project"
@echo " dev - Run GISNav locally"
@echo " dist - Create a distribution package"
@echo " clean - Clean up all generated files"
@echo " clean docs - Clean up documentation build files only"
@echo " install - Install the project and dependencies"
@echo " test - Run the project's tests"
@echo " lint - Run the linter to check code style"
@echo " format - Automatically format the code"
@echo " check - Run linter and tests"
@echo " help - Show this help message"