blob: fb1a80bf7bf1a84b703ca7a574231fbe9c60b8b1 (
plain)
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = $(srcdir)
include ../Makefile.inc
INSTALL= @INSTALL@
INSTALL_PROGRAM= @INSTALL_PROGRAM@
INSTALL_DATA= @INSTALL_DATA@
CC = @CC@
installprefix = $(DESTDIR)
MSGMERGE = msgmerge
NLSPACKAGE = @PACKAGE@
LINGUAS = cz de fi fr pt_BR ru sr sv tr
CATALOGS = $(addsuffix .mo, $(LINGUAS))
POTFILES = \
all: $(NLSPACKAGE).pot $(CATALOGS)
$(NLSPACKAGE).pot: $(POTFILES)
xgettext --default-domain=$(NLSPACKAGE) \
--add-comments --keyword=_ --keyword=N_ $(POTFILES)
if cmp -s $(NLSPACKAGE).po $(NLSPACKAGE).pot; then \
rm -f $(NLSPACKAGE).po; \
else \
mv $(NLSPACKAGE).po $(NLSPACKAGE).pot; \
fi
update-po: Makefile
@$(MAKE) $(NLSPACKAGE).pot
@catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
lang=`echo $$cat | sed 's/.mo//'`; \
if $(MSGMERGE) $$lang.po $(NLSPACKAGE).pot > $$lang.pox ; then \
echo "$(MSGMERGE) of $$lang succeeded" ; \
mv $$lang.pox $$lang.po ; \
else \
echo "$(MSGMERGE) of $$lang failed" ; \
rm -f $$lang.pox ; \
fi \
done
clean:
rm -f *mo $(NLSPACKAGE).pot
distclean: clean
rm -f .depend Makefile
depend:
install:
for n in $(CATALOGS); do \
l=`basename $$n .mo`; \
$(INSTALL) -m 755 -d $(installprefix)/$(RPMNLSDIR)/$$l; \
$(INSTALL) -m 755 -d $(installprefix)/$(RPMNLSDIR)/$$l/LC_MESSAGES; \
$(INSTALL) -m 644 $$n $(installprefix)/$(RPMNLSDIR)/$$l/LC_MESSAGES/rpm.mo; \
done
POTFILES: POTFILES.in
( if test 'x$(srcdir)' != 'x.'; then \
posrcprefix='$(top_srcdir)/'; \
else \
posrcprefix="../"; \
fi; \
sed -e '/^#/d' -e '/^[ ]*$$/d' \
-e "s@.*@ $$posrcprefix& \\\\@" \
-e '$$s/\(.*\) \\/\1/' < $(srcdir)/POTFILES.in > POTFILES )
Makefile: Makefile.in.in ../config.status POTFILES
cd .. \
&& CONFIG_FILES=po/$@.in CONFIG_HEADERS= \
$(SHELL) ./config.status
%.mo: %.po
msgfmt -o $@ $<
|