wok-6.x view busybox/stuff/po/Makefile @ rev 19621
dhcp: vlan support
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Jan 10 16:46:56 2017 +0100 (2017-01-10) |
parents | |
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 done;
46 clean:
47 rm -f *~
48 rm -f *.mo
50 help:
51 @echo "make [ pot | msgmerge | msgfmt | all | install | clean ]"