| 1 | ## Process this file with automake to produce Makefile.in |
|---|
| 2 | |
|---|
| 3 | # Makefile for survex support files |
|---|
| 4 | |
|---|
| 5 | check-local: survex.pot |
|---|
| 6 | srcdir=$(srcdir) LANG=C perl $(srcdir)/checkshortcut.pl $(msg_files) |
|---|
| 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;\ |
|---|
| 9 | fi |
|---|
| 10 | for po in $(po_files) ; do\ |
|---|
| 11 | msgfmt -c --check-accelerators -o /dev/null "$(srcdir)/$$po" || exit 1;\ |
|---|
| 12 | done |
|---|
| 13 | if cd "$(srcdir)" && grep 'msgstr "[0-9][0-9]*"' $(po_files); then\ |
|---|
| 14 | echo '.po file with numeric code'; exit 1;\ |
|---|
| 15 | fi |
|---|
| 16 | |
|---|
| 17 | SUBDIRS = icons images |
|---|
| 18 | |
|---|
| 19 | po_files = bg.po ca.po de.po de_CH.po de_DE.po el.po en_US.po es.po fr.po\ |
|---|
| 20 | hu.po id.po it.po pl.po pt.po pt_BR.po ro.po ru.po sk.po zh_CN.po |
|---|
| 21 | |
|---|
| 22 | de_DE.po: |
|---|
| 23 | ln -s de.po de_DE.po |
|---|
| 24 | |
|---|
| 25 | msg_files = $(po_files:.po=.msg) en.msg |
|---|
| 26 | |
|---|
| 27 | EXTRA_DIST = survex.pot $(po_files)\ |
|---|
| 28 | po-to-msg.pl checkshortcut.pl extract-msgs.pl\ |
|---|
| 29 | Bulgarian.isl\ |
|---|
| 30 | ChineseSimplified.isl ChineseTraditional.isl\ |
|---|
| 31 | EnglishGB.isl Indonesian.isl Romanian.isl Slovak.isl\ |
|---|
| 32 | make-pixel-font preload_font.h\ |
|---|
| 33 | INSTALL.OSX |
|---|
| 34 | |
|---|
| 35 | MAINTAINERCLEANFILES = $(msg_files) de_DE.po unifont.pixelfont preload_font.h |
|---|
| 36 | |
|---|
| 37 | dist_pkgdata_DATA = print.ini bcra3.svx bcra5.svx $(msg_files) unifont.pixelfont |
|---|
| 38 | |
|---|
| 39 | appsdir = $(datadir)/applications |
|---|
| 40 | dist_apps_DATA = survex-aven.desktop survex-svxedit.desktop |
|---|
| 41 | |
|---|
| 42 | $(msg_files): survex.pot $(po_files) po-to-msg.pl |
|---|
| 43 | LANG=C perl $(srcdir)/po-to-msg.pl $(po_files) |
|---|
| 44 | |
|---|
| 45 | mimedir = $(datadir)/mime-info |
|---|
| 46 | dist_mime_DATA = survex.mime |
|---|
| 47 | mime_DATA = survex.keys |
|---|
| 48 | |
|---|
| 49 | unifont.pixelfont preload_font.h: $(srcdir)/make-pixel-font |
|---|
| 50 | $(srcdir)/make-pixel-font |
|---|
| 51 | |
|---|
| 52 | merge-pos: |
|---|
| 53 | cd '$(srcdir)' && ./merge-po $(po_files) |
|---|
| 54 | |
|---|
| 55 | generate-todo: |
|---|
| 56 | cd '$(srcdir)' && ./generate-po-todo $(po_files) |
|---|
| 57 | |
|---|
| 58 | launchpad-diff: |
|---|
| 59 | rm -rf lib |
|---|
| 60 | tar xf launchpad-export.tar.gz |
|---|
| 61 | for po in $(po_files) ; do \ |
|---|
| 62 | lpo="lib/survex-$$po" ;\ |
|---|
| 63 | [ -r "$$lpo" ] || continue ;\ |
|---|
| 64 | perl -i ./unlaunchpad-po "$$lpo" ;\ |
|---|
| 65 | ./launchpad-merge-po "$$po" > "lib/$$po" ;\ |
|---|
| 66 | if ! diff -q "$$po" "lib/$$po" ; then \ |
|---|
| 67 | echo "Edit changes for $$po ? (Y/n/q)" ;\ |
|---|
| 68 | read ;\ |
|---|
| 69 | case $$REPLY in \ |
|---|
| 70 | q*) exit 0 ;;\ |
|---|
| 71 | n*) ;;\ |
|---|
| 72 | *) vimdiff "$$po" "lib/$$po" ;;\ |
|---|
| 73 | esac ;\ |
|---|
| 74 | fi ;\ |
|---|
| 75 | done |
|---|
| 76 | |
|---|
| 77 | .PHONY: merge-pos |
|---|