wok-next diff 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
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/busybox/stuff/po/Makefile	Thu May 26 20:16:45 2016 +0300
     1.3 @@ -0,0 +1,51 @@
     1.4 +# Makefile for daemon.
     1.5 +#
     1.6 +prefix      ?= /usr
     1.7 +datarootdir ?= $(prefix)/share
     1.8 +localedir   ?= $(datarootdir)/locale
     1.9 +DESTDIR     ?=
    1.10 +LINGUAS     ?= $(shell cat LINGUAS)
    1.11 +POTFILES    ?= $(shell cat POTFILES)
    1.12 +VERSION     ?= 1.0
    1.13 +
    1.14 +.PHONY: all pot msgmerge msgfmt
    1.15 +
    1.16 +all: msgfmt
    1.17 +
    1.18 +pot:
    1.19 +	xgettext -o daemon.pot -L Shell \
    1.20 +		--package-name=daemon \
    1.21 +		--package-version="$(VERSION)" \
    1.22 +		-kaction -k_ -k_n \
    1.23 +		$(POTFILES)
    1.24 +
    1.25 +msgmerge:
    1.26 +	@for l in $(LINGUAS); do \
    1.27 +		if [ -f "$$l.po" ]; then \
    1.28 +			echo -n "Updating $$l po file."; \
    1.29 +			msgmerge -U $$l.po daemon.pot ; \
    1.30 +		fi; \
    1.31 +	done
    1.32 +
    1.33 +msgfmt:
    1.34 +	@for l in $(LINGUAS); do \
    1.35 +		if [ -f "$$l.po" ]; then \
    1.36 +			echo -n "Compiling daemon $$l mo file... "; \
    1.37 +			msgfmt -o $$l.mo $$l.po ; \
    1.38 +			echo "done"; \
    1.39 +		fi; \
    1.40 +	done;
    1.41 +
    1.42 +install: msgfmt
    1.43 +	@for l in $(LINGUAS); do \
    1.44 +		install -m 0755 -d $(DESTDIR)$(localedir)/$$l/LC_MESSAGES; \
    1.45 +		install -m 0644 $$l.mo \
    1.46 +			$(DESTDIR)$(localedir)/$$l/LC_MESSAGES/daemon.mo; \
    1.47 +	done;
    1.48 +
    1.49 +clean:
    1.50 +	rm -f *~
    1.51 +	rm -f *.mo
    1.52 +
    1.53 +help:
    1.54 +	@echo "make [ pot | msgmerge | msgfmt | all | install | clean ]"