-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMakefile
More file actions
93 lines (74 loc) · 2.34 KB
/
Makefile
File metadata and controls
93 lines (74 loc) · 2.34 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?= -j auto
SPHINXBUILD ?= python3 -msphinx
SPHINXSERV ?= sphinx-autobuild
CONFIGDIR = .
SOURCEDIR = src
BUILDDIR = build
LANG = en_US.UTF-8
MAKE = make
RM = rm -rf
TS = $(shell date +'%Y-%m-%d %H:%M')
.PHONY: default
default: fast
################################################################################
# Sphinx Build
################################################################################
.PHONY: help
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: clean
clean:
@$(RM) $(BUILDDIR)
# Catch-all target: route all unknown targets to Sphinx builder name.
# $(O) is meant as a shortcut for $(SPHINXOPTS).
.PHONY: Makefile
%: Makefile
@$(SPHINXBUILD) -b $@ -c "$(CONFIGDIR)" "$(SOURCEDIR)" "$(BUILDDIR)/$@" $(SPHINXOPTS) $(O)
# Fast HTML builder: https://sphinx.silverrainz.me/fasthtml/
.PHONY: fast
fast: Makefile
@$(SPHINXBUILD) -b $@html -c "$(CONFIGDIR)" "$(SOURCEDIR)" "$(BUILDDIR)/html" $(SPHINXOPTS) $(O)
# Picker builder: https://sphinx.silverrainz.me/picker/, for shell completion.
.PHONY: snip
pick: picker
################################################################################
# View Helpers
################################################################################
.PHONY: view
view:
xdg-open "$(BUILDDIR)/html/index.html"
.PHONY: serve
serve:
cd utils && ./autobuild
################################################################################
# Git Helpers
################################################################################
.PHONY: status
status:
@./utils/git-status
.PHONY: commit
commit:
git commit -m "$(TS)"
git push
.PHONY: commit-skip-recentupdate
commit-skip-recentupdate:
git commit -m "[skip-recentupdate] $(TS)"
git push
.PHONY: commit-skip-build
commit-skip-build:
git commit -m "[skip ci] $(TS)"
git push
.PHONY: pull
pull:
git fetch origin master
git merge origin/master
################################################################################
# Misc Utils
################################################################################
.PHONY: migrate-to-permnotes
migrate-to-permnotes:
./utils/migrate-to-permnotes