| 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 ^msgstr $(srcdir)/po_codes|sort|uniq -c|grep -v '^ *1 '; then\ |
|---|
| 8 | echo 'Duplicate message code(s) in po_codes'; 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 |
|---|
| 18 | |
|---|
| 19 | po_files = ca.po de.po de_CH.po de_DE.po en_US.po\ |
|---|
| 20 | es.po fr.po id.po it.po pt.po pt_BR.po sk.po ro.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) po_codes\ |
|---|
| 28 | po-to-msg.pl checkshortcut.pl extract-msgs.pl\ |
|---|
| 29 | English_GB.isl Indonesian-5.1.11.isl Romanian-7-5.1.11.isl\ |
|---|
| 30 | make-pixel-font\ |
|---|
| 31 | INSTALL.OSX |
|---|
| 32 | |
|---|
| 33 | MAINTAINERCLEANFILES = $(msg_files) de_DE.po *.todo unifont.pixelfont |
|---|
| 34 | |
|---|
| 35 | dist_pkgdata_DATA = print.ini bcra3.svx bcra5.svx $(msg_files) unifont.pixelfont |
|---|
| 36 | |
|---|
| 37 | appsdir = $(datadir)/applications |
|---|
| 38 | dist_apps_DATA = survex-aven.desktop survex-svxedit.desktop |
|---|
| 39 | |
|---|
| 40 | $(msg_files): survex.pot $(po_files) po-to-msg.pl |
|---|
| 41 | LANG=C perl $(srcdir)/po-to-msg.pl $(po_files) |
|---|
| 42 | |
|---|
| 43 | survex.pot: po_codes |
|---|
| 44 | perl -pe 's/^(#~ )?(msgstr ").*/$$1$$2"/' po_codes > survex.pot~ |
|---|
| 45 | mv survex.pot~ survex.pot |
|---|
| 46 | |
|---|
| 47 | mimedir = $(datadir)/mime-info |
|---|
| 48 | dist_mime_DATA = survex.mime |
|---|
| 49 | mime_DATA = survex.keys |
|---|
| 50 | |
|---|
| 51 | unifont.pixelfont: $(srcdir)/make-pixel-font |
|---|
| 52 | $(srcdir)/make-pixel-font |
|---|
| 53 | |
|---|
| 54 | launchpad-tarball: check-local |
|---|
| 55 | tar --transform 's!^!survex-trans/!' -zcf survex-trans.tar.gz survex.pot \ |
|---|
| 56 | `for f in $(po_files); do test -h "$$f" || echo "$$f" ; done` |
|---|
| 57 | echo "$(PWD)/survex-trans.tar.gz" |
|---|
| 58 | |
|---|
| 59 | .PHONY: launchpad-tarball |
|---|