forked from toltec-dev/web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (41 loc) · 1.19 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
DIST=dist
SRC=src
VENV=.venv
all: dev
$(VENV)/bin/activate:
@echo "Setting up development virtual env in .venv"
python -m venv .venv; \
. .venv/bin/activate; \
python -m pip install -r requirements.txt
prod: $(VENV)/bin/activate
. $(VENV)/bin/activate; \
sphinx-build -a -n -E -b html $(SRC) $(DIST)
# Clean unused files inherited from default theme
rm -rf $(DIST)/.doctrees \
$(DIST)/.buildinfo \
$(DIST)/genindex.html \
$(DIST)/objects.inv \
$(DIST)/search.html \
$(DIST)/searchindex.js \
$(DIST)/sitemap.html \
$(DIST)/_sources \
$(DIST)/_static/basic.css \
$(DIST)/_static/doctools.js \
$(DIST)/_static/documentation_options.js \
$(DIST)/_static/file.png \
$(DIST)/_static/jquery-3.5.1.js \
$(DIST)/_static/jquery.js \
$(DIST)/_static/language_data.js \
$(DIST)/_static/minus.png \
$(DIST)/_static/plus.png \
$(DIST)/_static/pygments.css \
$(DIST)/_static/searchtools.js \
$(DIST)/_static/underscore-1.13.1.js \
$(DIST)/_static/underscore.js \
dev: $(VENV)/bin/activate
. $(VENV)/bin/activate; \
sphinx-autobuild -a $(SRC) $(DIST)
clean:
rm -r $(DIST)
rm -r $(VENV)
.PHONY: all prod dev clean