blob: e1441d3e73206412240245697998098d4f5f138e (
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
|
SUBDIRS =
if ENABLE_GLADE_CATALOG
SUBDIRS += glade
endif
libgweatherdtddir = $(pkgdatadir)
libgweatherdtd_DATA = locations.dtd
libgweatherlocationsdir = $(pkgdatadir)
libgweatherlocations_in_files = Locations.xml.in
if USE_ONE_BIG_XML
LOCATIONS_STAMP =
libgweatherlocations_DATA = $(libgweatherlocations_in_files:.xml.in=.xml$(COMPRESS_EXT))
%.xml$(COMPRESS_EXT): %.xml.in $(wildcard $(top_srcdir)/po-locations/*.po)
$(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/"` && \
if test "x$(COMPRESS_EXT)" = "x.gz"; then \
gzip --force `echo $@ | sed "s/.xml$(COMPRESS_EXT)/.xml/"`; \
fi
else # USE_ONE_BIG_XML
LOCATIONS_STAMP = stamp-Locations.xml
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)
# Helper variable
libgweatherlocations_data = $(libgweatherlocations_in_files:.xml.in=.xml)
libgweatherlocations_DATA = $(shell echo $(PO_LOCATIONS) | sed "s|$(top_srcdir)/po-locations/|Locations.|g;s|\.po|.xml$(COMPRESS_EXT)|g") $(libgweatherlocations_data)$(COMPRESS_EXT)
# We need this step so that we merge all the make Locations.xy.xml destinations
# into one unique destination. This makes -j2 work. (Else, we end up with
# multiple and conflicting calls to intltool-merge)
$(libgweatherlocations_DATA): $(LOCATIONS_STAMP)
$(LOCATIONS_STAMP): $(libgweatherlocations_in_files) $(PO_LOCATIONS) Makefile
$(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) && \
for pofile in $(PO_LOCATIONS); do \
locale=`echo $$pofile | sed "s;$(top_srcdir)/po-locations/\(.*\)\.po;\1;"`; \
xmllint --noblanks -o Locations.$$locale.xml $$locale/$(libgweatherlocations_data); \
rm -f $$locale/$(libgweatherlocations_data); \
test -d $$locale && rmdir $$locale; \
if test "x$(COMPRESS_EXT)" = "x.gz"; then \
gzip --force Locations.$$locale.xml; \
fi; \
done && \
xmllint --noblanks -o Locations.xml C/$(libgweatherlocations_data) && \
rm -f C/$(libgweatherlocations_data) && \
test -d C && rmdir C && \
if test "x$(COMPRESS_EXT)" = "x.gz"; then \
gzip --force Locations.xml; \
fi && \
touch $@
endif # USE_ONE_BIG_XML
### Locations.xml.in rebuild
rebuild-locations: locationdb.sqlite update-locations.py
$(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
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
$(AM_V_GEN)$(srcdir)/build-locationdb.pl
check:
xmllint --valid --noout $(top_srcdir)/data/Locations.xml.in
$(srcdir)/check-timezones.sh $(srcdir)/Locations.xml.in
EXTRA_DIST = \
$(libgweatherlocations_in_files) \
$(libgweatherdtd_DATA) \
check-timezones.sh \
README \
README.timezones
CLEANFILES = \
$(libgweatherlocations_DATA) \
$(LOCATIONS_STAMP)
-include $(top_srcdir)/git.mk
|