blob: c7f27fb1f0d4f43b84fa9736ed7f2a4063d47f63 (
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
81
82
83
84
85
86
87
88
|
INSTALL=install -c
INSTALL_PROGRAM= ${INSTALL}
INSTALL_DATA= ${INSTALL} -m 644
INSTALLNLSDIR=${BASEDIR}/usr/share/locale
TUPDATE = msgmerge
NLSPACKAGE = net-tools
-include ../config.make
ALL_POS = $(wildcard *.po)
ALL_LANGS = $(ALL_POS:%.po=%)
ALL_CATALOGS = $(ALL_LANGS:%=%.mo)
ifeq ($(I18N),1)
ifeq ($(LINGUAS),)
LANGS = $(ALL_LANGS)
else
LANGS = $(filter $(LINGUAS),$(ALL_LANGS))
endif
else
LANGS =
endif
CATALOGS = $(LANGS:%=%.mo)
POTFILES=../arp.c ../hostname.c ../ifconfig.c ../netstat.c ../rarp.c \
../route.c ../plipconfig.c ../iptunnel.c ../statistics.c \
../lib/activate.c ../lib/af.c ../lib/arcnet.c ../lib/ash.c \
../lib/ax25.c ../lib/ax25_gr.c ../lib/ddp.c ../lib/ddp_gr.c \
../lib/econet.c ../lib/ether.c ../lib/fddi.c ../lib/frame.c \
../lib/getargs.c ../lib/getroute.c ../lib/hdlclapb.c ../lib/hippi.c \
../lib/hw.c ../lib/inet.c ../lib/inet6.c ../lib/inet6_gr.c \
../lib/inet6_sr.c ../lib/inet_gr.c ../lib/inet_sr.c ../lib/ipx.c \
../lib/ipx_gr.c ../lib/ipx_sr.c ../lib/loopback.c ../lib/masq_info.c \
../lib/nstrcmp.c ../lib/netrom.c ../lib/netrom_gr.c ../lib/netrom_sr.c \
../lib/ppp.c ../lib/ppp_ac.c ../lib/proc.c ../lib/rose.c \
../lib/rose_gr.c ../lib/setroute.c ../lib/sit.c ../lib/slip.c \
../lib/slip_ac.c ../lib/tr.c ../lib/tunnel.c ../lib/unix.c \
../lib/util.c ../lib/interface.c ../lib/sockets.c ../lib/util-ank.c \
../ipmaddr.c ../slattach.c ../iptunnel.c
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
langs='$(ALL_LANGS)'; \
for lang in $$langs; do \
cat=$$lang.mo; \
mv $$lang.po $$lang.old.po; \
echo "$$lang:"; \
if $(TUPDATE) $$lang.old.po $(NLSPACKAGE).pot > $$lang.po; then \
rm -f $$lang.old.po; \
else \
echo "tupdate for $$cat failed!"; \
rm -f $$lang.po; \
mv $$lang.old.po $$lang.po; \
fi; \
done
clean:
rm -f *mo
dist: $(ALL_CATALOGS)
distclean: clean
rm -f .depend Makefile
depend:
install: $(CATALOGS)
langs='$(LANGS)'; \
for l in $$langs; do \
$(INSTALL) -m 755 -d $(INSTALLNLSDIR)/$$l; \
$(INSTALL) -m 755 -d $(INSTALLNLSDIR)/$$l/LC_MESSAGES; \
$(INSTALL) -m 644 $$l.mo $(INSTALLNLSDIR)/$$l/LC_MESSAGES/net-tools.mo; \
done
%.mo: %.po
msgfmt -o $@ $<
|