blob: 802846379e6bfc3278142226ceb9d6f2423b99a1 (
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
##
# Global definitions
NULL =
EXTRA_DIST = \
language-subtag-registry \
$(stamp_files) \
$(subtagregistry_DATA) \
$(ldmlbcp47_DATA) \
$(ldmlsupplemental_DATA) \
$(NULL)
MAINTAINERCLEANFILES = \
language-subtag-registry \
$(ldml_xml_files) \
core.zip \
$(stamp_files) \
$(NULL)
CLEANFILES = \
language-subtag-registry.xml \
$(NULL)
BUILT_FILES = \
language-subtag-registry \
language-subtag-registry.xml \
$(ldml_xml_files) \
$(NULL)
##
# Local definitions
ldml_xml_files = \
$(bcp47_xml_files) \
$(supplemental_xml_files) \
$(NULL)
bcp47_xml_files = \
common/bcp47/calendar.xml \
common/bcp47/collation.xml \
common/bcp47/currency.xml \
common/bcp47/number.xml \
common/bcp47/timezone.xml \
common/bcp47/transform.xml \
common/bcp47/transform_ime.xml \
common/bcp47/transform_keyboard.xml \
common/bcp47/transform_mt.xml \
common/bcp47/transform_private_use.xml \
common/bcp47/variant.xml \
$(NULL)
supplemental_xml_files = \
common/supplemental/likelySubtags.xml \
$(NULL)
stamp_files = \
stamp-core-zip \
stamp-ldml-xml \
$(NULL)
#
AM_V_DL = $(am__v_DL_$(V))
am__v_DL_ = $(am__v_DL_$(AM_DEFAULT_VERBOSITY))
am__v_DL_0 = @echo " DL " $@;
##
# Local Rules
language-subtag-registry:
$(AM_V_DL) wget -O $@ http://www.iana.org/assignments/language-subtag-registry || \
curl -o $@ http://www.iana.org/assignments/language-subtag-registry
if CROSS_COMPILING
language-subtag-registry.xml: language-subtag-registry reg2xml.c Makefile
@echo Warning: Unable to rebuild $@ when cross-compiling
else
if REBUILD_DATA
language-subtag-registry.xml: language-subtag-registry reg2xml$(EXEEXT) Makefile
$(AM_V_GEN) $(builddir)/reg2xml$(EXEEXT) $(srcdir)/language-subtag-registry $@.tmp || $(builddir)/reg2xml$(EXEEXT) $(builddir)/language-subtag-registry $@.tmp; \
head -1 $@.tmp | grep -E '^<\?xml version'>/dev/null 2>&1 && mv $@.tmp $@ || (echo "E: $@ isn't an expected result"; rm $@.tmp)
else
language-subtag-registry.xml:
@echo Warning: the rebuild of $@ is explicitly disabled.
endif
endif
stamp-core-zip:
-rm core.zip
$(AM_V_DL) wget http://unicode.org/Public/cldr/latest/core.zip || \
curl http://unicode.org/Public/cldr/latest/core.zip; \
[ -f core.zip ] && touch $@
stamp-ldml-xml: stamp-core-zip Makefile.am
unzip -o core.zip $(bcp47_xml_files) $(supplemental_xml_files); \
touch $@
$(bcp47_xml_files): stamp-ldml-xml
$(supplemental_xml_files): stamp-ldml-xml
##
# Target platform
subtagregistrydir = $(datadir)/liblangtag
subtagregistry_DATA = \
language-subtag-registry.xml \
$(NULL)
ldmlbcp47dir = $(datadir)/liblangtag/common/bcp47
ldmlbcp47_DATA = \
$(bcp47_xml_files) \
$(NULL)
ldmlsupplementaldir = $(datadir)/liblangtag/common/supplemental
ldmlsupplemental_DATA = \
$(supplemental_xml_files) \
$(NULL)
#
noinst_PROGRAMS = \
$(NULL)
if REBUILD_DATA
noinst_PROGRAMS += reg2xml
endif
#
reg2xml_SOURCES = \
reg2xml.c \
$(NULL)
reg2xml_CFLAGS = \
$(LIBXML2_CFLAGS) \
-I$(top_srcdir)/liblangtag \
-D__LANGTAG_COMPILATION \
$(NULL)
reg2xml_LDFLAGS = \
$(LIBXML2_LIBS) \
$(top_builddir)/liblangtag/liblangtag.la \
$(NULL)
reg2xml_DEPENDENCIES = \
$(top_builddir)/liblangtag/liblangtag.la \
$(NULL)
-include $(top_srcdir)/git.mk
|