-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathMakefile
More file actions
55 lines (47 loc) · 1.4 KB
/
Makefile
File metadata and controls
55 lines (47 loc) · 1.4 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
BUILD_MODE ?= debug
BUILD_FLAG := $(if $(filter release,$(BUILD_MODE)),--release,)
build-all:
@echo ""
@echo "**********************************"
@echo "* Building the source code"
@echo "**********************************"
@echo ""
@cargo build --all $(BUILD_FLAG)
tests: build-all
@echo ""
@echo "**********************************"
@echo "* Unit testing"
@echo "**********************************"
@echo ""
@cargo test --all --verbose
e2e-test: build-all
@./tests/functional_tests.sh
fmt:
@echo ""
@echo "**********************************"
@echo "* Formatting"
@echo "**********************************"
@echo ""
@cargo fmt --all --check
clippy:
@echo ""
@echo "**********************************"
@echo "* Linting with clippy"
@echo "**********************************"
@echo ""
@cargo clippy --verbose -- --deny warnings
install: build-all
@echo ""
@echo "**********************************"
@echo "* Installing binaries"
@echo "**********************************"
@echo ""
@/bin/install -d $(DESTDIR)/usr/bin
@/bin/install -m 0755 target/$(BUILD_MODE)/azure-init $(DESTDIR)/usr/bin/
@echo ""
@echo "**********************************"
@echo "* Installing systemd service file"
@echo "**********************************"
@echo ""
@/bin/install -d $(DESTDIR)/usr/lib/systemd/system
@/bin/install -m 0644 config/azure-init.service $(DESTDIR)/usr/lib/systemd/system/azure-init.service