wok-next annotate busybox/stuff/po/Makefile @ rev 19159

/etc/init.d/*: use 'action' in pair with 'status'.
'action' returns translated message, so why not to add full translatable /etc/init.d/* content
author Aleksej Bobylev <al.bobylev@gmail.com>
date Thu May 26 20:16:45 2016 +0300 (2016-05-26)
parents
children dd1205f552b8
rev   line source
al@19159 1 # Makefile for daemon.
al@19159 2 #
al@19159 3 prefix ?= /usr
al@19159 4 datarootdir ?= $(prefix)/share
al@19159 5 localedir ?= $(datarootdir)/locale
al@19159 6 DESTDIR ?=
al@19159 7 LINGUAS ?= $(shell cat LINGUAS)
al@19159 8 POTFILES ?= $(shell cat POTFILES)
al@19159 9 VERSION ?= 1.0
al@19159 10
al@19159 11 .PHONY: all pot msgmerge msgfmt
al@19159 12
al@19159 13 all: msgfmt
al@19159 14
al@19159 15 pot:
al@19159 16 xgettext -o daemon.pot -L Shell \
al@19159 17 --package-name=daemon \
al@19159 18 --package-version="$(VERSION)" \
al@19159 19 -kaction -k_ -k_n \
al@19159 20 $(POTFILES)
al@19159 21
al@19159 22 msgmerge:
al@19159 23 @for l in $(LINGUAS); do \
al@19159 24 if [ -f "$$l.po" ]; then \
al@19159 25 echo -n "Updating $$l po file."; \
al@19159 26 msgmerge -U $$l.po daemon.pot ; \
al@19159 27 fi; \
al@19159 28 done
al@19159 29
al@19159 30 msgfmt:
al@19159 31 @for l in $(LINGUAS); do \
al@19159 32 if [ -f "$$l.po" ]; then \
al@19159 33 echo -n "Compiling daemon $$l mo file... "; \
al@19159 34 msgfmt -o $$l.mo $$l.po ; \
al@19159 35 echo "done"; \
al@19159 36 fi; \
al@19159 37 done;
al@19159 38
al@19159 39 install: msgfmt
al@19159 40 @for l in $(LINGUAS); do \
al@19159 41 install -m 0755 -d $(DESTDIR)$(localedir)/$$l/LC_MESSAGES; \
al@19159 42 install -m 0644 $$l.mo \
al@19159 43 $(DESTDIR)$(localedir)/$$l/LC_MESSAGES/daemon.mo; \
al@19159 44 done;
al@19159 45
al@19159 46 clean:
al@19159 47 rm -f *~
al@19159 48 rm -f *.mo
al@19159 49
al@19159 50 help:
al@19159 51 @echo "make [ pot | msgmerge | msgfmt | all | install | clean ]"