source: git/lib/Makefile.am @ a4adf09

RELEASE/1.2debug-cidebug-ci-sanitisersstereowalls-data
Last change on this file since a4adf09 was bb51ecd, checked in by Olly Betts <olly@…>, 11 years ago

lib/launchpad-merge-po: New script to eliminate unwanted differences
introduced by launchpad.
lib/Makefile.am: Make launchpad-diff target use launchpad-merge-po
and skip files missing in the launchpad export.

  • Property mode set to 100644
File size: 1.9 KB
Line 
1## Process this file with automake to produce Makefile.in
2
3# Makefile for survex support files
4
5check-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
17SUBDIRS = icons
18
19po_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 zh_CN.po
21
22de_DE.po:
23        ln -s de.po de_DE.po
24
25msg_files = $(po_files:.po=.msg) en.msg
26
27EXTRA_DIST = survex.pot $(po_files)\
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
33MAINTAINERCLEANFILES = $(msg_files) de_DE.po unifont.pixelfont
34
35dist_pkgdata_DATA = print.ini bcra3.svx bcra5.svx $(msg_files) unifont.pixelfont
36
37appsdir = $(datadir)/applications
38dist_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
43mimedir = $(datadir)/mime-info
44dist_mime_DATA = survex.mime
45mime_DATA = survex.keys
46
47unifont.pixelfont: $(srcdir)/make-pixel-font
48        $(srcdir)/make-pixel-font
49
50merge-pos:
51        cd '$(srcdir)' && ./merge-po $(po_files)
52
53launchpad-diff:
54        rm -rf lib
55        tar xf launchpad-export.tar.gz
56        for po in $(po_files) ; do \
57            lpo="lib/survex-$$po" ;\
58            [ -r "$$lpo" ] || continue ;\
59            perl -i ./unlaunchpad-po "$$lpo" ;\
60            ./launchpad-merge-po "$$po" > "lib/$$po" ;\
61            if ! diff -q "$$po" "lib/$$po" ; then \
62                echo "Edit changes for $$po ? (Y/n/q)" ;\
63                read ;\
64                case $$REPLY in \
65                q*) exit 0 ;;\
66                n*) ;;\
67                *) vimdiff "$$po" "lib/$$po" ;;\
68                esac ;\
69            fi ;\
70        done
71
72.PHONY: merge-pos
Note: See TracBrowser for help on using the repository browser.