-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
48 lines (40 loc) · 1.56 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
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = build
DOCS_FILES = af.rst ao.rst mplayer.rst options.rst vf.rst vo.rst
DOCS_URL = http://git.mplayer2.org/uau/mplayer2.git/plain/DOCS/man/en/
DOCS_BRANCH = man
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
.PHONY: server website update-man clean help
.DEFAULT_GOAL := website
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " server to start the development webserver"
@echo " website to make the website"
@echo " update-man to update the man from mplayer2's git repository"
@echo " clean to clean the website build product"
@echo " help to show this help message"
@echo " test to run the sphinxblog testsuite"
server:
@echo "Starting webserver..."
@cd build/website && python -m SimpleHTTPServer
clean:
-rm -rf $(BUILDDIR)/*
update-man:
mkdir -p source/docs/
$(foreach var,$(DOCS_FILES),wget -O source/docs/$(var) $(DOCS_URL)$(var)?h=$(DOCS_BRANCH);)
website:
@echo "Building posts..."
@python3 sphinxblog/gen.py
@echo "Building site..."
@$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/website
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
test:
python -m unittest discover -s sphinxblog -p '*_test.py'