blob: 2fc1f886b8396e502cbfc99c2989e0be4f864d19 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
|
CATALOGS = @MOFILES@
CLEANFILES = $(CATALOGS) navit.pot
# keep this sorted
EXTRA_DIST = @POIFILES@
POTFILES = \
$(top_srcdir)/navit/main.c \
$(top_srcdir)/navit/navigation.c \
$(top_srcdir)/navit/navit.c \
$(top_srcdir)/navit/popup.c \
$(top_srcdir)/navit/country.c \
$(top_srcdir)/navit/gui/gtk/destination.c \
$(top_srcdir)/navit/gui/gtk/gui_gtk_action.c \
$(top_srcdir)/navit/gui/gtk/gui_gtk_statusbar.c \
$(top_srcdir)/navit/gui/internal/gui_internal.c \
$(top_srcdir)/navit/gui/internal/gui_internal_bookmark.c \
$(top_srcdir)/navit/gui/internal/gui_internal_command.c \
$(top_srcdir)/navit/gui/internal/gui_internal_html.c \
$(top_srcdir)/navit/gui/internal/gui_internal_menu.c \
$(top_srcdir)/navit/gui/internal/gui_internal_poi.c \
$(top_srcdir)/navit/gui/internal/gui_internal_search.c \
$(top_srcdir)/navit/gui/internal/gui_internal_widget.c \
$(top_srcdir)/navit/osd/core/osd_core.c \
$(top_srcdir)/navit/android/src/org/navitproject/navit/NavitAddressSearchActivity.java \
$(top_srcdir)/navit/android/src/org/navitproject/navit/NavitAndroidOverlay.java \
$(top_srcdir)/navit/android/src/org/navitproject/navit/NavitDialogs.java \
$(top_srcdir)/navit/android/src/org/navitproject/navit/NavitDownloadSelectMapActivity.java \
$(top_srcdir)/navit/android/src/org/navitproject/navit/NavitGraphics.java \
$(top_srcdir)/navit/android/src/org/navitproject/navit/Navit.java \
$(top_srcdir)/navit/android/src/org/navitproject/navit/NavitMapDownloader.java \
$(top_builddir)/navit/navit_shipped.c \
$(top_builddir)/navit/strings.c
if XGETTEXT_GLADE
POTFILES += $(top_builddir)/navit/navit_shipped.glade
endif
SUFFIXES = .po .mo
.po.mo:
dir=`basename $@ .mo` ;\
$(MSGFMT) --check --verbose --statistics --output-file=$@ $< && \
mkdir -p ../locale/$$dir/LC_MESSAGES && \
cp $@ ../locale/$$dir/LC_MESSAGES/navit.mo
all: @MOFILES@
# Trick gettext to get translateable strings out of navit_shipped.xml
$(top_builddir)/navit/navit_shipped.glade: $(top_srcdir)/navit/navit_shipped.xml
sed -e "s/vehicleprofile/atkaction/" -e "s/name=/description=/" -e 's/<!\[CDATA\[//' -e 's/\]\]//' <$(top_srcdir)/navit/navit_shipped.xml >$(top_builddir)/navit/navit_shipped.glade
$(top_builddir)/navit/navit_shipped.c: $(top_srcdir)/navit/navit_shipped.xml
sed -e 's/|//g' -e 's/^/|/' -e 's/$$/|/' -e 's/\(_("[^"]*")\)/| \1; |/g' -e 's/|[^|]*|//g' <$(top_srcdir)/navit/navit_shipped.xml >$(top_builddir)/navit/navit_shipped.c
# Trick gettext to get translateable strings out of android/strings.xml
$(top_builddir)/navit/strings.c: $(abs_top_srcdir)/navit/android/res/values/strings.xml
sed -e "s/\\\\'/'/g" -e 's%.*<string[^>]*name="\(.*\)">\(.*\)</string>%// Android resource: @strings/\1\n_("\2")%g' -e '\%^//%!d'<$(abs_top_srcdir)/navit/android/res/values/strings.xml >$(top_builddir)/navit/strings.c
@POFILES@: navit.pot
sed 's/^"Project-Id-Version:.*/"Project-Id-Version: $(PACKAGE_STRING)\\n"/' < $(top_srcdir)/po/$@.in | $(MSGMERGE) --no-fuzzy-matching --verbose -o $(top_builddir)/po/$@ - navit.pot
navit.pot: $(POTFILES)
$(XGETTEXT) --no-location --default-domain=navit \
--add-comments --keyword=_ --keyword=_n --keyword=navit_nls_gettext --keyword=navit_nls_ngettext:1,2 $(POTFILES)
if cmp -s navit.po navit.pot; then \
rm -f navit.po; \
else \
mv -f navit.po navit.pot; \
fi
install-data-local: $(CATALOGS)
$(mkinstalldirs) $(DESTDIR)$(datadir)/locale
chmod 755 $(DESTDIR)$(datadir)/locale
for n in $(CATALOGS) __DuMmY ; do \
if test "$$n" -a "$$n" != "__DuMmY" ; then \
l=`basename $$n .mo`; \
$(mkinstalldirs) $(DESTDIR)$(datadir)/locale/$$l/LC_MESSAGES; \
chmod 755 $(DESTDIR)$(datadir)/locale/$$l; \
chmod 755 $(DESTDIR)$(datadir)/locale/$$l/LC_MESSAGES; \
$(INSTALL_DATA) -m 644 $$n $(DESTDIR)$(datadir)/locale/$$l/LC_MESSAGES/navit.mo; \
fi; \
done
uninstall-local:
for n in $(CATALOGS) __DuMmY ; do \
if test "$$n" -a "$$n" != "__DuMmY" ; then \
l=`basename $$n .mo`; \
rm -f $(DESTDIR)$(datadir)/locale/$$l/LC_MESSAGES/navit.mo; \
fi; \
done
distclean-local:
rm -f $(top_builddir)/navit/navit_shipped.glade $(top_builddir)/navit/navit_shipped.c $(top_builddir)/navit/strings.c
for n in $(CATALOGS) __DuMmY ; do \
if test "$$n" -a "$$n" != "__DuMmY" ; then \
l=`basename $$n .mo`; \
rm -f ../locale/$$l/LC_MESSAGES/navit.mo; \
rm -f $$l.po; \
fi; \
done
|