[adaa778] | 1 | ## Process this file with automake to produce Makefile.in |
---|
| 2 | |
---|
| 3 | # Makefile for survex support files |
---|
| 4 | |
---|
[4183e91] | 5 | check-local: survex.pot |
---|
[be891ea] | 6 | srcdir=$(srcdir) LANG=C perl $(srcdir)/checkshortcut.pl $(msg_files) |
---|
[0dc5829] | 7 | if grep '^#: n:' $(srcdir)/survex.pot|sort|uniq -c|grep -v '^ *1 '; then\ |
---|
| 8 | echo 'Duplicate message code(s) in survex.pot'; exit 1;\ |
---|
[1b1aaf4] | 9 | fi |
---|
[49e89e9] | 10 | for po in $(po_files) ; do\ |
---|
| 11 | msgfmt -c --check-accelerators -o /dev/null "$(srcdir)/$$po" || exit 1;\ |
---|
| 12 | done |
---|
[d9b5fc64] | 13 | if cd "$(srcdir)" && grep 'msgstr "[0-9][0-9]*"' $(po_files); then\ |
---|
[eeb7320] | 14 | echo '.po file with numeric code'; exit 1;\ |
---|
| 15 | fi |
---|
[6deca30] | 16 | |
---|
[b82777e9] | 17 | SUBDIRS = icons |
---|
| 18 | |
---|
[d86459c] | 19 | po_files = ca.po de.po de_CH.po de_DE.po en_US.po\ |
---|
[3d2add3] | 20 | es.po fr.po id.po it.po pt.po pt_BR.po sk.po ro.po zh_CN.po |
---|
[d86459c] | 21 | |
---|
[351b91f] | 22 | de_DE.po: |
---|
| 23 | ln -s de.po de_DE.po |
---|
| 24 | |
---|
[c584ed2] | 25 | msg_files = $(po_files:.po=.msg) en.msg |
---|
[8ac4406] | 26 | |
---|
[0dc5829] | 27 | EXTRA_DIST = survex.pot $(po_files)\ |
---|
[b82f52d] | 28 | po-to-msg.pl checkshortcut.pl extract-msgs.pl\ |
---|
[5bff838] | 29 | English_GB.isl Indonesian-5.1.11.isl Romanian-7-5.1.11.isl\ |
---|
[1aa3fb7] | 30 | make-pixel-font\ |
---|
[64d37a3] | 31 | INSTALL.OSX |
---|
[adaa778] | 32 | |
---|
[b0a90c1] | 33 | MAINTAINERCLEANFILES = $(msg_files) de_DE.po unifont.pixelfont |
---|
[6cfa0b5] | 34 | |
---|
[1aa3fb7] | 35 | dist_pkgdata_DATA = print.ini bcra3.svx bcra5.svx $(msg_files) unifont.pixelfont |
---|
[e72b854] | 36 | |
---|
| 37 | appsdir = $(datadir)/applications |
---|
| 38 | dist_apps_DATA = survex-aven.desktop survex-svxedit.desktop |
---|
[adaa778] | 39 | |
---|
[c584ed2] | 40 | $(msg_files): survex.pot $(po_files) po-to-msg.pl |
---|
| 41 | LANG=C perl $(srcdir)/po-to-msg.pl $(po_files) |
---|
[d86459c] | 42 | |
---|
[27b8b59] | 43 | mimedir = $(datadir)/mime-info |
---|
[e72b854] | 44 | dist_mime_DATA = survex.mime |
---|
| 45 | mime_DATA = survex.keys |
---|
[bd551c0] | 46 | |
---|
[1aa3fb7] | 47 | unifont.pixelfont: $(srcdir)/make-pixel-font |
---|
| 48 | $(srcdir)/make-pixel-font |
---|
[df126137] | 49 | |
---|
| 50 | merge-pos: |
---|
| 51 | cd '$(srcdir)' && ./merge-po $(po_files) |
---|
| 52 | |
---|
[6176b37] | 53 | launchpad-diff: |
---|
| 54 | rm -rf lib |
---|
| 55 | tar xf launchpad-export.tar.gz |
---|
| 56 | for po in $(po_files) ; do \ |
---|
| 57 | lpo="lib/survex-$$po" ;\ |
---|
[bb51ecd] | 58 | [ -r "$$lpo" ] || continue ;\ |
---|
[6176b37] | 59 | perl -i ./unlaunchpad-po "$$lpo" ;\ |
---|
[bb51ecd] | 60 | ./launchpad-merge-po "$$po" > "lib/$$po" ;\ |
---|
| 61 | if ! diff -q "$$po" "lib/$$po" ; then \ |
---|
[6176b37] | 62 | echo "Edit changes for $$po ? (Y/n/q)" ;\ |
---|
| 63 | read ;\ |
---|
| 64 | case $$REPLY in \ |
---|
| 65 | q*) exit 0 ;;\ |
---|
| 66 | n*) ;;\ |
---|
[bb51ecd] | 67 | *) vimdiff "$$po" "lib/$$po" ;;\ |
---|
[6176b37] | 68 | esac ;\ |
---|
| 69 | fi ;\ |
---|
| 70 | done |
---|
| 71 | |
---|
[df126137] | 72 | .PHONY: merge-pos |
---|