slitaz-configs view Makefile @ rev 312

Make Openbox menu translated again.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Wed Sep 27 15:17:39 2017 +0300 (21 months ago)
parents fd0d3485c8a7
children c19d31dbfb6d
line source
1 # Makefile for SliTaz Openbox menu.
3 PREFIX?=/usr
4 DESTDIR?=
5 DOMAIN=slitaz-ob-menu
6 MENU?=ob-menu/menu.xml.in
7 LINGUAS?=de fr hu ja pt ru zh_CN
9 BINDIR=$(DESTDIR)$(PREFIX)/bin
10 STSDATA=$(DESTDIR)$(PREFIX)/share/slitaz/sts
12 all: help
14 help:
15 @echo "make [ pot | msgmerge | menu | clean ]"
17 pot:
18 xgettext -o po/$(DOMAIN).pot --force-po --copyright-holder=SliTaz \
19 --package-name=$(DOMAIN) --package-version=5.1.6 -L Shell $(MENU)
20 sed 's|CHARSET|UTF-8|' -i po/$(DOMAIN).pot
22 msgmerge:
23 @for l in $(LINGUAS); do \
24 echo -n "Updating $$l po file."; \
25 msgmerge -U po/$$l.po po/$(DOMAIN).pot; \
26 done;
28 menu:
29 @for l in $(LINGUAS); do \
30 echo "Formatting $$l messages..."; \
31 mkdir -p /usr/share/locale/$$l/LC_MESSAGES; \
32 msgfmt -o /usr/share/locale/$$l/LC_MESSAGES/$(DOMAIN).mo po/$$l.po; \
33 done; \
34 mkdir -p $(DESTDIR)/etc/xdg/openbox; \
35 for l in en $(LINGUAS); do \
36 echo "Processing $$l menu..."; \
37 ./ob-menu/menu.xml.in $$l > \
38 $(DESTDIR)/etc/xdg/openbox/menu.$$l.xml; \
39 done;
41 clean:
42 rm -rf po/mo
43 rm -f po/*~
44 rm -f po/*.mo