Add support for automatically updating Unicode derived files
[pgsql.git] / src / backend / utils / mb / Unicode / Makefile
blob9084f03009171079bad7c6d5d8433a27df1dd2a3
1 #-------------------------------------------------------------------------
3 # Makefile for src/backend/utils/mb/Unicode
5 # Copyright (c) 2001-2020, PostgreSQL Global Development Group
7 # src/backend/utils/mb/Unicode/Makefile
9 #-------------------------------------------------------------------------
11 subdir = src/backend/utils/mb/Unicode
12 top_builddir = ../../../../..
13 include $(top_builddir)/src/Makefile.global
15 ISO8859MAPS = iso8859_2_to_utf8.map utf8_to_iso8859_2.map \
16 iso8859_3_to_utf8.map utf8_to_iso8859_3.map \
17 iso8859_4_to_utf8.map utf8_to_iso8859_4.map \
18 iso8859_5_to_utf8.map utf8_to_iso8859_5.map \
19 iso8859_6_to_utf8.map utf8_to_iso8859_6.map \
20 iso8859_7_to_utf8.map utf8_to_iso8859_7.map \
21 iso8859_8_to_utf8.map utf8_to_iso8859_8.map \
22 iso8859_9_to_utf8.map utf8_to_iso8859_9.map \
23 iso8859_10_to_utf8.map utf8_to_iso8859_10.map \
24 iso8859_13_to_utf8.map utf8_to_iso8859_13.map \
25 iso8859_14_to_utf8.map utf8_to_iso8859_14.map \
26 iso8859_15_to_utf8.map utf8_to_iso8859_15.map \
27 iso8859_16_to_utf8.map utf8_to_iso8859_16.map
29 WINMAPS = win866_to_utf8.map utf8_to_win866.map \
30 win874_to_utf8.map utf8_to_win874.map \
31 win1250_to_utf8.map utf8_to_win1250.map \
32 win1251_to_utf8.map utf8_to_win1251.map \
33 win1252_to_utf8.map utf8_to_win1252.map \
34 win1253_to_utf8.map utf8_to_win1253.map \
35 win1254_to_utf8.map utf8_to_win1254.map \
36 win1255_to_utf8.map utf8_to_win1255.map \
37 win1256_to_utf8.map utf8_to_win1256.map \
38 win1257_to_utf8.map utf8_to_win1257.map \
39 win1258_to_utf8.map utf8_to_win1258.map
41 GENERICMAPS = $(ISO8859MAPS) $(WINMAPS) \
42 gbk_to_utf8.map utf8_to_gbk.map \
43 koi8r_to_utf8.map utf8_to_koi8r.map \
44 koi8u_to_utf8.map utf8_to_koi8u.map
46 SPECIALMAPS = euc_cn_to_utf8.map utf8_to_euc_cn.map \
47 euc_jp_to_utf8.map utf8_to_euc_jp.map \
48 euc_kr_to_utf8.map utf8_to_euc_kr.map \
49 euc_tw_to_utf8.map utf8_to_euc_tw.map \
50 sjis_to_utf8.map utf8_to_sjis.map \
51 gb18030_to_utf8.map utf8_to_gb18030.map \
52 big5_to_utf8.map utf8_to_big5.map \
53 johab_to_utf8.map utf8_to_johab.map \
54 uhc_to_utf8.map utf8_to_uhc.map \
55 euc_jis_2004_to_utf8.map utf8_to_euc_jis_2004.map \
56 shift_jis_2004_to_utf8.map utf8_to_shift_jis_2004.map
58 MAPS = $(GENERICMAPS) $(SPECIALMAPS)
60 ISO8859TEXTS = 8859-2.TXT 8859-3.TXT 8859-4.TXT 8859-5.TXT \
61 8859-6.TXT 8859-7.TXT 8859-8.TXT 8859-9.TXT \
62 8859-10.TXT 8859-13.TXT 8859-14.TXT 8859-15.TXT \
63 8859-16.TXT
65 WINTEXTS = CP866.TXT CP874.TXT CP936.TXT \
66 CP1250.TXT CP1251.TXT \
67 CP1252.TXT CP1253.TXT CP1254.TXT CP1255.TXT \
68 CP1256.TXT CP1257.TXT CP1258.TXT
70 GENERICTEXTS = $(ISO8859TEXTS) $(WINTEXTS) \
71 KOI8-R.TXT KOI8-U.TXT
73 all: $(MAPS)
75 $(GENERICMAPS): UCS_to_most.pl $(GENERICTEXTS)
76 $(PERL) -I $(srcdir) $<
78 johab_to_utf8.map utf8_to_johab.map: UCS_to_JOHAB.pl JOHAB.TXT
79 $(PERL) -I $(srcdir) $<
81 uhc_to_utf8.map utf8_to_uhc.map: UCS_to_UHC.pl windows-949-2000.xml
82 $(PERL) -I $(srcdir) $<
84 euc_jp_to_utf8.map utf8_to_euc_jp.map: UCS_to_EUC_JP.pl CP932.TXT JIS0212.TXT
85 $(PERL) -I $(srcdir) $<
87 euc_cn_to_utf8.map utf8_to_euc_cn.map: UCS_to_EUC_CN.pl gb-18030-2000.xml
88 $(PERL) -I $(srcdir) $<
90 euc_kr_to_utf8.map utf8_to_euc_kr.map: UCS_to_EUC_KR.pl KSX1001.TXT
91 $(PERL) -I $(srcdir) $<
93 euc_tw_to_utf8.map utf8_to_euc_tw.map: UCS_to_EUC_TW.pl CNS11643.TXT
94 $(PERL) -I $(srcdir) $<
96 sjis_to_utf8.map utf8_to_sjis.map: UCS_to_SJIS.pl CP932.TXT
97 $(PERL) -I $(srcdir) $<
99 gb18030_to_utf8.map utf8_to_gb18030.map: UCS_to_GB18030.pl gb-18030-2000.xml
100 $(PERL) -I $(srcdir) $<
102 big5_to_utf8.map utf8_to_big5.map: UCS_to_BIG5.pl BIG5.TXT CP950.TXT
103 $(PERL) -I $(srcdir) $<
105 euc_jis_2004_to_utf8.map utf8_to_euc_jis_2004.map: UCS_to_EUC_JIS_2004.pl euc-jis-2004-std.txt
106 $(PERL) -I $(srcdir) $<
108 shift_jis_2004_to_utf8.map utf8_to_shift_jis_2004.map: UCS_to_SHIFT_JIS_2004.pl sjis-0213-2004-std.txt
109 $(PERL) -I $(srcdir) $<
111 distclean: clean
112 rm -f $(TEXTS)
114 maintainer-clean: distclean
115 rm -f $(MAPS)
118 BIG5.TXT CNS11643.TXT:
119 $(DOWNLOAD) https://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/OTHER/$(@F)
121 euc-jis-2004-std.txt sjis-0213-2004-std.txt:
122 $(DOWNLOAD) http://x0213.org/codetable/$(@F)
124 gb-18030-2000.xml windows-949-2000.xml:
125 $(DOWNLOAD) https://ssl.icu-project.org/repos/icu/data/trunk/charset/data/xml/$(@F)
127 GB2312.TXT:
128 $(DOWNLOAD) 'http://trac.greenstone.org/browser/trunk/gsdl/unicode/MAPPINGS/EASTASIA/GB/GB2312.TXT?rev=1842&format=txt'
130 JIS0212.TXT:
131 $(DOWNLOAD) https://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/$(@F)
133 JOHAB.TXT KSX1001.TXT:
134 $(DOWNLOAD) https://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/KSC/$(@F)
136 KOI8-R.TXT KOI8-U.TXT:
137 $(DOWNLOAD) https://www.unicode.org/Public/MAPPINGS/VENDORS/MISC/$(@F)
139 $(ISO8859TEXTS):
140 $(DOWNLOAD) https://www.unicode.org/Public/MAPPINGS/ISO8859/$(@F)
142 $(filter-out CP8%,$(WINTEXTS)) CP932.TXT CP950.TXT:
143 $(DOWNLOAD) https://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/$(@F)
145 $(filter CP8%,$(WINTEXTS)):
146 $(DOWNLOAD) https://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/PC/$(@F)