| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
# Let's use wildcards instead of listing in extenso: |
| 4 |
POFILES = $(wildcard *.po) |
| 5 |
MOFILES = $(POFILES:.po=.mo) |
| 6 |
LANGS = $(POFILES:.po=) |
| 7 |
localedir=/usr/share/locale |
| 8 |
|
| 9 |
all: $(MOFILES) |
| 10 |
|
| 11 |
messages.pot: ../module-assistant |
| 12 |
xgettext -L perl ../module-assistant -o $@ |
| 13 |
|
| 14 |
%.mo: %.po |
| 15 |
msgfmt --statistics $< -o $@ |
| 16 |
|
| 17 |
%.po: messages.pot |
| 18 |
msgmerge -U $@ messages.pot |
| 19 |
# msgmerge doesn't update the timestamp if the file |
| 20 |
# is up to date already: |
| 21 |
touch $@ |
| 22 |
|
| 23 |
clean: |
| 24 |
rm -f *~ *.mo |
| 25 |
|
| 26 |
install: $(MOFILES) |
| 27 |
for lang in $(LANGS); do \ |
| 28 |
dir=$(localedir)/$$lang/LC_MESSAGES; \ |
| 29 |
install -d $(DESTDIR)$$dir; \ |
| 30 |
install -m 644 $$lang.mo $(DESTDIR)$$dir/module-assistant.mo; \ |
| 31 |
done |