-
Notifications
You must be signed in to change notification settings - Fork 85
/
Makefile
17 lines (12 loc) · 586 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
COMPILED_MESSAGES=$(patsubst %.po,%.mo, $(wildcard locale/*/LC_MESSAGES/bagit-python.po))
all: messages compile
clean:
rm -f locale/*/LC_MESSAGES/*.mo
messages:
xgettext --language=python -d bagit-python --no-location -o locale/bagit-python.pot bagit.py
# Until http://savannah.gnu.org/bugs/?20923 is fixed:
sed -i '' -e 's/CHARSET/UTF-8/g' locale/bagit-python.pot
msgmerge --no-fuzzy-matching --lang=en --output-file=locale/en/LC_MESSAGES/bagit-python.po locale/en/LC_MESSAGES/bagit-python.po locale/bagit-python.pot
%.mo: %.po
msgfmt -o $@ $<
compile: $(COMPILED_MESSAGES)