mii-tool: fixed warning: "initialization discards qualifiers from pointer target"
[oss-qm-packages.git] / po / Makefile
blob155fdbb6be353253eceea9db4d74500e5211a38c
1 INSTALL=install -c
2 INSTALL_PROGRAM= ${INSTALL}
3 INSTALL_DATA= ${INSTALL} -m 644
4 INSTALLNLSDIR=${BASEDIR}/usr/share/locale
6 TUPDATE = msgmerge
8 NLSPACKAGE = net-tools
10 -include ../config.make
11 ifeq ($(I18N),1)
12 CATALOGS = de.mo fr.mo pt_BR.mo et_EE.mo cs.mo
13 else
14 CATALOGS =
15 endif
17 POTFILES=../arp.c ../hostname.c ../ifconfig.c ../netstat.c ../rarp.c \
18 ../route.c ../plipconfig.c ../iptunnel.c ../statistics.c \
19 ../lib/activate.c ../lib/af.c ../lib/arcnet.c ../lib/ash.c \
20 ../lib/ax25.c ../lib/ax25_gr.c ../lib/ddp.c ../lib/ddp_gr.c \
21 ../lib/econet.c ../lib/ether.c ../lib/fddi.c ../lib/frame.c \
22 ../lib/getargs.c ../lib/getroute.c ../lib/hdlclapb.c ../lib/hippi.c \
23 ../lib/hw.c ../lib/inet.c ../lib/inet6.c ../lib/inet6_gr.c \
24 ../lib/inet6_sr.c ../lib/inet_gr.c ../lib/inet_sr.c ../lib/ipx.c \
25 ../lib/ipx_gr.c ../lib/ipx_sr.c ../lib/loopback.c ../lib/masq_info.c \
26 ../lib/nstrcmp.c ../lib/netrom.c ../lib/netrom_gr.c ../lib/netrom_sr.c \
27 ../lib/ppp.c ../lib/ppp_ac.c ../lib/proc.c ../lib/rose.c \
28 ../lib/rose_gr.c ../lib/setroute.c ../lib/sit.c ../lib/slip.c \
29 ../lib/slip_ac.c ../lib/tr.c ../lib/tunnel.c ../lib/unix.c \
30 ../lib/util.c ../lib/interface.c ../lib/sockets.c ../lib/util-ank.c \
31 ../ipmaddr.c ../slattach.c ../iptunnel.c
33 all: $(NLSPACKAGE).pot $(CATALOGS)
35 $(NLSPACKAGE).pot: $(POTFILES)
36 xgettext --default-domain=$(NLSPACKAGE) \
37 --add-comments --keyword=_ --keyword=N_ $(POTFILES)
38 if cmp -s $(NLSPACKAGE).po $(NLSPACKAGE).pot; then \
39 rm -f $(NLSPACKAGE).po; \
40 else \
41 mv $(NLSPACKAGE).po $(NLSPACKAGE).pot; \
45 update-po: Makefile
46 $(MAKE) $(NLSPACKAGE).pot
47 catalogs='$(CATALOGS)'; \
48 for cat in $$catalogs; do \
49 lang=`echo $$cat | sed 's/.mo//'`; \
50 mv $$lang.po $$lang.old.po; \
51 echo "$$lang:"; \
52 if $(TUPDATE) $$lang.old.po $(NLSPACKAGE).pot > $$lang.po; then \
53 rm -f $$lang.old.po; \
54 else \
55 echo "tupdate for $$cat failed!"; \
56 rm -f $$lang.po; \
57 mv $$lang.old.po $$lang.po; \
58 fi; \
59 done
61 clean:
62 rm -f *mo
64 distclean: clean
65 rm -f .depend Makefile
67 depend:
69 install: $(CATALOGS)
70 catalogs='$(CATALOGS)'; \
71 for n in $$catalogs; do \
72 l=`basename $$n .mo`; \
73 $(INSTALL) -m 755 -d $(INSTALLNLSDIR)/$$l; \
74 $(INSTALL) -m 755 -d $(INSTALLNLSDIR)/$$l/LC_MESSAGES; \
75 $(INSTALL) -m 644 $$n $(INSTALLNLSDIR)/$$l/LC_MESSAGES/net-tools.mo; \
76 done
78 %.mo: %.po
79 msgfmt -o $@ $<