slitaz-base-files annotate Makefile @ rev 142
Make pot and msgmerge
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Mon Apr 30 09:18:30 2012 +0200 (2012-04-30) |
parents | 524eab3120ae |
children | 8ca19a8867e6 |
rev | line source |
---|---|
pankso@125 | 1 # Makefile for SliTaz Bugs. |
pankso@125 | 2 # |
pankso@125 | 3 |
pankso@125 | 4 PACKAGE="slitaz-base" |
pankso@125 | 5 PREFIX?=/usr |
pankso@125 | 6 LINGUAS?=fr |
pankso@125 | 7 |
pankso@125 | 8 all: help |
pankso@125 | 9 |
pankso@125 | 10 help: |
pankso@125 | 11 @echo "make [pot|msgmerge|msgfmt|install-libtaz|install-msg|install|clean]" |
pankso@125 | 12 |
pankso@125 | 13 # i18n |
pankso@125 | 14 |
pankso@125 | 15 pot: |
pankso@125 | 16 xgettext -o po/$(PACKAGE).pot -L Shell --package-name="SliTaz Base" \ |
pankso@125 | 17 ./rootfs/lib/libtaz.sh |
pankso@125 | 18 |
pankso@125 | 19 msgmerge: |
pankso@125 | 20 @for l in $(LINGUAS); do \ |
pankso@125 | 21 echo -n "Updating $$l po file."; \ |
pankso@125 | 22 msgmerge -U po/$$l.po po/$(PACKAGE).pot; \ |
pankso@125 | 23 done; |
pankso@125 | 24 |
pankso@125 | 25 msgfmt: |
pankso@125 | 26 @for l in $(LINGUAS); do \ |
pankso@125 | 27 echo "Compiling $$l mo file..."; \ |
pankso@125 | 28 mkdir -p po/mo/$$l/LC_MESSAGES; \ |
pankso@125 | 29 msgfmt -o po/mo/$$l/LC_MESSAGES/$(PACKAGE).mo po/$$l.po; \ |
pankso@125 | 30 done; |
pankso@125 | 31 |
pankso@125 | 32 # Install |
pankso@125 | 33 |
pankso@125 | 34 install-libtaz: |
pankso@125 | 35 install -m 0744 rootfs/lib/libtaz.sh $(DESTDIR)/lib |
pankso@139 | 36 install -m 0755 -d $(DESTDIR)/usr/share/doc/slitaz |
pankso@139 | 37 install -m 0644 doc/libtaz.txt $(DESTDIR)/usr/share/doc/slitaz |
pankso@139 | 38 |
pankso@139 | 39 install-httphelper: |
pankso@139 | 40 install -m 0744 rootfs/usr/lib/slitaz/httphelper.sh \ |
pankso@139 | 41 $(DESTDIR)/usr/lib/slitaz |
pankso@139 | 42 install -m 0755 -d $(DESTDIR)/usr/share/doc/slitaz |
pankso@139 | 43 install -m 0644 doc/httphelper.txt $(DESTDIR)/usr/share/doc/slitaz |
pankso@142 | 44 |
pankso@125 | 45 install-msg: msgfmt |
pankso@125 | 46 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/locale |
pankso@125 | 47 cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale |
pankso@142 | 48 |
pankso@125 | 49 install: install-msg |
pankso@125 | 50 cp -a rootfs/* $(DESTDIR) |
pankso@139 | 51 install -m 0755 -d $(DESTDIR)/usr/share/doc/slitaz |
pankso@139 | 52 cp -a doc/* $(DESTDIR)/usr/share/doc/slitaz |
pankso@125 | 53 chown -R root.root $(DESTDIR) |
pankso@125 | 54 |
pankso@125 | 55 # Clean source |
pankso@125 | 56 |
pankso@125 | 57 clean: |
pankso@125 | 58 rm -rf po/mo |
pankso@142 | 59 rm -f po/*~ |
pankso@142 | 60 |