path: root/Makefile
diff options
authorng0 <>2019-03-03 09:59:51 +0000
committerng0 <>2019-03-03 09:59:51 +0000
commit4b89f63bd47dfb0c77dfdc6aacb89e08ec59f9d2 (patch)
treeb580981eb82865cdd5bca4234fa59113bc153fc7 /Makefile
parent5bd8913cdf42c9599b628007e3a0a510cdd0a228 (diff)
Makefile: make it configurable to adjust to differences in operating systems and their binary names of pybabel and python.
Diffstat (limited to 'Makefile')
1 files changed, 18 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 3b7a543..0e7d450 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,14 @@
# This file is in the public domain.
+# Hardly anyone seems to read README files anymore, so keep this note here:
+# Don't remove the variables for python etc. They exist
+# because one system sticks with PEPs, and others opt
+# for installing every version side-by-side,
+# Same goes for babel.
# All: build HTML pages in all languages and compile the
# TypeScript logic in web-common.
all: locale template
@@ -7,7 +16,7 @@ all: locale template
# Extract translateable strings from jinja2 templates.
locale/messages.pot: *.j2 common/*.j2 common/*
- env PYTHONPATH="." pybabel extract -F locale/ -o locale/messages.pot .
+ env PYTHONPATH="." $(BABEL) extract -F locale/ -o locale/messages.pot .
# Update translation (.po) files with new strings.
locale-update: locale/messages.pot
@@ -23,13 +32,13 @@ locale-update: locale/messages.pot
# Compile translation files for use.
- pybabel compile -d locale -l en --use-fuzzy
- pybabel compile -d locale -l de --use-fuzzy
- pybabel compile -d locale -l fr --use-fuzzy
- pybabel compile -d locale -l it --use-fuzzy
- pybabel compile -d locale -l es --use-fuzzy
- pybabel compile -d locale -l ru --use-fuzzy
- pybabel compile -d locale -l pt --use-fuzzy
+ $(BABEL) compile -d locale -l en --use-fuzzy
+ $(BABEL) compile -d locale -l de --use-fuzzy
+ $(BABEL) compile -d locale -l fr --use-fuzzy
+ $(BABEL) compile -d locale -l it --use-fuzzy
+ $(BABEL) compile -d locale -l es --use-fuzzy
+ $(BABEL) compile -d locale -l ru --use-fuzzy
+ $(BABEL) compile -d locale -l pt --use-fuzzy
# Process everything related to gettext translations.
locale: locale-update locale-compile
@@ -37,4 +46,4 @@ locale: locale-update locale-compile
# Run the jinja2 templating engine to expand templates to HTML
# incorporating translations.
template: locale-compile
- ./
+ $(PYTHON) ./