2 FILES = ../fdroid $(wildcard ../fdroidserver/*.py) \
3 $(wildcard /usr/lib/python3.*/argparse.py) \
4 $(wildcard /usr/lib/python3.*/optparse.py) \
5 $(wildcard /usr/lib/python3.*/getopt.py)
7 # these are the supported languages
8 ALL_LINGUAS = de es pt_BR pt_PT tr zh_Hans zh_Hant
9 POFILES = $(wildcard */LC_MESSAGES/fdroidserver.po)
10 MOFILES = $(ALL_LINGUAS:=/LC_MESSAGES/fdroidserver.mo)
12 TEMPLATE = fdroidserver.pot
14 VERSION = $(shell git describe)
16 # refresh everything from the source code
19 # generate .mo files from the .po files
24 -rm -f -- $(POFILES:=~)
27 xgettext --join-existing --from-code=UTF-8 \
28 --language=Python --keyword=_ \
29 --no-wrap --sort-output --add-location=file --output=$(TEMPLATE) \
30 --package-name="fdroidserver" --package-version=$(VERSION) \
32 --msgid-bugs-address=https://gitlab.com/fdroid/fdroidserver/issues \
34 sed -i 's,CHARSET,UTF-8,' $(TEMPLATE)
37 msgmerge --no-wrap --sort-output --add-location=file --update $@ $(TEMPLATE)
39 %/LC_MESSAGES/fdroidserver.mo: %/LC_MESSAGES/fdroidserver.po
40 msgfmt --check -o $@ $(@:mo=po)
43 .PHONY = compile clean update