[gaim-migrate @ 5388]
[pidgin-git.git] / po / Makefile.mingw
blob69ccba85dd3b96e631aefddedd935db4300d8b2f
1 # Makefile.mingw
2
3 # Description: Makefile to generate mo files
6 PACKAGE = gaim
8 ##
9 ## PATHS
12 srcdir = .
13 GAIM_TOP = ..
14 GAIM_INSTALL_DIR = ../win32-install-dir
15 LOCALEDIR = $(GAIM_INSTALL_DIR)/locale
16 GTK_BIN = ../../win32-dev/gtk_2_0/bin
19 ## TOOLS
22 GMSGFMT = $(GTK_BIN)/msgfmt
23 MSGFMT = $(GTK_BIN)/msgfmt
24 XGETTEXT = $(GTK_BIN)/xgettext
25 MSGMERGE = $(GTK_BIN)/msgmerge
28 .SUFFIXES:
29 .SUFFIXES: .c .o .po .pot .pox .gmo .mo
33 ## SOURCES, OBJECTS
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
38 POTFILES = \
39                      ../plugins/docklet/docklet.c \
40                      ../plugins/chatlist.c \
41                      ../plugins/gtik.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 \
52                      ../src/about.c \
53                      ../src/aim.c \
54                      ../src/away.c \
55                      ../src/buddy.c \
56                      ../src/buddy_chat.c \
57                      ../src/conversation.c \
58                      ../src/dialogs.c \
59                      ../src/gaimrc.c \
60                      ../src/html.c \
61                      ../src/module.c \
62                      ../src/multi.c \
63                      ../src/perl.c \
64                      ../src/plugins.c \
65                      ../src/prefs.c \
66                      ../src/prpl.c \
67                      ../src/server.c \
68                      ../src/sound.c
72 ## RULES
75 .pot.pox:
76         $(MAKE) $(PACKAGE).pot
77         $(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox
79 .po.mo:
80         $(MSGFMT) -o $@ $<
82 .po.gmo:
83         rm -f $@ && $(GMSGFMT) --statistics -o $@ $<
87 ## TARGETS
91 all: $(CATALOGS)
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 )
101 install: all
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; \
108           mkdir -p $$dir; \
109           if test -r $$cat; then \
110             cp $$cat $$dir/$(PACKAGE).mo; \
111             echo "installing $$cat as $$dir/$(PACKAGE).mo"; \
112           else \
113             cp $(srcdir)/$$cat $$dir/$(PACKAGE).mo; \
114             echo "installing $(srcdir)/$$cat as" \
115                  "$$dir/$(PACKAGE).mo"; \
116           fi; \
117         done
119 clean:
120         rm -f *.gmo *.pot *.pox