1 ## Process this file with automake to produce Makefile.in
3 # Makefile for survex support files
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;\
10 for po in $(po_files) ; do\
11 msgfmt -c --check-accelerators -o /dev/null "$(srcdir)/$$po" || exit 1;\
13 if cd "$(srcdir)" && grep 'msgstr "[0-9][0-9]*"' $(po_files); then\
14 echo '.po file with numeric code'; exit 1;\
17 SUBDIRS = icons images
19 po_files = bg.po ca.po de.po de_CH.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
22 msg_files = $(po_files:.po=.msg) en.msg
24 EXTRA_DIST = survex.pot $(po_files)\
25 po-to-msg.pl checkshortcut.pl extract-msgs.pl\
26 ChineseSimplified.isl\
27 ChineseTraditional.isl\
33 make-pixel-font preload_font.h
35 MAINTAINERCLEANFILES = $(msg_files) unifont.pixelfont preload_font.h
37 dist_pkgdata_DATA = bcra3.svx bcra5.svx $(msg_files) unifont.pixelfont
39 appsdir = $(datadir)/applications
40 dist_apps_DATA = survex-aven.desktop
42 gtksourceview3dir = $(datadir)/gtksourceview-3.0/language-specs
43 dist_gtksourceview3_DATA = survex.lang
45 gtksourceview4dir = $(datadir)/gtksourceview-4/language-specs
46 dist_gtksourceview4_DATA = survex.lang
48 $(msg_files): survex.pot $(po_files) po-to-msg.pl
49 LANG=C perl $(srcdir)/po-to-msg.pl $(po_files)
51 packagesdir = $(datadir)/mime/packages
52 dist_packages_DATA = survex.xml
54 unifont.pixelfont preload_font.h: $(srcdir)/make-pixel-font
55 $(srcdir)/make-pixel-font
58 cd '$(srcdir)' && ./merge-po $(po_files)
61 cd '$(srcdir)' && ./generate-po-todo $(po_files)
66 cd lib && tar --strip-components=1 -xf ../launchpad-export.tar.gz
67 for po in $(po_files) ; do \
68 lpo="lib/survex-$$po" ;\
69 [ -r "$$lpo" ] || continue ;\
70 perl ./unlaunchpad-po "$$lpo" | ./launchpad-merge-po "$$po" - > "lib/$$po" ;\
71 if ! diff -q "$$po" "lib/$$po" ; then \
72 echo "Edit changes for $$po ? (Y/n/q)" ;\
77 *) vimdiff "$$po" "lib/$$po" ;;\