3630
|
1 # Makefile.mingw
|
|
2 #
|
|
3 # Description: Makefile to generate mo files
|
|
4 #
|
|
5
|
|
6 PACKAGE = gaim
|
|
7
|
|
8
|
|
9 srcdir = .
|
|
10 top_srcdir = ..
|
|
11 GAIM_INSTALL_DIR = ../win32-install-dir
|
|
12 LOCALEDIR = $(GAIM_INSTALL_DIR)/locale
|
|
13 CC = gcc
|
|
14 GTK_BIN = ../../win32-dev/gtk_2_0/bin
|
|
15 GMSGFMT = $(GTK_BIN)/msgfmt
|
|
16 MSGFMT = $(GTK_BIN)/msgfmt
|
|
17 XGETTEXT = $(GTK_BIN)/xgettext
|
|
18 MSGMERGE = $(GTK_BIN)/msgmerge
|
|
19
|
|
20
|
|
21 .SUFFIXES:
|
|
22 .SUFFIXES: .c .o .po .pot .pox .gmo .mo
|
|
23
|
|
24
|
|
25 ##
|
|
26 ## SOURCES, OBJECTS
|
|
27 ##
|
|
28
|
|
29 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
|
|
30
|
|
31 POTFILES = \
|
|
32 ../plugins/docklet/docklet.c \
|
|
33 ../plugins/chatlist.c \
|
|
34 ../plugins/gtik.c \
|
|
35 ../src/protocols/gg/gg.c \
|
|
36 ../src/protocols/icq/gaim_icq.c \
|
|
37 ../src/protocols/irc/irc.c \
|
|
38 ../src/protocols/jabber/jabber.c \
|
|
39 ../src/protocols/msn/msn.c \
|
|
40 ../src/protocols/napster/napster.c \
|
|
41 ../src/protocols/oscar/oscar.c \
|
|
42 ../src/protocols/toc/toc.c \
|
|
43 ../src/protocols/yahoo/yahoo.c \
|
|
44 ../src/protocols/zephyr/zephyr.c \
|
|
45 ../src/about.c \
|
|
46 ../src/aim.c \
|
|
47 ../src/away.c \
|
|
48 ../src/buddy.c \
|
|
49 ../src/buddy_chat.c \
|
|
50 ../src/conversation.c \
|
|
51 ../src/dialogs.c \
|
|
52 ../src/gaimrc.c \
|
|
53 ../src/html.c \
|
|
54 ../src/module.c \
|
|
55 ../src/multi.c \
|
|
56 ../src/perl.c \
|
|
57 ../src/plugins.c \
|
|
58 ../src/prefs.c \
|
|
59 ../src/prpl.c \
|
|
60 ../src/server.c \
|
|
61 ../src/sound.c
|
|
62
|
|
63
|
|
64 ##
|
|
65 ## RULES
|
|
66 ##
|
|
67
|
|
68 .pot.pox:
|
|
69 $(MAKE) $(PACKAGE).pot
|
|
70 $(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox
|
|
71
|
|
72 .po.mo:
|
|
73 $(MSGFMT) -o $@ $<
|
|
74
|
|
75 .po.gmo:
|
|
76 rm -f $@ && $(GMSGFMT) --statistics -o $@ $<
|
|
77
|
|
78
|
|
79 ##
|
|
80 ## TARGETS
|
|
81 ##
|
|
82
|
|
83
|
|
84 all: $(CATALOGS)
|
|
85
|
|
86 $(PACKAGE).pot: $(POTFILES) POTFILES.in
|
|
87 $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
|
|
88 --add-comments --keyword=_ --keyword=N_ \
|
|
89 --files-from=$(srcdir)/POTFILES.in \
|
|
90 && test ! -f $(PACKAGE).po \
|
|
91 || ( rm -f $(srcdir)/$(PACKAGE).pot \
|
|
92 && mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot )
|
|
93
|
|
94 install: all
|
|
95 mkdir -p $(LOCALEDIR)
|
|
96 @catalogs='$(CATALOGS)'; \
|
|
97 for cat in $$catalogs; do \
|
|
98 cat=`basename $$cat`; \
|
|
99 lang=`echo $$cat | sed 's/\.gmo$$//'`; \
|
|
100 dir=$(LOCALEDIR)/$$lang/LC_MESSAGES; \
|
|
101 mkdir -p $$dir; \
|
|
102 if test -r $$cat; then \
|
|
103 cp $$cat $$dir/$(PACKAGE).mo; \
|
|
104 echo "installing $$cat as $$dir/$(PACKAGE).mo"; \
|
|
105 else \
|
|
106 cp $(srcdir)/$$cat $$dir/$(PACKAGE).mo; \
|
|
107 echo "installing $(srcdir)/$$cat as" \
|
|
108 "$$dir/$(PACKAGE).mo"; \
|
|
109 fi; \
|
|
110 done
|
|
111
|
|
112 clean:
|
|
113 rm -f *.gmo *.pot *.pox
|