This repository has been archived by the owner on Sep 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
76 lines (54 loc) · 1.46 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
include config.mk
scripts_dir=scripts
package_dir=pkg
.PHONY: all
all: build
#### Stuff to build and run the docker image
.PHONY: build-docker
build-docker:
docker-compose build
.PHONY: run-docker
run-docker:
docker-compose run spear
.PHONY: run-docker-with-can
run-docker-with-can:
./$(scripts_dir)/docker-with-can.bash
.PHONY: run-docker-with-vcan
run-docker-with-vcan:
./$(scripts_dir)/docker-with-can.bash --vcan
#### Stuff to run inside the docker container (or on rover)
# Compilation
.PHONY: build
build: $(if $(filter $(BUILD_GENERATE_DSDL), true), generate-dsdl)
BUILD_COPY_HEADERS_AND_LIBS=$(BUILD_COPY_HEADERS_AND_LIBS) ./$(scripts_dir)/build.bash
# Testing
.PHONY: rostest
rostest:
for filepath in $(package_dir)/tests/test/*.test; do \
filename=$$(basename $$filepath); \
rostest tests $$filename; \
done
# Unpacking, bootstrapping, etc.
.PHONY: init-submodules
init-submodules:
git submodule update --init --recursive
.PHONY: generate-dsdl
generate-dsdl: init-submodules
./$(scripts_dir)/generate_dsdl.sh
.PHONY: unpack
unpack: generate-dsdl init-submodules
UNPACK_ENV=$(UNPACK_ENV) UNPACK_SKIP_BUILD=$(UNPACK_SKIP_BUILD) ./$(scripts_dir)/unpack.sh
# Stuff for initializing CAN
.PHONY: setup-can
setup-can:
./$(scripts_dir)/setup-can.bash
.PHONY: setup-vcan
setup-vcan:
./$(scripts_dir)/setup-vcan.bash
# Linting
.PHONY: lint-catkin
lint-catkin:
./$(scripts_dir)/catkin_lint.bash
.PHONY: lint-xml
lint-xml:
./$(scripts_dir)/xml_lint.bash