-
Notifications
You must be signed in to change notification settings - Fork 6
/
I18N.mk
34 lines (29 loc) · 978 Bytes
/
I18N.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
I18N: messages
messages:
@catalogs=`find ./po -name \*.po` ; \
name=po/$(I18N_mod).pot ; \
xgettext -o $$name -C --no-location --no-wrap -k_ *.{cpp,h} $(I18N_addfiles) ; \
if test "x$(I18N_add1)" != "x"; then xgettext --no-location -o $$name -j --no-wrap $(I18N_add1); fi; \
for cat in $$catalogs; do \
msgmerge -U $$cat $$name ; \
done
install-I18N:
@catalogs=`find ./po -name \*.po` ; \
name=$(I18N_mod).mo ; \
for cat in $$catalogs; do \
mkdir -p $(DESTDIR)$(localedir)/`basename $$cat .po`/LC_MESSAGES ; \
msgfmt -vo $$name $$cat ; \
cp $$name $(DESTDIR)$(localedir)/`basename $$cat .po`/LC_MESSAGES/$$name ; \
rm $$name ; \
done
uninstall-I18N:
@catalogs=`find ./po -name \*.po` ; \
name=$(I18N_mod).mo ; \
for cat in $$catalogs; do \
rm -f $$name $(DESTDIR)$(localedir)/`basename $$cat .po`/LC_MESSAGES/$$name ; \
done
clean-I18N:
rm -f po/*~ ;
install-data-local: install-I18N
uninstall-local: uninstall-I18N
clean-local: clean-I18N