-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
49 lines (36 loc) · 1.01 KB
/
Makefile
File metadata and controls
49 lines (36 loc) · 1.01 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
SPHINX ?= sphinx-build
SERVER ?= python3 -mhttp.server
VENVDIR ?= .venv
VENV ?= $(VENVDIR)/bin/activate
URL ?= https://lexbor.com
BUILDDIR ?= build
DEPLOYDIR ?= deploy
.PHONY: install html run check clean deploy
$(VENVDIR):
python3 -m venv $(VENVDIR)
install: $(VENVDIR)
. $(VENV); pip install \
--require-virtualenv \
--upgrade -r requirements.txt \
--log .venv/pip_install.log
html: $(VENVDIR) $(BUILDDIR)
. $(VENV); $(SPHINX) -E -b dirhtml source "$(BUILDDIR)"
$(BUILDDIR):
mkdir "$(BUILDDIR)"
mkdir "$(BUILDDIR)/keys/"
run: SPHINX=sphinx-autobuild
run: html
check: $(VENVDIR)
. $(VENV); $(SPHINX) -b linkcheck -d "$(BUILDDIR)/.doctrees" source .
clean-doc:
rm -rf $(BUILDDIR) $(DEPLOYDIR)
clean: clean-doc
rm -rf $(VENVDIR)
deploy: html
$(eval TMP := $(shell mktemp -d))
rsync -rv $(EXCLUDE) "$(BUILDDIR)/" "$(TMP)"
rsync -rcv --delete --exclude='*.gz' --exclude='tmp.*' \
"$(TMP)/" "$(DEPLOYDIR)"
-rm -rf "$(TMP)"
mkdir $(DEPLOYDIR)/.well-known
chmod -R g=u "$(DEPLOYDIR)"