-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMakefile
55 lines (46 loc) · 1.17 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
# Copyright 2024 Sine Nomine Associates
PYTHON3=/usr/bin/python3.12
BIN=.venv/bin
PIP=$(BIN)/pip
ACTIVATE=$(BIN)/activate
.PHONY: help
help:
@echo "usage: make <target>"
@echo ""
@echo "setup targets:"
@echo " init Create the Python virtualenv"
@echo ""
@echo "test targets:"
@echo " test Install OpenAFS then run tests on a virtual machine"
@echo ""
@echo "documentation targets:"
@echo " docs Generate the html docs"
@echo " preview Local preview of the html docs"
@echo ""
@echo "cleanup targets:"
@echo " clean Remove generated files"
@echo " distclean Remove generated files and virtualenv"
$(ACTIVATE): Makefile requirements.txt
$(PYTHON3) -m venv .venv
$(PIP) install -U pip
$(PIP) install -r requirements.txt
$(BIN)/patch-molecule-schema
touch $(ACTIVATE)
.PHONY: init
init: $(ACTIVATE)
.PHONY: test
test: init
. $(ACTIVATE); cd scenarios && molecule test
.PHONY: docs
docs: init
. $(ACTIVATE); $(MAKE) -C docs html
.PHONY: preview
preview: docs
xdg-open docs/build/html/index.html
.PHONY: clean
clean:
rm -rf docs/build
rm -rf scenarios/reports
.PHONY: reallyclean distclean
reallyclean distclean: clean
rm -rf .config .venv