1 |
# Installation directories |
2 |
localedir = $(DESTDIR)/usr/share/locale |
3 |
|
4 |
PGOAL = drakmenustyle |
5 |
|
6 |
# perl files to search translatable strings in |
7 |
PL_FILES = ../drakmenustyle |
8 |
# C-like files to search translatable strings in |
9 |
#CFILES = |
10 |
|
11 |
POFILES = $(shell ls *.po) |
12 |
MOFILES = $(POFILES:%.po=%.mo) |
13 |
LANGS = $(POFILES:%.po=%) |
14 |
|
15 |
PREFIX = $(RPM_BUILD_ROOT)/usr |
16 |
DATADIR = $(PREFIX)/share |
17 |
LOCALEDIR=$(DATADIR)/locale |
18 |
|
19 |
GOALS = $(PGOAL).pot $(MOFILES) |
20 |
|
21 |
all: $(GOALS) |
22 |
|
23 |
install: all |
24 |
for l in $(LANGS); do \ |
25 |
install -d $(localedir)/$$l/LC_MESSAGES; \ |
26 |
install -m 644 $$l.mo $(localedir)/$$l/LC_MESSAGES/$(PGOAL).mo; \ |
27 |
done |
28 |
|
29 |
clean: |
30 |
rm -f *~ *.[oas] *.mo TAGS $(PL_CFILES) |
31 |
|
32 |
%.mo: %.po |
33 |
msgfmt -o $@ $< |
34 |
|
35 |
$(PGOAL).pot: $(PL_FILES) POTFILES.in |
36 |
perl_checker -q --generate-pot $@ $(PL_FILES) |
37 |
|
38 |
update_n_merge: $(PGOAL).pot merge |
39 |
|
40 |
merge: |
41 |
@for n in $(POFILES); do \ |
42 |
echo "Merging $$n"; \ |
43 |
msgmerge -C "$$n" "$$n" $(PGOAL).pot > "$$n"t; \ |
44 |
mv -f "$$n"t "$$n"; \ |
45 |
done |
46 |
|