forked from LibraryOfCongress/bagit-python
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
17 lines (12 loc) · 659 Bytes
/
Makefile
File metadata and controls
17 lines (12 loc) · 659 Bytes
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 src/bagit/locale/*/LC_MESSAGES/*.mo
messages:
xgettext --language=python -d bagit-python --no-location -o src/bagit/locale/bagit-python.pot src/bagit/__init__.py
# Until http://savannah.gnu.org/bugs/?20923 is fixed:
sed -i '' -e 's/CHARSET/UTF-8/g' src/bagit/locale/bagit-python.pot
msgmerge --no-fuzzy-matching --lang=en --output-file=src/bagit/locale/en/LC_MESSAGES/bagit-python.po src/bagit/locale/en/LC_MESSAGES/bagit-python.po src/bagit/locale/bagit-python.pot
%.mo: %.po
msgfmt -o $@ $<
compile: $(COMPILED_MESSAGES)