diff options
author | n-peugnet <n.peugnet@free.fr> | 2022-03-25 16:22:55 +0100 |
---|---|---|
committer | n-peugnet <n.peugnet@free.fr> | 2022-03-25 16:22:55 +0100 |
commit | 5e10c0b6a02e4382057ac7bd0f3924cf61f54775 (patch) | |
tree | d296b0e55e5a7e980fb16a5e419363184d587621 /Makefile | |
parent | 5de7786306af5c66a69ff01fd4b6ceb929681a5f (diff) | |
download | club1-docs-5e10c0b6a02e4382057ac7bd0f3924cf61f54775.tar.gz club1-docs-5e10c0b6a02e4382057ac7bd0f3924cf61f54775.zip |
build languages in their subdir & add version
by separating builders commands from the other, we can directly choose the output dir
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 20 |
1 files changed, 13 insertions, 7 deletions
@@ -1,9 +1,9 @@ # Minimal makefile for Sphinx documentation # # You can set these variables from the command line. -override LOCALE := $(or $(LOCALE),fr) +LOCALE ?= fr PUBHOST ?= club1.fr -PUBDIR ?= /var/www/docs/$(LOCALE) +PUBDIR ?= /var/www/docs ifneq "$(LOCALE)" "fr" override NOTFR = 1 @@ -14,7 +14,7 @@ endif SPHINXLANG = -D language=$(LOCALE) SPHINXOPTS += -a SPHINXBUILD ?= sphinx-build -SPHINXLCMDS = html dirhtml singlehtml epub latex latexpdf latexpdfja text man texinfo info +SPHINXBUILDERS = html dirhtml singlehtml epub latex text man texinfo SPHINXCMDS = pickle json htmlhelp changes xml pseudoxml linkcheck doctest coverage SOURCEDIR = . BUILDDIR = _build @@ -27,7 +27,7 @@ DIRS = locales help: $(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $O -.PHONY: help clean update-po gettext publish $(SPHINXLCMDS) $(SPHINXCMDS) +.PHONY: help clean update-po gettext latexpdf info publish $(SPHINXBUILDERS) $(SPHINXCMDS) update-po: $(LOCALEFILES) @@ -47,12 +47,18 @@ $(BUILDDIR)/gettext/package.pot: $(MDFILES) $(SPHINXBUILD) -M gettext "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $O @touch $@ +latexpdf: latex + $(MAKE) -C $(BUILDDIR)/latex/$(LOCALE) + +info: texinfo + $(MAKE) -C $(BUILDDIR)/texinfo/$(LOCALE) + publish: html rsync -av --del _build/html/ $(USER)@$(PUBHOST):$(PUBDIR) -# Shinx commands that need locales. -$(SPHINXLCMDS): $(if $(NOTFR),locales/$(LOCALE)/LC_MESSAGES/package.po) - $(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXLANG) $(SPHINXOPTS) $O +# Shinx commands that need locales (builders). +$(SPHINXBUILDERS): $(if $(NOTFR),locales/$(LOCALE)/LC_MESSAGES/package.po) + $(SPHINXBUILD) -b $@ "$(SOURCEDIR)" "$(BUILDDIR)/$@/$(LOCALE)" $(SPHINXLANG) $(SPHINXOPTS) $O # Other Sphinx commands for autocompletion $(SPHINXCMDS): |