~mterry/geonames/translations

« back to all changes in this revision

Viewing changes to src/Makefile.am

  • Committer: Michael Terry
  • Date: 2016-04-04 18:21:31 UTC
  • Revision ID: michael.terry@canonical.com-20160404182131-iyfwcmuhl9gfr8oc
Fix up translation support to generate and ship po files

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
libgeonames_la_HEADERS = geonames.h
16
16
 
17
17
nodist_libgeonames_la_SOURCES = geonames-resources.c
18
 
libgeonames_la_CFLAGS = -fvisibility=hidden -Wall $(GIO_CFLAGS)
 
18
libgeonames_la_CFLAGS = -fvisibility=hidden -Wall -DPACKAGE=\"$(PACKAGE)\" $(GIO_CFLAGS)
19
19
libgeonames_la_LIBADD = $(GIO_LIBS)
20
20
 
21
21
geonames-resources.c: geonames.gresources.xml $(builddir)/cities.compiled
27
27
pkgconfig_DATA = geonames.pc
28
28
pkgconfigdir = $(libdir)/pkgconfig
29
29
 
 
30
install-data-local: cities.compiled
 
31
        for po in $(builddir)/po/*.po; do \
 
32
                export target="$(DESTDIR)$(datadir)/locale/$$(basename $${po} .po)/LC_MESSAGES"; \
 
33
                mkdir -p "$${target}"; \
 
34
                msgfmt "$${po}" -o "$${target}/$(PACKAGE).mo"; \
 
35
        done
 
36
 
30
37
EXTRA_DIST = geonames.gresources.xml geonames.pc.in
31
38
 
32
39
CLEANFILES = geonames-resources.c cities.compiled geonames.pc
 
40
 
 
41
clean-local:
 
42
        -rm -rf po