diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile | 18 | ||||
-rw-r--r-- | po/.gitignore | 1 |
3 files changed, 19 insertions, 1 deletions
@@ -1,3 +1,4 @@ *.x /html coverage +localization @@ -13,11 +13,27 @@ GUILE_C_FLAGS = -Lmodule \ -Wmacro-use-before-definition -Warity-mismatch \ -Wduplicate-case-datum -Wbad-case-datum -all: $(GO_FILES) README static +# All po-files inside po/, except new.po, and hidden files +PO_FILES = $(shell find po -type f -name \*.po -and -not -name new.po -and -not -name .\*) +LOCALIZATIONS = $(PO_FILES:po/%.po=localization/%/LC_MESSAGES/calp.mo) + +all: $(GO_FILES) README static $(LOCALIZATIONS) + +XGETTEXT_FLAGS = --from-code=UTF-8 --add-comments --indent -k_ static: $(MAKE) -C static +po/%.po: $(SCM_FILES) + xgettext $(XGETTEXT_FLAGS) --output $@ -L scheme $^ --join-existing --omit-header + +po/new.po: $(SCM_FILES) + xgettext $(XGETTEXT_FLAGS) --output $@ -L scheme $^ + +localization/%/LC_MESSAGES/calp.mo: po/%.po + -@mkdir -p $(shell dirname $@) + msgfmt --check -o $@ $< + obj/%.go: module/%.scm @mkdir -p obj @echo guild compile $< diff --git a/po/.gitignore b/po/.gitignore new file mode 100644 index 00000000..6cf4a14e --- /dev/null +++ b/po/.gitignore @@ -0,0 +1 @@ +new.po |