wok-next view busybox/stuff/po/Makefile @ rev 19972
Up copyq (3.1.1), qedit (2.8.1)
author | Xander Ziiryanoff <psychomaniak@xakep.ru> |
---|---|
date | Tue Oct 17 19:29:54 2017 +0200 (2017-10-17) |
parents | 7f188676b59c |
children |
line source
1 # Makefile for daemon.
2 #
3 prefix ?= /usr
4 datarootdir ?= $(prefix)/share
5 localedir ?= $(datarootdir)/locale
6 DESTDIR ?=
7 LINGUAS ?= $(shell cat LINGUAS)
8 POTFILES ?= $(shell cat POTFILES)
9 VERSION ?= 1.0
11 .PHONY: all pot msgmerge msgfmt
13 all: msgfmt
15 pot:
16 xgettext -o daemon.pot -L Shell \
17 --package-name=daemon \
18 --package-version="$(VERSION)" \
19 -kaction -k_ -k_n \
20 $(POTFILES)
22 msgmerge:
23 @for l in $(LINGUAS); do \
24 if [ -f "$$l.po" ]; then \
25 echo -n "Updating $$l po file."; \
26 msgmerge -U $$l.po daemon.pot ; \
27 fi; \
28 done
30 msgfmt:
31 @for l in $(LINGUAS); do \
32 if [ -f "$$l.po" ]; then \
33 echo -n "Compiling daemon $$l mo file... "; \
34 msgfmt -o $$l.mo $$l.po ; \
35 echo "done"; \
36 fi; \
37 done;
39 install: msgfmt
40 @for l in $(LINGUAS); do \
41 install -m 0755 -d $(DESTDIR)$(localedir)/$$l/LC_MESSAGES; \
42 install -m 0644 $$l.mo \
43 $(DESTDIR)$(localedir)/$$l/LC_MESSAGES/daemon.mo; \
44 rm $$l.mo; \
45 done;
47 clean:
48 rm -f *~
49 rm -f *.mo
51 help:
52 @echo "make [ pot | msgmerge | msgfmt | all | install | clean ]"