-
Notifications
You must be signed in to change notification settings - Fork 21
/
Makefile
30 lines (23 loc) · 1.09 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
# Minimal makefile for Sphinx documentation
# You can set these variables from the command line.
LANGUAGES ?= cs de zh_CN es fr nl ja pt ru
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SPHINXINTL ?= sphinx-intl
SOURCEDIR ?= pages
BUILDDIR ?= _build
LOCALEDIR ?= locale
BASE_LANG ?= en
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help $(MAKEFILES)
html: $(addprefix html/,$(LANGUAGES)) $(addprefix html/,$(BASE_LANG))
@echo "Pages available at file://$$PWD/$(BUILDDIR)/html/index.html"
$(addprefix html/,$(LANGUAGES)): $(MAKEFILES)
@$(SPHINXBUILD) "$(SOURCEDIR)" "$(BUILDDIR)/$@" $(SPHINXOPTS) -Dlanguage=$(word 2,$(subst /, ,$@))
$(addprefix html/,$(BASE_LANG)): $(MAKEFILES)
@$(SPHINXBUILD) "$(SOURCEDIR)" "$(BUILDDIR)/html/" $(SPHINXOPTS) -Dlanguage=$(word 2,$(subst /, ,$@))
gettext: $(MAKEFILES)
@$(SPHINXBUILD) -b $@ "$(SOURCEDIR)" "$(BUILDDIR)/$@" $(SPHINXOPTS)
@$(SPHINXINTL) update -w 80 -p "$(BUILDDIR)/$@" -d locale $(addprefix -l,$(filter-out en,$(LANGUAGES)))