3 # Description: Makefile to generate mo files
14 GAIM_INSTALL_DIR = ../win32-install-dir
15 LOCALEDIR = $(GAIM_INSTALL_DIR)/locale
16 GTK_BIN = ../../win32-dev/gtk_2_0/bin
22 GMSGFMT = $(GTK_BIN)/msgfmt
23 MSGFMT = $(GTK_BIN)/msgfmt
24 XGETTEXT = $(GTK_BIN)/xgettext
25 MSGMERGE = $(GTK_BIN)/msgmerge
29 .SUFFIXES: .c .o .po .pot .pox .gmo .mo
36 CATALOGS = bg.gmo cs.gmo da.gmo de.gmo es.gmo fi.gmo fr.gmo hu.gmo it.gmo ja.gmo ko.gmo nl.gmo pl.gmo ro.gmo ru.gmo sk.gmo sv.gmo zh_CN.gmo zh_TW.gmo
39 ../plugins/docklet/docklet.c \
40 ../plugins/chatlist.c \
42 ../src/protocols/gg/gg.c \
43 ../src/protocols/icq/gaim_icq.c \
44 ../src/protocols/irc/irc.c \
45 ../src/protocols/jabber/jabber.c \
46 ../src/protocols/msn/msn.c \
47 ../src/protocols/napster/napster.c \
48 ../src/protocols/oscar/oscar.c \
49 ../src/protocols/toc/toc.c \
50 ../src/protocols/yahoo/yahoo.c \
51 ../src/protocols/zephyr/zephyr.c \
57 ../src/conversation.c \
76 $(MAKE) $(PACKAGE).pot
77 $(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox
83 rm -f $@ && $(GMSGFMT) --statistics -o $@ $<
93 $(PACKAGE).pot: $(POTFILES) POTFILES.in
94 $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(GAIM_TOP) \
95 --add-comments --keyword=_ --keyword=N_ \
96 --files-from=$(srcdir)/POTFILES.in \
97 && test ! -f $(PACKAGE).po \
98 || ( rm -f $(srcdir)/$(PACKAGE).pot \
99 && mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot )
102 mkdir -p $(LOCALEDIR)
103 @catalogs='$(CATALOGS)'; \
104 for cat in $$catalogs; do \
105 cat=`basename $$cat`; \
106 lang=`echo $$cat | sed 's/\.gmo$$//'`; \
107 dir=$(LOCALEDIR)/$$lang/LC_MESSAGES; \
109 if test -r $$cat; then \
110 cp $$cat $$dir/$(PACKAGE).mo; \
111 echo "installing $$cat as $$dir/$(PACKAGE).mo"; \
113 cp $(srcdir)/$$cat $$dir/$(PACKAGE).mo; \
114 echo "installing $(srcdir)/$$cat as" \
115 "$$dir/$(PACKAGE).mo"; \
120 rm -f *.gmo *.pot *.pox