Mercurial > gemma
changeset 1849:aabde3279947
client: translations: improve Makefile
* Change target `translations` to only be remade if one of
the `*.po` files changes. Technically is only directly depends
on these files. This looks like a defect in the original upstream
Makefile logic.
* Add found `*.js` files to the dependencies of the `pot` target,
because they are used when creating it. This looks like it was missed
when adding the Makefile initially with 0fd572582ab8.
author | Bernhard Reiter <bernhard@intevation.de> |
---|---|
date | Thu, 17 Jan 2019 09:48:21 +0100 |
parents | 452f37a09fd7 |
children | 6840401ec6a6 |
files | client/Makefile |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/client/Makefile Thu Jan 17 09:40:54 2019 +0100 +++ b/client/Makefile Thu Jan 17 09:48:21 2019 +0100 @@ -43,7 +43,7 @@ # Create a main .pot template, then generate .po files for each available language. # Thanx to Systematic: https://github.com/Polyconseil/systematic/blob/866d5a/mk/main.mk#L167-L183 -$(TEMPLATE_POT): $(GETTEXT_HTML_SOURCES) +$(TEMPLATE_POT): $(GETTEXT_HTML_SOURCES) $(GETTEXT_JS_SOURCES) # `dir` is a Makefile built-in expansion function which extracts the directory-part of `$@`. # `$@` is a Makefile automatic variable: the file name of the target of the rule. # => `mkdir -p /tmp/` @@ -66,6 +66,6 @@ msgattrib --no-wrap --no-obsolete -o $$PO_FILE $$PO_FILE; \ done; -$(OUTPUT_DIR)/locale/translations.json: clean $(TEMPLATE_POT) +$(OUTPUT_DIR)/locale/translations.json: $(LOCALE_FILES) mkdir -p $(OUTPUT_DIR) gettext-compile --output $@ $(LOCALE_FILES)