aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorn-peugnet <n.peugnet@free.fr>2022-05-02 15:23:45 +0200
committern-peugnet <n.peugnet@free.fr>2022-05-02 15:24:41 +0200
commitb465c3af6045cec1c7f7cca060ffd975267b2d76 (patch)
treef28673d5b6a028ec8a6d84164ee2ab273d7db6e2 /Makefile
parent273e52b04cf6e45c2226bc5b26aba914b426922a (diff)
downloadclub1-docs-b465c3af6045cec1c7f7cca060ffd975267b2d76.tar.gz
club1-docs-b465c3af6045cec1c7f7cca060ffd975267b2d76.zip
refactor: prefix locales dir with underscoren-peugnet-move-locales
to separate it more clearly from the content of the docs
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 6 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index fd942d5..98ecfc7 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,8 @@
# You can set these variables from the command line.
LOCALES := en
-LOCALEFILES := $(LOCALES:%=locales/%/LC_MESSAGES/package.po) $(LOCALES:%=locales/%/LC_MESSAGES/sphinx.po)
+LOCALEDIR := _locales
+LOCALEFILES := $(LOCALES:%=$(LOCALEDIR)/%/LC_MESSAGES/package.po) $(LOCALES:%=$(LOCALEDIR)/%/LC_MESSAGES/sphinx.po)
export AUTHORS := $(shell awk '{printf t $$0; t=", "}' AUTHORS)
export PACKAGE := CLUB1
@@ -42,11 +43,11 @@ update-po: $(LOCALEFILES);
msgfmt -o $@ $<
.SECONDEXPANSION:
-$(LOCALEFILES): locales/%.po: locales/$$(*F).pot
+$(LOCALEFILES): $(LOCALEDIR)/%.po: $(LOCALEDIR)/$$(*F).pot
msgmerge -q --previous --update $@ $< --backup=none -w 79
@touch $@
-locales/package.pot locales/sphinx.pot: locales/%.pot: $(BUILDDIR)/gettext/%.pot
+$(LOCALEDIR)/package.pot $(LOCALEDIR)/sphinx.pot: $(LOCALEDIR)/%.pot: $(BUILDDIR)/gettext/%.pot
xgettext $< -o $@ -w 79 \
--copyright-holder='$(AUTHORS)' --package-name='$(PACKAGE)' \
--package-version='$(VERSION)' --msgid-bugs-address='$(EMAIL)'
@@ -74,7 +75,7 @@ html: $(LANGUAGES:%=html/%) $(BUILDDIR)/html/index.html
# Localized Sphinx builders
.SECONDEXPANSION:
-$(SPHINXLBUILDERS): $$(if $$(filter fr,$$(@F)),,locales/$$(@F)/LC_MESSAGES/package.mo locales/$$(@F)/LC_MESSAGES/sphinx.mo)
+$(SPHINXLBUILDERS): $$(if $$(filter fr,$$(@F)),,$(LOCALEDIR)/$$(@F)/LC_MESSAGES/package.mo $(LOCALEDIR)/$$(@F)/LC_MESSAGES/sphinx.mo)
LOCALE=$(@F) $(SPHINXBUILD) -b $(@D) -d $(BUILDDIR)/doctrees/$(@F) $(SOURCEDIR) $(BUILDDIR)/$(@D)/$(@F) $(SPHINXOPTS) $O
# Other Sphinx commands for autocompletion
@@ -82,7 +83,7 @@ $(SPHINXCMDS):
$(SPHINXBUILD) -M $@ $(SOURCEDIR) $(BUILDDIR) $(SPHINXOPTS) $O
clean:
- rm -f locales/*/LC_MESSAGES/*.mo
+ rm -f $(LOCALEDIR)/*/LC_MESSAGES/*.mo
rm -rf $(BUILDDIR)/*
.PHONY: .FORCE