2 FILES = ../fdroid $(wildcard ../fdroidserver/*.py)
4 # these are the supported languages
5 ALL_LINGUAS = de es pt_BR pt_PT tr zh_Hans zh_Hant
6 POFILES = $(ALL_LINGUAS:=/LC_MESSAGES/fdroidserver.po)
7 MOFILES = $(ALL_LINGUAS:=/LC_MESSAGES/fdroidserver.mo)
9 TEMPLATE = fdroidserver.pot
11 VERSION = $(shell git describe)
13 # generate .mo files from the .po files
18 -rm -f -- $(POFILES:=~)
20 # refresh the template from the source code
24 xgettext --join-existing --from-code=UTF-8 \
25 --language=Python --keyword=_ \
26 --sort-output --no-location --output=$(TEMPLATE) \
27 --package-name="fdroidserver" --package-version=$(VERSION) \
29 --msgid-bugs-address=https://gitlab.com/fdroid/fdroidserver/issues \
31 sed -i 's,CHARSET,UTF-8,' $(TEMPLATE)
33 %/LC_MESSAGES/fdroidserver.mo: %/LC_MESSAGES/fdroidserver.po
34 msgfmt --check -o $@ $(@:mo=po)
37 .PHONY = all-local clean-local template