-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
54 lines (45 loc) · 1.42 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
# A Self-Documenting Makefile: http://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
.DEFAULT_GOAL := help
.PHONY: help
help: ## Display this help message.
echo $(MAKEFILE_LIST);
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
TOP=$(CURDIR)
include $(TOP)/Makefile.conf
LOG_DIR=./log
# .SILENT:
.PHONY: clean
clean: ## Clean log files.
@echo "Cleaning log files...";
-@rm $(TOP)/{,.}*{dot,log,svg};
-@rm -rf $(TOP)/plugins;
-@rm -rf ${LOG_DIR};
.PHONY: unsetup
unsetup: ## Remove Plugin Manager
-@rm -rf plugin-manager;
.PHONY: setup
setup: ## Install dependencies and build Plugin Manager
if [ ! -d "./plugin-manager/" ]; then \
git clone https://github.com/VeritasOS/plugin-manager.git; \
fi
cd plugin-manager; \
git checkout v2; \
git pull -r;
echo "A" | make -C plugin-manager install-proto-deps
make -C plugin-manager build; \
ret=$$?; \
if [ $${ret} -ne 0 ]; then \
echo "Failed to build Plugin Manager (pm). Return: $${d}."; \
exit 1; \
fi ;
.PHONY: start
start: ## Start Appliance Manager server
if [ ! -d "plugin-manager" ]; then \
echo "Directory not present..."; \
make setup; \
fi
mkdir -p ${LOG_DIR} || (echo "Failed to create ${LOG_DIR}"; exit 1);
echo "Starting Plugin Manager server...";
echo "PM_WEB=${PM_WEB}";
./plugin-manager/bin/pm server -port 8081 -log-dir $(LOG_DIR)
.NOTPARALLEL: