forked from roundcube/roundcubemail-helpdocs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
42 lines (35 loc) · 1.43 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
# Makefile for Sphinx documentation
#
# You can set these variables from the command line.
SOURCE = en_US
VERSION = 1.1
LANGUAGE = en
INTL_LOCALES = -l de -l fr -l sk
# use tags to include documentation for specific plugins
TAGS = -t archive -t acl -t zipdownload -t v1.1
SPHINXOPTS = -c . -D language='$(LANGUAGE)' -D version='$(VERSION)' -D release='$(VERSION)'
SPHINXBUILD = sphinx-build
SPHINXINTL = sphinx-intl
BUILDDIR = _build
ALLSPHINXOPTS = $(SPHINXOPTS) $(TAGS) -d $(BUILDDIR)/doctrees/$(SOURCE)
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(SOURCE) $(TAGS)
all: html
clean:
rm -rf $(BUILDDIR)/html
mkdir -p $(BUILDDIR)/locale/_plugins
html: conf.py _static/default.css
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(SOURCE) $(BUILDDIR)/html/$(VERSION)/$(LANGUAGE)
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html/$(VERSION)/$(SOURCE)."
gettext:
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
$(SPHINXINTL) update -p $(BUILDDIR)/locale -d locale $(INTL_LOCALES)
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
update-txconfig-resources:
@echo "Removing _plugins locale files..."
rm -rf locale/*/LC_MESSAGES/_plugins/*
rm -rf $(BUILDDIR)/locale/_plugins/*
$(SPHINXINTL) update-txconfig-resources --transifex-project-name roundcube-webmail-help -p $(BUILDDIR)/locale -d locale
@echo
@echo "Transifex resources have been updated."