Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/i18n/Makefile.in.in
blob: 5c444f873b0933e0556e44761ac7fc82f56ad3fe (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
PO-FILES=@POFILES@
LANGUAGES=$(PO-FILES:.po=)

# Maybe this should be autogenerated by "configure".
LOCALEDIR=@LOCALEDIR@

# If other files will be translated, they must be also here:
CSOURCES=../ui/ui.c ../ui-hlp/menu.c \
../ui-hlp/play.c ../ui-hlp/ui_helper.c \
../engine/zoom.c ../engine/btrace.c \
../ui/dialog.c ../ui/filesel.c ../ui-hlp/render.c \
../ui/ui-drv/win32/ui_win32.c \
../ui/ui-drv/cocoa/AppController.m \
../ui/ui-drv/cocoa/CustomDialog.m


MO-FILES = $(LANGUAGES:=.mo)

all: $(MO-FILES)

install: $(MO-FILES)
	@for i in $(LANGUAGES); do \
	 @INSTALL@ -d $(DESTDIR)$(LOCALEDIR)/$$i/LC_MESSAGES; \
	 @INSTALL@ -m 444 $$i.mo $(DESTDIR)$(LOCALEDIR)/$$i/LC_MESSAGES/xaos.mo; \
	 done

install-win: $(MO-FILES)
	@for i in $(LANGUAGES); do \
	 @INSTALL@ -d $(DESTDIR)/locale/$$i/LC_MESSAGES; \
	 @INSTALL@ -m 444 $$i.mo $(DESTDIR)/locale/$$i/LC_MESSAGES/xaos.mo; \
	 done

clean:
	rm -f $(MO-FILES)

distclean: clean
	rm Makefile

messages.pot: $(CSOURCES)
	@XGETTEXT@ -o messages.pot $(CSOURCES)

$(PO-FILES): messages.pot
	test -e $@
	@MSGMERGE@ $@ messages.pot > $@.new
	mv $@.new $@

$(MO-FILES): $(PO-FILES)
	@MSGFMT@ -o $@ -c -v --statistics $(@:.mo=.po)

new-languages: Makefile
	@for i in $(LANGUAGES); do \
	 test -e $$i.po || cp messages.pot $$i.po; \
	 done