summaryrefslogtreecommitdiff
path: root/po/Makefile.in.in
blob: ae108add5ad1cbf756c3a6b068b9cea15858e245 (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
PO-FILES=fr.po
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=../src/main.c ../src/navigation.c


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

clean:
	rm -f $(MO-FILES)

distclean: clean
	rm Makefile

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

$(PO-FILES): navit.pot
	test -e $@
	@MSGMERGE@ $@ navit.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 navit.pot $$i.po; \
	 done