~ubuntu-branches/ubuntu/trusty/libgweather/trusty-updates

« back to all changes in this revision

Viewing changes to data/Makefile.am

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2013-05-27 11:58:15 UTC
  • mfrom: (13.1.4 experimental)
  • Revision ID: package-import@ubuntu.com-20130527115815-l51yffuy20gbv9q0
Tags: 3.8.0-1ubuntu1
* Sync with Debian (LP: #1184168). Remaining changes: 
  - debian/control.in, debian/rules:
    + Run autoreconf
  - debian/rules:
    + Generate POT files on build
  - debian/patches/01_gettext_not_xml.patch: 
    + using gettext rather than add translations to the xml databases
  - debian/patches/02_no_external_gettext.patch:
    + Can't have both IT_PROG_INTLTOOL and AM_GNU_GETTEXT

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
libgweatherlocationsdir = $(pkgdatadir)
5
5
libgweatherlocations_in_files = Locations.xml.in
6
6
 
7
 
if USE_ONE_BIG_XML
8
 
 
9
 
LOCATIONS_STAMP = 
10
 
 
11
 
libgweatherlocations_DATA = $(libgweatherlocations_in_files:.xml.in=.xml$(COMPRESS_EXT))
12
 
 
13
 
%.xml$(COMPRESS_EXT): %.xml.in $(wildcard $(top_srcdir)/po-locations/*.po)
14
 
        $(AM_V_GEN)LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po-locations/.intltool-merge-cache $(top_srcdir)/po-locations $< `echo $@ | sed "s/.xml$(COMPRESS_EXT)/.xml/"` && \
15
 
        if test "x$(COMPRESS_EXT)" = "x.gz"; then                               \
16
 
                gzip --force `echo $@ | sed "s/.xml$(COMPRESS_EXT)/.xml/"`;     \
17
 
        fi
18
 
 
19
 
else # USE_ONE_BIG_XML
20
 
 
21
7
LOCATIONS_STAMP = stamp-Locations.xml
22
8
 
23
 
PO_LOCATIONS = $(shell if test -n "$(LINGUAS)"; then for lang in $(LINGUAS); do if test -f "$(top_srcdir)/po-locations/$$lang.po"; then echo "$(top_srcdir)/po-locations/$$lang.po "; fi; done; else for pofile in $(top_srcdir)/po-locations/*.po; do echo $$pofile; done; fi)
24
 
 
25
9
# Helper variable
26
 
libgweatherlocations_data = $(libgweatherlocations_in_files:.xml.in=.xml)
27
 
 
28
 
libgweatherlocations_DATA = $(shell echo $(PO_LOCATIONS) | sed "s|$(top_srcdir)/po-locations/|Locations.|g;s|\.po|.xml$(COMPRESS_EXT)|g") $(libgweatherlocations_data)$(COMPRESS_EXT)
 
10
libgweatherlocations_DATA = $(libgweatherlocations_in_files:.xml.in=.xml)
29
11
 
30
12
# We need this step so that we merge all the make Locations.xy.xml destinations
31
13
# into one unique destination. This makes -j2 work. (Else, we end up with
32
14
# multiple and conflicting calls to intltool-merge)
33
15
$(libgweatherlocations_DATA): $(LOCATIONS_STAMP)
34
16
 
35
 
$(LOCATIONS_STAMP): $(libgweatherlocations_in_files) $(PO_LOCATIONS) Makefile
36
 
        $(AM_V_at)LC_ALL=C $(INTLTOOL_MERGE) --multiple-output --xml-style --utf8 --cache=$(top_builddir)/po-locations/.intltool-merge-cache $(top_srcdir)/po-locations $< $(libgweatherlocations_data) && \
37
 
        for pofile in $(PO_LOCATIONS); do \
38
 
                locale=`echo $$pofile | sed "s;$(top_srcdir)/po-locations/\(.*\)\.po;\1;"`;     \
39
 
                xmllint --noblanks -o Locations.$$locale.xml $$locale/$(libgweatherlocations_data); \
40
 
                rm -f $$locale/$(libgweatherlocations_data);            \
41
 
                test -d $$locale && rmdir $$locale;                     \
42
 
                if test "x$(COMPRESS_EXT)" = "x.gz"; then               \
43
 
                        gzip --force Locations.$$locale.xml;            \
44
 
                fi;                                                     \
45
 
        done &&                                                         \
46
 
        xmllint --noblanks -o Locations.xml C/$(libgweatherlocations_data) && \
47
 
        rm -f C/$(libgweatherlocations_data) &&                         \
48
 
        test -d C && rmdir C &&                                         \
49
 
        if test "x$(COMPRESS_EXT)" = "x.gz"; then                       \
50
 
                gzip --force Locations.xml;                             \
51
 
        fi &&                                                           \
52
 
        touch $@
53
 
 
54
 
endif # USE_ONE_BIG_XML
55
 
 
56
 
### Locations.xml.in rebuild
57
 
rebuild-locations: locationdb.sqlite update-locations.py
58
 
        $(AM_V_GEN)($(srcdir)/update-locations.py > Locations.xml.in.new && mv Locations.xml.in.new Locations.xml.in) || rm -f Locations.xml.in.new
59
 
 
60
 
locationdb.sqlite: build-locationdb.pl major-cities.txt sources/nsd_cccc.txt sources/POP_PLACES.txt sources/US_CONCISE.txt sources/geonames_dd_dms_date_*.txt city-fixups.pl station-fixups.pl
61
 
        $(AM_V_GEN)$(srcdir)/build-locationdb.pl
 
17
$(LOCATIONS_STAMP): $(libgweatherlocations_in_files) Makefile
 
18
        LC_ALL=C $(INTLTOOL_MERGE) --multiple-output --xml-style --utf8 --cache=$(top_builddir)/po-locations/.intltool-merge-cache /dev/null $< $(libgweatherlocations_DATA)  && \
 
19
        xmllint --noblanks -o Locations.xml C/$(libgweatherlocations_DATA) && \
 
20
        rm -f C/$(libgweatherlocations_DATA) &&                         \
 
21
        touch $@
62
22
 
63
23
check:
64
24
        xmllint --valid --noout $(top_srcdir)/data/Locations.xml.in